-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hi
If there are any NAs, then the variable options sets to NA. Is there a way to ignore NA when making the dictionary? see example below:
library(dataMeta)
data("esoph")
my.data <- esoph
# Linker: Add description for each variable names and variable type
variable_description <- c("age group in years", "alcohol consumption in gm/day",
"tobacco consumption in gm/day", "number of cases (showing a range)",
"number of controls (showing range)")
# Add some NA's to row 1
my.data[1, c(2, 3, 4)] <- NA
variable_type <- c(0, 0, 0, 0, 0)
linker <- build_linker(my.data = my.data, variable_description = variable_description,
variable_type = variable_type)
# Replace elements in row 1, columns 2, 3, and 4 with NA
linker
# Data dictionary
# For this data set, no further option description is needed.
dictionary <- build_dict(my.data = my.data, linker = linker, option_description = NULL,
prompt_varopts = FALSE)
dictionary
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels