Learn R Programming

agridat (version 1.12)

ortiz.tomato: Tomato weight/yield and environmental covariates in Latin America

Description

Tomato weight/yield and environmental covariates in Latin America

Arguments

Format

A list of three matrices, yield, weight, and covs. See details below.

Details

The yield matrix contains average marketable fruit yield (t / ha) for 8 open-pollinated and 7 hybrid tomatos in 18 environments. The weight matrix contains average fruit weight (g).

The environment locations and codes are: Estanzuela, Guatemala (E04), Baja Verapaz, Guatemala, (E05), Cogutepeque, El Salvador (E06), San Andres, El Salvador (E07), Comayagua, Honduras (E11), Valle de Sabaco, Nicaragua (E14), San Antonio de Belen, Costa Rica (E15), San Cristobal, Dominican Republic (E20), Constanza, Dominican Republic (E21), Palmira, Colombia (E27), La Molina, Peru (E40), Santiago, Chile (E41), Chillan, Chile (E42), Curacavi, Chile (E43), Colina, Chile (44), Belem, Brazil (E50), Caacupe, Paraguay (E51), Centeno, Trinidad Tobago (E53).

The covs matrix contains 16 environmental covariates.

Lat Latitude
Long Longitude
MxT Max temperature (C)
MnT Min temperature (C)
MeT Mean temperature (C)
Prec Precipitation (mm)
Day Degree days (base 10)
pH Soil pH
OM Organic matter (percent)
P Phosphorous (ppm)
K Potassium (me/100 g)
ExN Extra nitrogen (kg / ha)
ExP Extra phosphorous (kg / ha)
ExK Extra potassium (kg / ha)
Trim Trimming (0/1)
Driv Drivings (0/1)
Irr Irrigation (0/1)
Dha Days to harvest

Examples

Run this code
# NOT RUN {
data(ortiz.tomato)
# Double-centered yield matrix
Y <- ortiz.tomato$yield
Y <- sweep(Y, 1, rowMeans(Y, na.rm=TRUE))
Y <- sweep(Y, 2, colMeans(Y, na.rm=TRUE))

# Standardized covariates
X <- ortiz.tomato$covs
X <- X[,c("MxT", "MnT", "MeT", "Prec", "Day", "pH", "OM", "P", "K",
          "ExN", "ExP", "ExK", "Trim", "Driv", "Irr", "Dha")]
X <- scale(X)

# Now, PLS relating the two matrices.
# Note: plsr deletes observations with missing values
if(require(pls)){
m1 <- plsr(Y~X)
# Inner-product relationships similar to Ortiz figure 1.
biplot(m1, which="x", var.axes=TRUE, main="ortiz.tomato - env*cov biplot")
#biplot(m1, which="y", var.axes=TRUE)
}

# }

Run the code above in your browser using DataLab