| wide2long | R Documentation |
Convert a table from wide format to long format.
wide2long(x, names = c("Age", "Value"))
x |
a data frame in wide format. |
names |
a vector of two names for the last two columns of the resulting data frame. |
A data frame.
TAF stores tables as data frames, usually with a year column as seen in stock
assessment reports. Although year is the most common dimension, tables may
also include area, sex, season, or other additional dimensions. The
catage.wide table provides an example of a wide table that includes
area and year as dimensions. The long format is more convenient for analysis
and producing plots.
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.
wide2long(catage.wide, names=c("Age","Catch"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.