Learn R Programming

ggroups (version 2.1.2)

tab2mat: Tabular to matrix

Description

Converts tabular data to matrix data.

Usage

tab2mat(tab)

Arguments

tab

: data.frame with 2 integer (IDs) and 1 numeric (values) columns.

Value

Converted data.frame to matrix

Examples

Run this code
# NOT RUN {
ped = data.frame(ID=1:6, SIRE=c(0,0,1,3,1,4), DAM=c(0,0,2,2,2,5))
tab2mat(tabA(ped))

# }

Run the code above in your browser using DataLab