ohdsi-studies / PioneerWatchfulWaiting

This study is part of the joint PIONEER - EHDEN - OHDSI studyathon in March 2021, and aims to advance understanding of clinical management and outcomes of watchful waiting in prostate cancer.
Apache License 2.0
7 stars 18 forks source link

Issue runStudy.R unique(cv) crash R #70

Closed rfherrerac closed 3 years ago

rfherrerac commented 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)

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)

keesvanbochove commented 3 years ago

@rfherrerac could you try the version from PR #74 devtools::install_github("ohdsi-studies/PioneerWatchfulWaiting",ref="use_data_table_for_unique")?