R fundamental 2

2.1 Objects

Objects are the entities where R operates on. Their mode contains numeric, complex, logical, character and raw, which all are known as atomic structures, others are lists, function, expression. To check the type, using command:

> mode(z)

> complex (if assuming z is a complex vectot of length 100.

For changes of mode ,

> z <- 0:3

> digits <- as.character(z), the result of digits, would be vector c("0", "1", "2", "3")

2.2 Length 0f objects

> length(x) (if assuming x is a vector 0f length 10)

>10

 

你可能感兴趣的:(R fundamental 2)