-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ys_start_yaml() function #135
Comments
I ended up writing a function that does what I want, works ok for my purposes now. Pasting code below. @kylebaron if you think that would be a good addition, I'd be happy to turn it into a proper function and submit as PR. Just let me know. Way to call function: newyml <- start_yspec(varnames = colnames(rawdat), path = deriveddataDir, name = "ex2datav1.yml") The function:
|
Thanks, @andreashandel; we have had lots of people requesting this sort of thing before, but resisted it in favor of a model where the yaml file gets manually created prior to creating the data. This is by design to get the user to interact more carefully with the spec and the data. So far, I think this has been successful. Every once in a while, I've gotten the itch to do this type of thing, but I think we're better off with this more disciplined approach. Thanks for the idea and for taking the time to prototype the code. Kyle |
Ok. I find YAML files with their picky indentation rules tricky to work with, so I still believe a very simple skeleton could be a good helper for most folks like me. For now I'll just continue using it for myself. If you ever decide to want one, happy to write and/or test :) |
A function that takes a data set (as loaded by e.g. read_xpt) and uses the variable names to start a template yaml file with the same file name.
User could optionally provide variable names to only start the template with some variable names.
User could also optionally provide a location for the yaml file (default could be /data/derived).
ys_start_yaml <- function(data, varnames, location)
{
}
The text was updated successfully, but these errors were encountered: