Skip to content
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

File organisation: not much info #592

Open
nick-youngblut opened this issue Nov 5, 2022 · 0 comments
Open

File organisation: not much info #592

nick-youngblut opened this issue Nov 5, 2022 · 0 comments

Comments

@nick-youngblut
Copy link

the File organisation section doesn't have much info on actually organizing functions besides:

I recommend putting large functions (and any smaller helper functions that they need) into their own R/{function-name}.R file.

You might want to collect smaller, simpler, functions into one place. I often use R/utils.R for this, but if they’re primarily used in your ui you might use R/ui.R.

... assuming that one does not want to make a full-fledged package.

Questions that an shiny app developer might have:

  • Should I use source() to source the code from the *.R files in the R/ directory?
  • Can I have nested subdirectories in R/?
    • If using nested subdirectories, do I need to add files similar to __init__.py in python?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant