Conversation
|
Hitting a few errors: |
R/makeChartConfig.R
Outdated
| dirs<-paste(.libPaths(),'safetycharts','config', sep="/") | ||
| for(lib in .libPaths()){ | ||
| dirs<-paste(lib,'safetyCharts','config', sep="/") | ||
| if(file.exists(dirs)) break |
There was a problem hiding this comment.
So basically choose the first libPath. This seems to do the trick.
There was a problem hiding this comment.
would it be useful to add an error msg after the loop if dirs are not found stop('no chart config found, please install safetyCharts first'). If we force safetyCharts as a dependency pkg then it won't be an issue.
There was a problem hiding this comment.
Good point @xni7, it's not immediately obvious to me how safetyCharts fits into the workflow when using a custom set of chart config files. It seems the workflow functions are pulled both from the location of the chart config files as well as from the safetyCharts package.
There was a problem hiding this comment.
Yeah, you definitely can run safetyGraphics without safetyCharts if you supply all your own renderers and config files, but I'm not sure how often that will actually happen.
For this chunk of code, safetyCharts is required unless the dirs option is set. So I think a warning is totally reasonable. I'll add something now and then merge.
samussiah
left a comment
There was a problem hiding this comment.
The errors I hit previously have been fixed but I'm hitting new errors in a four anonymous functions: Warning: Error in : Only strings can be converted to symbols. The full output is in a comment above.
|
The The Participant Selector module will save me sooo much time so thank you all for that! Please let me know how else I can help. |
R/makeChartConfig.R
Outdated
| dirs<-paste(.libPaths(),'safetycharts','config', sep="/") | ||
| for(lib in .libPaths()){ | ||
| dirs<-paste(lib,'safetyCharts','config', sep="/") | ||
| if(file.exists(dirs)) break |
There was a problem hiding this comment.
would it be useful to add an error msg after the loop if dirs are not found stop('no chart config found, please install safetyCharts first'). If we force safetyCharts as a dependency pkg then it won't be an issue.
Add chart ordering via YAML and fix DataTables issue in Participant Selector.
…mappingSelect test.
add warning when no charts are found. remove stray renderers. update …
Overview
Iteratively looks for safetyCharts across multiple libPaths to fix #441.
Test Code