Install the following apps on your mac running macOS:
- (standalone) Xcode Command Line Tools
- Homebrew
- Git
Modified from: https://www.moncefbelyamani.com
#Article Network ver 2 | |
#============================ | |
# This program will scrape all citing articles surrounding one main article and | |
# create: 1) a list of most cited articles, 2) lists of main authors, 3) network of articles | |
# Mike Barnkob, December 28th 2015. | |
# www.mikebarnkob.dk | |
#Background and references | |
#1. https://cran.r-project.org/web/packages/rentrez/vignettes/rentrez_tutorial.html#advanced-counting |
#!/bin/bash | |
# By Peter Kamerman (peter.kamerman@gmail.com) | |
########## | |
# FUNCTION | |
########## | |
# Script to toggle the proxy configurations of the terminal, git, and R | |
# for use behind a proxy server (e.g., at work) and no proxy (e.g., home). | |
######################## | |
# DISCLAIMER and LICENSE | |
######################## |
#!/bin/bash | |
# I use this script after a clean install of macOS to re-install homebrew, git, and xcode tools. | |
## Install xcode tools | |
xcode-select --install | |
## Install homebrew | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
# Wald confidence interval of robustlmm::rlmer beta coefficients | |
# Adapted from code provided Ben Bolker on StackExchange: https://stats.stackexchange.com/questions/233800/how-can-i-get-confidence-intervals-for-fixed-effects-using-the-rlmer-function-r | |
confint.rlmerMod <- function(object, level = 0.95) { | |
# Extract beta coefficients | |
beta <- fixef(object) | |
Install the following apps on your mac running macOS:
Modified from: https://www.moncefbelyamani.com
The steps below can be followed to create a new AMI for use with Amazon EC2 instances that includes the latest versions of R, RStudio, and RStudio Server. The idea is inspired by the work of Louis Aslett, who creates and hosts his own public AMIs for RStudio. My own goal was to create an AMI with RStudio v1.0.0 or higher, such that I could use the recent R Notebooks feature. However, the instructions should generally apply for whenever you might be impatient accessing the latest version of R-related software on AWS (via an interactive browser interface...).
############################################################ | |
# # | |
# The effect of starting investment amount # | |
# on returns realised. The magic of compounding # | |
# # | |
############################################################ | |
# Load packages | |
library(ggplot2) |
#-- Load packages --# | |
library(readr) | |
#-- OpenPrescribing API details --# | |
# API details can be found here: https://openprescribing.net/api/ | |
# Drug codes can be obtained here: https://openprescribing.net/analyse/ | |
#-- Download pregabalin data --# | |
## Total items prescribed | |
total_pregabalin <- read_csv('https://openprescribing.net/api/1.0/spending/?code=0408010AE&format=csv') |