DOI-USGS / meddle

Tools for metadata creation and data releases
Other
0 stars 10 forks source link

create meddle:::render.character function #40

Open jordansread opened 6 years ago

jordansread commented 6 years ago
meddle:::render.character
function (data, filename, ..., template) 
{
    stopifnot(file.exists(data))
    config.text <- yaml::yaml.load_file(data)

see failed r parse here: https://github.com/USGS-CIDA/stream_metab_usa/pull/233/files#diff-86a49380c9cbc7977e70941a978f0f44

aappling-usgs commented 6 years ago

meddle:::render.character already exists, but i think we need to add a handler to the call to yaml::yaml.load_file within that function. the revised line might look something like this:

config.text <- yaml::yaml.load_file(data, handlers=list(expr=function(x) { eval(parse(text=x)) }))

but i haven't yet gotten it to work