From 75eaba130bea05eb9b60ceec2068def86c5e8565 Mon Sep 17 00:00:00 2001 From: Marina Kiweler Date: Wed, 6 Feb 2019 09:58:47 +0100 Subject: [PATCH] commit --- .gitignore | 1 + MARMoSET.Rproj | 1 - R/term_matching_functions.R | 12 ++++++------ README.md | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 5b6a065..26bb2f8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +inst/doc .Rproj.user .Rhistory .RData diff --git a/MARMoSET.Rproj b/MARMoSET.Rproj index 292ab7c..4a9bcdb 100644 --- a/MARMoSET.Rproj +++ b/MARMoSET.Rproj @@ -17,4 +17,3 @@ StripTrailingWhitespace: Yes BuildType: Package PackageInstallArgs: --no-multiarch --with-keep.source -PackageRoxygenize: rd,collate,namespace diff --git a/R/term_matching_functions.R b/R/term_matching_functions.R index fd43e47..de98aca 100644 --- a/R/term_matching_functions.R +++ b/R/term_matching_functions.R @@ -65,10 +65,10 @@ one_group_match_terms <- function(flat_json, term_matching_table, group_number) assertive.types::assert_is_a_number(group_number) ### create new table - meta_data_table <- data.frame(term = term_matching_table[[2]], - value = NA) + meta_data_table <- data.frame(Term = term_matching_table[[2]], + Value = NA) - ### get values + ### get Values for (this_row in 1:nrow(term_matching_table)) { handle_type <- term_matching_table[[4]][[this_row]] @@ -77,15 +77,15 @@ one_group_match_terms <- function(flat_json, term_matching_table, group_number) if (handle_type == "list_path" && !is.null(handle) && handle != "?") { - meta_data_table[["value"]][[this_row]] <- handle + meta_data_table[["Value"]][[this_row]] <- handle } else if (handle_type == "literal") { - meta_data_table[["value"]][[this_row]] <- term_matching_table[[5]][[this_row]] + meta_data_table[["Value"]][[this_row]] <- term_matching_table[[5]][[this_row]] } else if (handle_type == "function") { - meta_data_table[["value"]][[this_row]] <- gradient_as_string(flat_json, group_number) + meta_data_table[["Value"]][[this_row]] <- gradient_as_string(flat_json, group_number) } } return(meta_data_table) diff --git a/README.md b/README.md index bf9fec4..1c5602e 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ The c\# command line tool can be used in R with `generate_json()` to create a JS This JSON file can also be created by using the MARMoSET.exe externally. -Due to the design of the RawFileReader the MARMoSET.exe and therefore this command is running as 64 bit code on Windows only. To use this package with another operating system, it is necessarry to already have the JSON file created. To open a JSON files in R the package `jsonlite` provides the function `fromJSON()`. +Due to the design of the RawFileReader the MARMoSET.exe and therefore this command is running as 64 bit code on Windows only. To use this package with another operating system, it is necessarry to already have the JSON file created. To open a JSON file in R the package `jsonlite` provides the function `fromJSON()`. ``` r library(MARMoSET)