Description Usage Arguments Value Author(s) References See Also Examples
This function plots spatial data for further spatial model or variogram result from spatial model by asreml, etc.
1 2 3 |
object |
Aim dataset |
type |
Type of dataset, "data" or "variogram" |
p.lbls |
Extra labels in figure title |
key.unit |
The unit of key |
x.unit |
Axis x least unit |
y.unit |
Axis y least unit |
na |
Transform NA to 0(na=0) or keep NA (default) |
color.p |
Parameters of the colors for figures |
mtitle |
Figure title |
type |
Dataset type, default value is "data", when "variogram" for variogram.plot in spatial analysis in ASReml-R. |
key.unit |
Key unit, default value is empty. |
x.unit |
Axis x least unit, default value is 1. |
y.unit |
Axis y least unit, default value is 1. |
na |
Control NA value, default value is 1 to keep NA. |
color.p |
Parameters of the colors for figures, default value is terrain.colors, it could be rainbow, heat.colors, cm.colors and topo.colors, ... |
mtitle |
Figure title |
Yuanzhen Lin <yzhlinscau@163.com>
Yuanzhen Lin. R & ASReml-R Statistics. China Forestry Publishing House. 2016
Website for instant update: yzhlin-asreml.ys168.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | library(AAfun)
######## example 1 plot regular spatial data
data(barley)
aim.trait<-subset(barley,select=c(Row,Column,yield))
spd.plot(aim.trait)
spd.plot(aim.trait,color.p=topo.colors)
spd.plot(aim.trait,key.unit="Kg")
spd.plot(aim.trait,p.lbls="barley",x.unit=2,y.unit=1)
#AR1×AR1 model to plot variogram
barley1.asr<-asreml(yield~Variety, rcov =~ ar1(Row):ar1(Column), data=barley)
summary(barley1.asr)$varcomp
plot(variogram(barley1.asr),main="M1")
aa=variogram(barley1.asr)
spd.plot(aa,type="variogram",color.p=topo.colors)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.