metaGE.incidence {metaGE} | R Documentation |
Create the matrix of incidence.
Description
The function metaGE.incidence convert categorical variable describing the environments into a matrix of dummy variables with in rows the levels of the variables and in columns the environment.
Usage
metaGE.incidence(VarName, Covariate, EnvName, Data, AtLeast = 1)
Arguments
VarName |
The name of the column containing the categorical variable in the Covariate dataset. |
Covariate |
A dataset containing categorical variables (in columns) describing the environments (in rows). |
EnvName |
The name of the column containing the names of the environment in the Covariate dataset. |
Data |
A dataset containing the effects and pvalues of each marker (in rows) in each environment (in columns), as obtained from metaGE.collect. |
AtLeast |
A numeric value indicating the minimum number of environments must belong to each level (equals 1 by default). |
Details
The names of the environment must be the same as used in the Data dataset.
Value
A binary matrix containing indicator variables with in rows the levels of the variables and in columns the environment.
Examples
# Import the data
data("metaData")
data("envDesc")
# Build the matrix of incidence
(Incidence.Temp <- metaGE.incidence(VarName = "Temp",Covariate = envDesc,
EnvName = "ShortName", Data = metaData))