You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have a function that generates a data frame of keys for a given template for programmatic generation of input data. I'm thinking something along the lines of:
template<-"{{#dat}} count: {{count}}, spray: {{spray}}\n {{/dat}}"whisker::getKeys(template)
#> rawkey first last key type#> 1 #dat 1 8 dat ##> 2 count 20 28 count #> 3 spray 38 46 spray #> 4 /dat 49 56 dat /
FWIW, the functionality in {whisker} already exists, it just needs to be exposed:
template<-"{{#dat}} count: {{count}}, spray: {{spray}}\n {{/dat}}"f<-whisker:::parseTemplate(template)
get("key", envir= environment(f))
#> rawkey first last key type#> 1 #dat 1 8 dat ##> 2 count 20 28 count #> 3 spray 38 46 spray #> 4 /dat 49 56 dat /
It would be nice to have a function that generates a data frame of keys for a given template for programmatic generation of input data. I'm thinking something along the lines of:
FWIW, the functionality in {whisker} already exists, it just needs to be exposed:
Created on 2020-09-10 by the reprex package (v0.3.0)
The text was updated successfully, but these errors were encountered: