## The data from the Phenovator platform have been corrected for spatial
## trends and outliers for single observations have been removed.
## Fit P-Splines on a subset of genotypes
subGeno <- c("G070", "G160")
fit.spline <- fitSpline(inDat = spatCorrectedVator,
trait = "EffpsII_corr",
genotypes = subGeno,
knots = 50)
## Extract the data.frames with predicted values and P-Spline coefficients.
predDat <- fit.spline$predDat
head(predDat)
coefDat <- fit.spline$coefDat
head(coefDat)
## Visualize the P-Spline predictions for one genotype.
plot(fit.spline, genotypes = "G160")
## Visualize the P-Spline predictions and first derivatives for one plant.
plot(fit.spline, plotIds = "c10r29", plotType = "predictions")
plot(fit.spline, plotIds = "c10r29", plotType = "derivatives")
Run the code above in your browser using DataLab