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
# Re-expose basic R data manipulation tools in more pipe friendly wrappers. | |
library("wrapr") | |
#' Evaluate an expression with a data frame acting as the inner environment. | |
#' | |
#' References can be forced to the environment with a .e$ prefix | |
#' and forced to the data frame with a .d$ prefix (failure to | |
#' lookup returns null). Only works on in-memory data.frames. |
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/bash | |
# on local | |
pempath="$1" | |
ec2target="$2" | |
ssh -T -i "${pempath}" -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@${ec2target} << 'EOBLOCK' | |
# on remote machine | |
sudo apt-get -y update | |
sudo apt-get -y upgrade |
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
# The following two commands remove any previously installed H2O packages for R. | |
if ("package:h2o" %in% search()) { detach("package:h2o", unload=TRUE) } | |
if ("h2o" %in% rownames(installed.packages())) { remove.packages("h2o") } | |
# Next, we download packages that H2O depends on. | |
pkgs <- c("methods","statmod","stats","graphics","RCurl","jsonlite","tools","utils") | |
for (pkg in pkgs) { | |
if (! (pkg %in% rownames(installed.packages()))) { install.packages(pkg) } | |
} |