ck.crd: Check data for a CRD

View source: R/ck_crd.R

ck.crdR Documentation

Check data for a CRD

Description

This function checks the frequencies of genotypes in a CRD.

Usage

ck.crd(dfr, y, geno)

Arguments

dfr

The name of the data frame.

y

The name of the column for the variable to analyze.

geno

The name of the column that identifies the genotypes.

Value

The number of genotypes (ng), the number of genotypes without data (ng.0), the number of replications (nrep), and the number of rows in the data frame with missing values for factors (nmis.fac).

Author(s)

Raul Eyzaguirre.

Examples

# Create design
dfr <- cr.crd(1:50, 3, 10)
dfr <- dfr$book
# Create some random data
dfr$y <- rnorm(150)
# Delete some values
dfr[c(1, 5, 56, 77, 111), 'y'] <- NA
# Delete some values for classification factors
dfr[c(27, 48), 'geno'] <- NA
# Check the design
ck.crd(dfr, 'y', 'geno')

reyzaguirre/st4gi documentation built on March 29, 2025, 10:38 p.m.