remove_spatialtrend: Remove spatial trend

View source: R/remove_spatialtrend.R

remove_spatialtrendR Documentation

Remove spatial trend

Description

Removes spatial trend to prepare for multi-trait Stage 1

Usage

remove_spatialtrend(filename, traits, spline, effects = NULL)

Arguments

filename

Name of CSV input file

traits

trait names

spline

vector of variable names for 2D spline with SpATS

effects

data frame specifying other effects in the model (see Details)

Details

SpATS used to remove 2D spatial trend for each field experiment, labeled with column 'expt' in the input file. Genotype labels are in column 'id' and modeled as i.i.d random effect. Argument effects is used to specify other i.i.d. effects besides genotype and has three columns: name, fixed, factor. The "name" column is a string that must match a column in the input file. The fixed column is a logical variable to indicate whether the effect is fixed (TRUE) or random (FALSE). The factor column is a logical variable to indicate whether the effect is a factor (TRUE) or numeric (FALSE).

Argument traits is a character vector of trait names. Single-trait analyses are performed for each trait, and the results are combined in the output.

Value

Data frame with adjusted phenotypes


jendelman/StageWise documentation built on Feb. 23, 2025, 11 a.m.