This file contains 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
# Fixed Choice Design Lunchtime Simulation | |
# 2019-02-06 | |
library(igraph) | |
library(dplyr) | |
library(ggplot2) | |
#Experimental Conditions | |
conds <- expand.grid( | |
c(150), |
This file contains 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
# Add this to your .Rprofile | |
options( | |
error = quote(rlang::entrace()), | |
rlang__backtrace_on_error = "collapse" # or "branch" or "full" | |
) |
This file contains 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
#!/usr/bin/env Rscript | |
# 2018-06-04 11:26:12 | |
# Automatically generated from R by autoparallel version 0.0.1 | |
library(parallel) | |
nworkers = 2 | |
timeout = 600 |
This file contains 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
#devtools::install_github("cloudyr/aws.ec2") | |
# devtools::install_github("cloudyr/aws.ec2", ref = devtools::github_pull(38)) | |
# ^ Must actually install PR 38. Some broken code in the main repo | |
#devtools::install_github("cloudyr/aws.signature") | |
library(aws.signature) | |
library(aws.ec2) | |
library(furrr) | |
aws.signature::use_credentials() |
This file contains 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
# This example demonstrates running furrr code distributed on 2 AWS instances ("nodes"). | |
# The instances have already been created. | |
library(future) | |
library(furrr) | |
# Two t2.micro AWS instances | |
# Created from http://www.louisaslett.com/RStudio_AMI/ | |
public_ip <- c("34.205.155.182", "34.201.26.217") |
This file contains 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
.Rproj.user | |
.Rhistory | |
.RData | |
*.Rproj | |
*.html |
This file contains 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(inline) | |
inc <- ' | |
/* This is taken from envir.c in the R 2.15.1 source | |
https://github.com/SurajGupta/r-source/blob/master/src/main/envir.c | |
*/ | |
#define FRAME_LOCK_MASK (1<<14) | |
#define FRAME_IS_LOCKED(e) (ENVFLAGS(e) & FRAME_LOCK_MASK) | |
#define UNLOCK_FRAME(e) SET_ENVFLAGS(e, ENVFLAGS(e) & (~ FRAME_LOCK_MASK)) | |
' |