OHDSI / PatientLevelPrediction

An R package for performing patient level prediction in an observational database in the OMOP Common Data Model.
https://ohdsi.github.io/PatientLevelPrediction
187 stars 88 forks source link

could not find function "execute" (function not exported) #156

Closed SulevR closed 4 years ago

SulevR commented 4 years ago

Describe the bug

  1. I installed PatientLevelPrecition package in R: install_github("ohdsi/PatientLevelPrediction")
  2. I created a patient level prediction package in Atlas, downloaded it and opened .Rproj file
  3. I pressed "Install and restart" in R. Installation went normally.
  4. I loaded library: library(mycreatedpackage)
  5. run in R: execute(...)

The result: Error in execute(connectionDetails = connectionDetails, cdmDatabaseSchema = cdmDatabaseSchema, : could not find function "execute"

It seems that the function was not exported during the installation. If I do "Build"->"more"->"Document" before building and installing in R Studio, everything gets working.

Set up (please run in R "sessionInfo()" and copy the output here):

R version 3.6.2 (2019-12-12) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS Catalina 10.15.2

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

Random number generation: RNG: Mersenne-Twister Normal: Inversion Sample: Rounding

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] sulevitest_0.0.1 PatientLevelPrediction_3.0.10 Cyclops_2.0.2
[4] FeatureExtraction_2.2.5 devtools_2.2.1 usethis_1.5.1
[7] DatabaseConnector_2.4.1 SqlRender_1.6.3

loaded via a namespace (and not attached): [1] httr_1.4.1 pkgload_1.0.2 tidyr_1.0.0 jsonlite_1.6 viridisLite_0.3.0
[6] splines_3.6.2 foreach_1.4.7 ffbase_0.12.7 assertthat_0.2.1 triebeard_0.3.0
[11] urltools_1.7.3 remotes_2.1.0 sessioninfo_1.1.1 pillar_1.4.3 backports_1.1.5
[16] lattice_0.20-38 glue_1.3.1 digest_0.6.23 colorspace_1.4-1 htmltools_0.4.0
[21] Matrix_1.2-18 plyr_1.8.5 pkgconfig_2.0.3 purrr_0.3.3 scales_1.1.0
[26] processx_3.4.1 ff_2.2-14 ParallelLogger_1.1.1 tibble_2.1.3 ggplot2_3.2.1
[31] ellipsis_0.3.0 withr_2.1.2 lazyeval_0.2.2 cli_2.0.1 survival_3.1-8
[36] magrittr_1.5 crayon_1.3.4 memoise_1.1.0 ps_1.3.0 fs_1.3.1
[41] fansi_0.4.1 MASS_7.3-51.4 pkgbuild_1.0.6 tools_3.6.2 data.table_1.12.8
[46] prettyunits_1.1.0 lifecycle_0.1.0 plotly_4.9.1 drat_0.1.5 munsell_0.5.0
[51] callr_3.4.0 compiler_3.6.2 rlang_0.4.2 grid_3.6.2 iterators_1.0.12
[56] rstudioapi_0.10 htmlwidgets_1.5.1 testthat_2.3.1 gtable_0.3.0 codetools_0.2-16
[61] DBI_1.1.0 curl_4.3 R6_2.4.1 dplyr_0.8.3 bit_1.1-14
[66] zeallot_0.1.0 fastmatch_1.1-0 rprojroot_1.3-2 desc_1.2.0 rJava_0.9-11
[71] Rcpp_1.0.3 vctrs_0.2.1 tidyselect_0.2.5

jreps commented 4 years ago

The skeleton prediction package is what ATLAS uses (https://github.com/OHDSI/StudyProtocolSandbox/tree/master/SkeletonPredictionStudy) - the latest version has the correct namespace but ATLAS is using an older skeleton. This issue might be better placed in the ATLAS GitHub asking for the updated prediction skeleton.