Skip to content

Commit

Permalink
Merge pull request #100 from aim-rsf/fix-bug
Browse files Browse the repository at this point in the history
Fix bug with header of demo list file
  • Loading branch information
RayStick authored Jul 1, 2024
2 parents 69062ab + 41c93fa commit bf11546
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/data-domain_list.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' A simplified list of domains, to demo the function domain_mapping.R \cr \cr
#' This data was created with these two steps:
#' \enumerate{
#' \item \code{domain_list <- read.csv('browseMetadata/data-raw/domain_list_demo.csv')}
#' \item \code{domain_list <- read.csv('browseMetadata/data-raw/domain_list_demo.csv',header=FALSE)}
#' \item \code{usethis::use_data(domain_list)}
#' }
#' @docType data
Expand Down
2 changes: 1 addition & 1 deletion R/domain_mapping.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ domain_mapping <- function(json_file = NULL, domain_file = NULL, look_up_file =
meta_json <- rjson::fromJSON(file = json_file)
# Read in the domain file containing the meta data
domains <- read.csv(domain_file, header = FALSE)
colnames(domains)[1] = "Domain Name"
DomainListDesc <- tools::file_path_sans_ext(basename(domain_file))
}

Expand All @@ -59,6 +58,7 @@ domain_mapping <- function(json_file = NULL, domain_file = NULL, look_up_file =
}

## Present domains plots panel for user's reference ----
colnames(domains)[1] = "Domain Name"
graphics::plot.new()
domains_extend <- rbind(c("*NO MATCH / UNSURE*"), c("*METADATA*"), c("*ALF ID*"), c("*OTHER ID*"), c("*DEMOGRAPHICS*"), domains)
Code <- data.frame(Code = 0:(nrow(domains_extend) - 1))
Expand Down
1 change: 0 additions & 1 deletion data-raw/domain_list_demo.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Domain_Name
"Socioeconomic info"
"Location info"
"Education info"
Expand Down
Binary file modified data/domain_list.rda
Binary file not shown.
2 changes: 1 addition & 1 deletion man/domain_list.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bf11546

Please sign in to comment.