Open avallecam opened 3 months ago
Could you utilise https://stat.ethz.ch/R-manual/R-devel/library/utils/html/rcompgen.html? I've never looked at it in any detail but wonder if it allows you to register custom completions which could help with ...
?
Could you utilise stat.ethz.ch/R-manual/R-devel/library/utils/html/rcompgen.html? I've never looked at it in any detail but wonder if it allows you to register custom completions which could help with ...?
I'm not 100% sure but I think you cannot customize a function autocomplete. Only what appears after $
and @
.
Also summarizing other points from the slack discussion for completeness and future reference:
...
to allow passing custom tagsI'm not 100% sure but I think you cannot customize a function autocomplete. Only what appears after $ and @.
Seems like you can with utils:::.addFunctionInfo()
but (a) I've seen little use of this in the wild (e.g. GitHub CRAN) and (b) I'm not sure how to get it to work with the RStudio autocompletion (I couldn't get it to work there only within a terminal R session).
That said I'm not sure it is the right thing to do anyway ...
We could potentially make the default tags explicit arguments
Explicit arguments would seem preferable.
Is possible that having the
tag_names
as arguments would accelerate writing or make it less error-prone by using autocomplete. However, this may increase the complexity of the function internals.Currently, we are using a mix of
dplyr::glimpse
withlinelist::tags_names
to tag variables when usinglinelist::make_linelist
from @Bisaloo