Learn R Programming

TAF (version 4.3.0)

wide2long: Convert Wide Table to Long Format

Description

Convert a table from wide format to long format.

Usage

wide2long(x, names = c("Age", "Value"))

Value

A data frame.

Arguments

x

a data frame in wide format.

names

a vector of two names for the last two columns of the resulting data frame.

See Also

catage.taf and catage.wide describe the TAF and wide formats.

taf2long converts a TAF table to long format.

TAF-package gives an overview of the package.

Examples

Run this code
wide2long(catage.wide, names=c("Age","Catch"))

Run the code above in your browser using DataLab