Extension for formula-based plotting
1 2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | par(mfrow=c(1,2))
plotBy(log(Sepal.Length) + Petal.Length ~ Sepal.Width | Species, data=iris, fit="gam")
par(mfrow=c(1,2))
plotBy(log(Sepal.Length) + Petal.Length ~ Sepal.Width | Species, data=iris, fit="lm")
par(mfrow=c(1,2))
plotBy(log(Sepal.Length) + Petal.Length ~ Sepal.Width | Species, data=iris, how="colour")
par(mfrow=c(2,3))
plotBy(log(Sepal.Length) + Petal.Length ~ Sepal.Width | Species, data=iris, how="panel")
par(mfrow=c(1,1))
chickw <- subset(ChickWeight, !Chick %in% c("18","16"))
plotBy(weight ~ Time|Chick, fit="gam", data=chickw, kgam=5, linecols="black", band=F, lwd=1)
plotBy(weight ~ Time|Chick, type='l', data=chickw)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.