Plot Histogram in R

Plot Histogram in R: Method 1: hist(vector, breaks) Take care for the parameter "breaks": according the help: breaks: a single number giving the number of cells for the histogram. Important:…

0 Comments

matrix calculation in R and Python

Useful packages: R: library(matrixcalc) Python: numpy Matrix generation: R: matrix(1:6, 2, 3) Python: np.arange(1,7).reshape(2,3) construct a diagnal matrix: R: advanced-R diag(vector, nrow, ncol) #construct a matrix which diagonal elements is equal…

0 Comments