metan (version 1.2.1)

bind_cv: Bind cross-validation objects

Description

Helper function that combines objects of class cv_ammi, cv_ammif or cv_blup. It is useful when looking for a boxplot containing the RMSPD values of those cross-validation procedures.

Usage

bind_cv(..., bind = "boot", sort = TRUE)

Arguments

...

Input objects of class cv_ammi, cv_ammif or cv_blup.

bind

What data should be used? To plot the RMSPD, use 'boot' (default). Use bind = 'means' to return the RMSPD mean for each model.

sort

Used to sort the RMSPD mean in ascending order.

Value

An object of class cv_ammif. The results will depend on the argument bind. If bind = 'boot' then the RMSPD of all models in ... will be bind to a unique data frame. If bind = 'means' then the RMSPD mean of all models in ... will be bind to an unique data frame.

Examples

Run this code
# NOT RUN {
library(metan)
# Two examples with only 5 resampling procedures
AMMI = cv_ammif(data_ge,
                resp = GY,
                gen = GEN,
                env = ENV,
                rep = REP,
                nboot = 5)
BLUP = cv_blup(data_ge,
               resp = GY,
               gen = GEN,
               env = ENV,
               rep = REP,
               nboot = 5)
bind_data = bind_cv(AMMI, BLUP)
plot(bind_data)

print(bind_cv(AMMI, BLUP, bind = 'means'))
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace