Monday 27 July 2015

R: str function


“str”  function displays internal structure of R object.  “str” function is mainly sed in debugging.
> x <- c(1:10)
> str(x)
 int [1:10] 1 2 3 4 5 6 7 8 9 10
> 
> x<-matrix(c(1:15), nrow=3, ncol=5)
> str(x)
 int [1:3, 1:5] 1 2 3 4 5 6 7 8 9 10 ... 


Prevoius                                                 Next                                                 Home

No comments:

Post a Comment