R

Embarrassingly Parallel Computing with doAzureParallel

R
Why? You want to run 100 regressions, they each take one hour, and the only difference is the data set they are using. This is an embarrassingly parallel problem. For whatever reason, you want to use Azure instead of google compute engine… Before you start I will assume that: you have an Azure account, you have correctly installed, and configured doAzureParallel Create some fake data library(dplyr) library(stringr) set.

Embarrassingly Parallel Computing with googleComputeEngineR

R
Why? You want to run 100 regressions, they each take one hour, and the only difference is the data set they are using. This is an embarrassingly parallel problem. Before you start I will assume that: you have a Google compute engine account, you have correctly installed, and configured googleComputeEngineR Create some fake data library(googleComputeEngineR) library(dplyr) library(stringr) library(future) library(future.apply) set.seed(12618) n<-10000 fakeData <- list() for(ii in 1:100){ fakeData[[ii]] <- future({ fakeDF <- data.

My highlights from StanCon 2018

R
Source: THE JUMPING RIVERS BLOG During my econ PhD I learned a lot about frequentist statistics. Alas, my training of Bayesian statistics was limited. Three years ago, I joined @MathPolResearch and started delving into this whole new world. Two weeks ago, thanks to @jumping_uk, I was able to attend StanCon. This was an amazing experience, which allowed me to meet some great people and learn a lot from them. These are my highlights from the conference:
Send emails from R with mailgun

Send emails from R with mailgun

R
Why? Until now I’ve been sending emails with R using my Gmail account. This works, but configuring mailR for the first time is always a pain. A few days ago @marked told me about mailgun and how to use it. The great thing is that you only need httr to use it. How? Using @marked’s gist as my base, I created a tiny R package to make using mailgun even easier:
Watson Conversation + R

Watson Conversation + R

R
Update 03/30/2019: IMWatson is working again! I just discovered IBM’s Watson conversation, and this free online course shows you how to build your first chatbot. Alas, the course did not cover how to use the API with R. I think chatbots can be very useful when creating shiny apps. Therefore, I started working on IMWatson. The goal of this R package is to make integrating a chatbot into a shiny app as easy as possible.

Installing mailR

R
In order to get mailR I had to create a symlink with: #ln -s /usr/lib/jvm/java-1.7.0-openjdk-amd64/jre/lib/amd64/server/libjvm.so /usr/lib/R/lib/libjvm.so ln -s /usr/lib/jvm/java-9-openjdk-amd64/lib/amd64/server/libjvm.so /usr/lib To make life easier, I created a wrapper around it using secret to store my password. To send an email notification, I just have to run: IMSecrets::email_me()

RStudio server with synology and docker

SSH into my synology and run: sudo su docker run -d -p 8787:8787 -e USER=<username> -e PASSWORD=<password> andrewheiss/tidyverse-rstanarm Configure the Reverse Proxy Go to Control Panel -> Application Portal -> Reverse Proxy and add the following rules
YOURLS API with R

YOURLS API with R

R
Goal: Create multiple, and trackable, short URLs that point to the same place Tools: YOURLS, R Steps: Installing YOURLS is very easy, particularly if you do it with docker. A container for the database: docker run --name yourlsmysql -e MYSQL_ROOT_PASSWORD=mysecretpassword -d mysql A container for YOURLS: docker run --name yourls -d \ -e YOURL_USER='admin' \ -e YOURL_PASSWORD='mysecretpassword' \ -e YOURLS_SITE='http://sh.tld' \ --link yourlsmysql:mysql bios/docker-yourls To use the web-interface, you need to go to your site.

Hello World!

R
Yihui’s blogdown package is awesome! To create this site i just had to run: blogdown::new_site(theme = "vimux/mainroad") and to create this post just blogdown::new_post(title = "Hello World!")