darwin-eu-dev / DrugUtilisation

https://darwin-eu-dev.github.io/DrugUtilisation/
Apache License 2.0
2 stars 1 forks source link

use inst #459

Closed tiozab closed 10 hours ago

tiozab commented 1 month ago

can those two file be put from raw_data into inst folder so we can call it in DED package with system.file() function system.file("dose_form_final.csv",package = "DrugUtilisation") system.file("pattern_assessment_for_dose_final.csv",package = "DrugUtilisation") @ginberg FYI Thanks :-)

tiozab commented 1 month ago

update: we only need the file system.file("pattern_assessment_for_dose_final.csv",package = "DrugUtilisation")

catalamarti commented 6 days ago

We export patternsWithFormula is this not enough for what you need? @tiozab

tiozab commented 6 days ago

we depend on the DUS package when using the dailydosecoverage function which needs the pattern_assessment_for_dose_final.csv, therefore, if you put the file into your inst folder instead of raw_data folder we can call it directly from there in the DED package.

We do it like this. If you can let me know how to do it differently with using the patternswithFormula file, I am all ear :-)

image

catalamarti commented 1 day ago

this is exported: DrugUtilisation::patternsWithFormula would that be enough?

tiozab commented 1 day ago

no, because I have the unit concept id only from patternTable (line 42) therefore knowing the concept name only as given in patternsWithFormula would be an additional unneeded joining step with cdm concept table, so we rather use the csv file pattern (line 52) and that is why we kindly ask you to put it in the inst folder instead of raw_data folder :-)