mmat: Make a two-way table based on categorical and numerical...

Description Usage Arguments Author(s) Examples

View source: R/mmat.R

Description

This function help users to easely make a two-way table from a "long format" data.

Usage

1
mmat(data, row, col, value)

Arguments

data

The dataset. Must contains at least two categorical columns.

row

The column of data in which the mean of each level will correspond to one line in the output.

col

The column of data in which the mean of each level will correspond to one column in the output.

value

The column of data that contains the values to fill the two-way table.

Author(s)

Tiago Olivoto [email protected]

Examples

1
2
3
4
5
6
datage = expand.grid(ENV = paste("E", 1:8, sep = ""),
                     GEN = paste("G", 1:20, sep = ""),
                     REP = paste(c("I", "II", "III")))
datage$Y = rnorm(480, 50, 20)
matrix = mmat(datage, row = GEN, col = ENV, val = Y)
matrix

TiagoOlivoto/WAASB documentation built on April 1, 2019, 10:25 a.m.