Skip to content

Instantly share code, notes, and snippets.

View cbrown5's full-sized avatar
🦈

Chris Brown cbrown5

🦈
View GitHub Profile
@amandamiotto
amandamiotto / SetUpRWindows10
Created June 26, 2018 03:34
Tips for setting up R packages on windows 10
#Written by Chris Brown at Griffith Uni
#Tips for setting up R packages on windows 10
I recommend installing packages to your local drive, not the shared network drive. Though R will default to the network drive (which is "\\\\staff\..."), so some knowledge is required to overcome this.
You could also ask IT to bind a letter to your network drive. I've read that works (see here: https://github.com/r-lib/devtools/issues/353)
Here's the steps I followed to install packages:
Create a shortcut to R on desktop.
Right click it
@IdoBar
IdoBar / install_shiny_server.bash
Last active July 10, 2024 02:17
A script to install R, Rstudio and Shiny-server on an Ubuntu server
#! /bin/bash
# Ask user for sudo password (to be used when needed)
read -s -p "Enter Password for sudo: " sudoPW
# update CRAN repository below if needed
REPO="'https://cran.rstudio.com/'"
# Based on the instructions on Dean Attali's website:
# https://deanattali.com/2015/05/09/setup-rstudio-shiny-server-digital-ocean/#user-libraries
@cbrown5
cbrown5 / retransformation-bias.R
Created March 22, 2018 05:53
A simple demonstration of retransformation bias in log-linear models
#
# Simulate data
#
a <- 2
x <- seq(0, 1, length.out = 100)
n <- length(x)
sigma <- 0.5
set.seed(42)
lny <- rnorm(n, mean = a*x, sd = sigma)
y <- exp(lny)