years_to_rownames: Function returns a data frame with row names as years

Description Usage Arguments Value Examples

Description

Function returns a data frame with row names as years

Usage

1
years_to_rownames(data, column_year)

Arguments

data

a data frame to be manipulated

column_year

string specifying a column with years

Value

a data frame with years as row names

Examples

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")

jernejjevsenak/dendroTools documentation built on June 5, 2019, 4:06 a.m.