Description Usage Arguments Author(s) Examples
Make a new array list, which is just a special type of list where each element has a name that corresponds to the variable's name. Each element should be an array with dimnames that match the variable names that run along the edges of the array.
1 |
... |
Toby Dylan Hocking <toby.hocking@inria.fr>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(alplot)
data(BodyWeight,package="nlme")
attach(BodyWeight)
al <-
arraylist(weight=t(narray(weight,Time,Rat)),
time=narray(unique(Time),Time),
Diet=narray(factor(Diet[Time==1]),Rat))
detach(BodyWeight)
print(al)
object.size(BodyWeight)/object.size(al)
alplot <- plot(al,weight~time|Diet,groups=Rat,type="l",layout=c(3,1))
print(alplot)
require(latticeExtra)
usual <- xyplot(weight~Time|Diet,BodyWeight,groups=Rat,type="l",layout=c(3,1))
c(arraylist=alplot,data.frame=usual)
##plot(al,~weight|time,densityplot,groups=Diet)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.