This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ADR Event Detection | |
library(data.table) | |
library(lubridate) | |
library(dplyr) | |
library(stringr) | |
library(ggplot2) | |
library(purrr) | |
library(tidyr) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#R script to access NIH ChemSpell Service | |
#Requires Github version of SSOAP 0.92-0, encoded branch | |
#Allows installation from Github | |
library(devtools) | |
#Just need to run this once to install the patched version of SSOAP | |
install_github("omegahat/SSOAP", ref = "use=encoded") | |
library(SSOAP) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(XML) | |
library(plyr) | |
wits <- "your/path/here/WITS.XML" | |
temp=xmlToList(wits, addAttributes = F) | |
df <- ldply(temp, .fun=function(x) {data.frame(t(unlist(x)))}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
#Run this file in the same dir as Dockerfile | |
sudo docker build -t my_ropensci . | |
sudo docker run --restart always -d -p 80:8787 -v /home/rstudio:/home/rstudio -e PASSWORD=[Insert Password Here] --name ropensci_server my_ropensci |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Start with rocker/ropensci | |
FROM rocker/ropensci | |
MAINTAINER Daniel Buijs dbuijs@gmail.com | |
## Update repos | |
RUN apt-get update | |
## Install openBLAS | |
RUN apt-get install -y --no-install-recommends -t unstable \ | |
libopenblas-dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: ropensci | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: ROpenSci Docker Image | |
# Description: This file starts and stops the ROpenSci Docker Image (to use, put in /etc/init.d/ and run sudo update-rc.d ropensci defaults) | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
#Create 2GB swapfile and activate | |
sudo install -o root -g root -m 0600 /dev/null /swapfile | |
fallocate -l 2g /swapfile | |
mkswap /swapfile | |
swapon /swapfile | |
echo "/swapfile swap swap auto 0 0" | sudo tee -a /etc/fstab | |
sudo sysctl -w vm.swappiness=10 | |
echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf |