Learn R Programming

pheno (version 1.0)

raw2matrix: Converts a numeric data frame to matrix

Description

Converts a numeric data frame D with three columns (x, factor 1, factor 2) in a matrix M where rows are ranks of levels of factor 1 and columns are ranks of levels of factor 2, missing values are set to 0.

Usage

raw2matrix(D)

Arguments

D
Data frame with three columns (x, factor 1, factor 2)

Value

  • MNumeric matrix where rows are ranks of levels of factor 1 and columns are ranks of levels of factor 2, missing values are set to 0.

Examples

Run this code
data(DWD)
	raw2matrix(DWD)

Run the code above in your browser using DataLab