Currently reading articles under label: R

Install R in Ubuntu

UBUNTU 16.04

Option 1:

sudo apt-get install -y r-base r-base-dev libcurl4-openssl-dev libssl-dev build-essential

Option 2 (to get newer R version):

with PPA. ref digitalocean

sudo apt install apt-transport-https && \

sudo apt-key adv --keyserver --recv-keys E298A3A825......

R, Rarallel, HPC and Multi-core in R

Three methods.

//TODO: summary of: paper3 gpu 430.R

R DT data.table Join

This is part of PML notes. HDD: r_data_table_start

Prepare Data




hero = "

name, alignment, gender, publisher

Magneto, bad, male, MarvelDuplicate

Storm, good, female, MarvelDuplicate

Batman, good, male, ......

Plot in R, ggplot2

Note: this blog is mainly used to prepare data, for plotting code, see:

O'Reilly 2013 - R Graphics Cookbook

ggplot2 cheatsheet

Be Awesome in ggplot2: A Practical Guide, (bak)



OBS: order of using commands.


OBS: order of using commands.

3rd dim as group for plot


Notes of Practical Machine Learning (Coursera PML)

It has been a long time since I started using R. Recently, I found some old notes, and I prefer to put it in digital archive, this blog post is to achieve the purpose.

DT (data.table)

data.table cheat sheet

This data.table (DT) instruction is also available on my github, ispiared by

this ref


Cross-Read & -Write R, Py, Matlab, Binary Files

Note: feather-format is desigend to transfer data between Py & R [stackoverflow, feather-doc].


OBS: only for data.frame type, not even arrays.

py (feather-format)

Requires: pip install feather-format. (OBS: feather-format NOT feather.)


import numpy as np

import pandas as pd

df =......