RP: Week 1

####Basic atomic classes of objects

####Vector vs List

Vector: objects of the same class

vector(<class>, <length>)

List: can contain objects of different classes

####Numbers

####Attributes

####Assignment

<-

####Integer sequence

1:20

####Creating vectors

####Explicit coercion

####Matrices

####Factors

####Missing values

####Data frames

####Names

R objects can have names

names()

List elements can also have names

dimnames()

###Subsetting

####Subsetting a Matrix

drop = FALSE will result in a matrix otherwise will result in a vector(in most case)

####Partial matching

x<-list(aardvark=1:5)
x$a #aardvark
x[["a", exact = FALSE]]

####Reading and writing data

Your Comments

comments powered by Disqus