## Using the first example dataset (PhenovatorDat1):
## Fit a model using SpATS on few time points:
# \donttest{
## Create an object of class TP.
phenoTP <- createTimePoints(dat = PhenovatorDat1,
experimentName = "Phenovator",
genotype = "Genotype",
timePoint = "timepoints",
repId = "Replicate",
plotId = "pos",
rowNum = "y", colNum = "x",
addCheck = TRUE,
checkGenotypes = c("check1", "check2",
"check3", "check4"))
## Fit a model with SpATS for three time points.
modPhenoSp <- fitModels(TP = phenoTP,
trait = "EffpsII",
timePoints = c(3, 6, 20))
summary(modPhenoSp)
## Fit a model with SpATS for a single time point with extra fixed factors
## and check genotypes:
modPhenoSpCheck <- fitModels(TP = phenoTP,
trait = "EffpsII",
extraFixedFactors = c("repId", "Image_pos"),
useCheck = TRUE,
timePoints = 3)
## Fit a model with asreml on few time points with a spatial function:
if (requireNamespace("asreml", quietly = TRUE)) {
modPhenoSpAs <- fitModels(TP = phenoTP,
trait = "EffpsII",
timePoints = c(1, 6, 20),
engine = "asreml",
spatial = TRUE)
}
## Using the second example dataset (PhenoarchDat1):
## Fit a model with SpATS on one time points with two variables for
## geno.decomp:
data("PhenoarchDat1")
phenoTParch <- createTimePoints(dat = PhenoarchDat1,
experimentName = "Phenoarch",
genotype = "Genotype",
timePoint = "Date",
plotId = "pos",
rowNum = "Row",
colNum = "Col")
modPhenoSpGD <- fitModels(TP = phenoTParch,
trait = "LeafArea",
geno.decomp = c("Scenario", "population"),
timePoints = 16)
# }
Run the code above in your browser using DataLab