spd.plot: Plot asreml-spatial data or variogram

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/spd.plot.R

Description

This function plots spatial data for further spatial model or variogram result from spatial model by asreml, etc.

Usage

1
2
3
spd.plot(object, type="data",p.lbls = NULL, key.unit = NULL,
          x.unit = NULL, y.unit = NULL, 
          na = NULL, color.p = NULL, mtitle=NULL,...)

Arguments

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

Value

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

Author(s)

Yuanzhen Lin <yzhlinscau@163.com>

References

Yuanzhen Lin. R & ASReml-R Statistics. China Forestry Publishing House. 2016

See Also

Website for instant update: yzhlin-asreml.ys168.com

Examples

 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)

yzhlinscau/AAfun documentation built on May 21, 2020, 2:19 p.m.