# NOT RUN {
data(eco2)
# original data
data1 <- matrix(eco2[["P"]][,1], 30, 30)
image(data1)
# original data + trend
data2 <- matrix(eco2[["P"]][,2], 30, 30)
image(data2)
# data detrending
data2.det <- eco.detrend(Z = eco2[["P"]][,2], XY = eco2[["XY"]], degree = 1)
#-----------------------
# ACCESSORS USE EXAMPLE
#-----------------------
# the slots are accesed with the generic format
# (ecoslot. + name of the slot + name of the object).
# See help("EcoGenetics accessors")
data2.det <- ecoslot.RES(data2.det) # detrended data in slot RES
data2.det <- matrix(data2.det[,1], 30, 30)
image(data2.det)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab