Skip to content

Instantly share code, notes, and snippets.

@DominikVogel
Last active May 3, 2021 12:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DominikVogel/2f9c4a8bc1a59a78863c9e13e2ef64eb to your computer and use it in GitHub Desktop.
Save DominikVogel/2f9c4a8bc1a59a78863c9e13e2ef64eb to your computer and use it in GitHub Desktop.
Use R package here in Code Ocean

Using the here R package in Code Ocean

here package: https://cran.r-project.org/web/packages/here/index.html

Challenge: Code is run in code subfolder. here things this is the base folder. Subsequent stuff breaks

Solution: Create empty .here file in root directory using Post-Install Script:

  1. Go to Environment -> Post-Install Script -> Edit Post-Install Script
  2. Add touch .here in a new lie at the end of the file
  3. here finds the file and recognizes hte root folder as root folder. Done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment