Social Media Research

02 R Data Analysis


Question

What means "indexing" ?


Answer

Indexing means selecting a subset of the elements in order to use them in further analysis.

R uses square brackets [] to specify the position of values to be extracted. A standard way to index is to specify the position of an element by a number or with help of logical operators.

e.g.

v[2:3]

v[c(1,3)]

v[v > 11 & v < 14] # logical indexing

m[,]




Comments