Issue
We can do:
> dirdf::dirdf_parse("foo,tag=100.rds", template = "name,~tag~=binsize.rds")
name binsize rds pathname
1 foo 100 rds foo,tag=100.rds
But we cannot get results with columns containing reserved symbols, e.g. we cannot return a bin_size column:
> dirdf::dirdf_parse("foo,tag=100.rds", template = "name,~tag~=bin_size.rds")
Error in dirdf::dirdf_parse("foo,tag=100.rds", template = "name,~tag~=bin_size.rds") :
Unexpected path(s) found:
foo,tag=100.rds
Wish
Extend the template syntax to specify such fields as well. Maybe, by backslash escaping reserved symbols, e.g.
> dirdf::dirdf_parse("foo,tag=100.rds", template = "name,~tag~=bin\\_size.rds")
name bin_size rds pathname
1 foo 100 rds foo,tag=100.rds
or through an unlikely filename symbol such as backtick, e.g.
> dirdf::dirdf_parse("foo,tag=100.rds", template = "name,~tag~=`bin_size`.rds")
name bin_size rds pathname
1 foo 100 rds foo,tag=100.rds
BTW, being able to escape as above, we can also do:
> dirdf::dirdf_parse("foo,my_tag=100.rds", template = "name,~my\\_tag~=binsize.rds")
name binsize rds pathname
1 foo 100 rds foo,tag=100.rds
to drop the my_tag part of the filename, rather than the tedious:
> dirdf::dirdf_parse("foo,my_tag=100.rds", template = "name,~my~_~tag~=binsize.rds")
name binsize rds pathname
1 foo 100 rds foo,tag=100.rds
Issue
We can do:
But we cannot get results with columns containing reserved symbols, e.g. we cannot return a
bin_sizecolumn:Wish
Extend the template syntax to specify such fields as well. Maybe, by backslash escaping reserved symbols, e.g.
or through an unlikely filename symbol such as backtick, e.g.
BTW, being able to escape as above, we can also do:
to drop the
my_tagpart of the filename, rather than the tedious: