Description Usage Arguments Value Examples
Function returns a data frame with row names as years
1 | years_to_rownames(data, column_year)
|
data |
a data frame to be manipulated |
column_year |
string specifying a column with years |
a data frame with years as row names
1 2 3 4 5 6 | data <- data.frame(years = seq(1950, 2015), observations = rnorm(66))
new_data <- years_to_rownames(data = data, column_year = "years")
data <- data.frame(observations1 = rnorm(66), years = seq(1950, 2015),
observations2 = rnorm(66), observations3 = rnorm(66))
new_data <- years_to_rownames(data = data, column_year = "years")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.