Closed rfherrerac closed 3 years ago
in the runStudy.R file, line 331 "cv <- unique(cv)" when it is a large data set, like MkScan, that part makes R crash. Suggestion:
library(data.table)
cv <- data.table::fread(file.path(exportFolder, "covariate_value.csv")) cv <- unique(cv) writeToCsv(cv, file.path(exportFolder, "covariate_value.csv"), incremental = FALSE)
@rfherrerac could you try the version from PR #74 devtools::install_github("ohdsi-studies/PioneerWatchfulWaiting",ref="use_data_table_for_unique")?
devtools::install_github("ohdsi-studies/PioneerWatchfulWaiting",ref="use_data_table_for_unique")
in the runStudy.R file, line 331 "cv <- unique(cv)" when it is a large data set, like MkScan, that part makes R crash. Suggestion:
library(data.table)
setDTthreads(4)
cv <- data.table::fread(file.path(exportFolder, "covariate_value.csv")) cv <- unique(cv) writeToCsv(cv, file.path(exportFolder, "covariate_value.csv"), incremental = FALSE)