Skip to content

Instantly share code, notes, and snippets.


Dominik Vogel DominikVogel

View GitHub Profile
DominikVogel / here_in_CodeOcean.markdown
Last active May 3, 2021
Use R package here in Code Ocean
View here_in_CodeOcean.markdown

Using the here R package in Code Ocean

here package:

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
DominikVogel / specific_rtweet_token.R
Created Jun 25, 2020
Use specific rtweet token / use token with RScript
View specific_rtweet_token.R
# rtweet tries to automatically detect a token for the Twitter API
# This fails when you run the script from the command line with RScript
# If you have multiple tokens, this script also helps selecting the right token
# Code inspired by
# Requirements:
# You need to have set up a token with rtweet
# More info:
# Assumption token is stored at /home/username/