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, ......

Plotting in R, ggplot2




OBS: order of using commands.


OBS: order of using commands.

3rd dim as group for plot

(paper 2 knn > 820_draft_plotAndTable_testCode.R)

# required data structure:

# k variable value

# 32 8 6.885871

# 64 8 7.345018

# 12......

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

W/R .bin in R

tData = as.integer(2^(1:18))

# make sure what you are writing is the same format (e.g. integer) as reading.

pFileWrite = file('test_data/test.bin', 'wb')

writeBin(tData, pFileWrite, size=4, endian='little')


pFileRead = file('test_data/tes......