Ben Chuanlong Du's Blog

And let it direct your passion with reason.

Abuse of Vector in R

R is a language that is friendly to vector operation, so vector is an important data structure in R. A single data (of basic types, e.g., numeric or character) is essentially a vector of length 1. A matrix or an array in R is essentially a vector. R make …