# \donttest{
## load example data from hypred package
data(hybrid_phe)
data(input_geno)
## convert original genotype
inbred_gen <- convertgen(input_geno, type = "hmp2")
##additive model infer the additive and dominance genotypes of hybrids
gena <- infergen(inbred_gen, hybrid_phe)$add
gend <- infergen(inbred_gen, hybrid_phe)$dom
##additive model
R2<-cv(fix=NULL,gena,gend=NULL,y=hybrid_phe[,3],method ="GBLUP",nfold=5,nTimes=1,seed=1234,CPU=1)
##additive-dominance model
R2<-cv(fix=NULL,gena,gend,y=hybrid_phe[,3],method ="GBLUP",nfold=5,nTimes=1,seed=1234,CPU=1)# }
Run the code above in your browser using DataLab