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
I did not see a way to specify the sourcing order of R files. In R packages this works via the @include roxygen2 tag and subsequent update of collate directive in the DESCRIPTION file. It would be great if envsetup would have a similar way to do this.
Relevant Input
Say you have file a.R which for successful sourcing depends on code in b.R to be sourced beforehand. This arises e.g. in S4 class definitions or function factory calls.
Relevant Output
Currently this will fail. It would be great if there is a way to define that a.R depends on b.R and therefore b.R should be sourced first.
Reproducible Example/Pseudo Code
No response
The text was updated successfully, but these errors were encountered:
@danielinteractive Thanks for the comment. We should be able to add a tag to each script for this, or we can add a place in the envsetup configuration file that would allow users to overwrite the default source order.
Thank you @nicholas-masel , maybe it would even be possible to use a similar pattern as in roxygen2 by having a look how they get from the @include tag usage to the collate list order. The advantage would be to minimize the workload for the user (only need to use such tag when needed)
@danielinteractive Yep, I completely agree and this looks straightforward. We'll update autos() to call roxygen:::generate_collate() to define the source order.
Feature Idea
I did not see a way to specify the sourcing order of R files. In R packages this works via the
@include
roxygen2 tag and subsequent update of collate directive in the DESCRIPTION file. It would be great ifenvsetup
would have a similar way to do this.Relevant Input
Say you have file
a.R
which for successful sourcing depends on code inb.R
to be sourced beforehand. This arises e.g. in S4 class definitions or function factory calls.Relevant Output
Currently this will fail. It would be great if there is a way to define that
a.R
depends onb.R
and thereforeb.R
should be sourced first.Reproducible Example/Pseudo Code
No response
The text was updated successfully, but these errors were encountered: