make_ts: Make Time Series

Description Usage Arguments Value Examples

Description

Convert the entire dataset to time-series data type

Usage

1
make_ts(time_vars, df, vars = "all")

Arguments

time_vars

The variable in the dataset which marks the year of the observations. E.g. "year". If there are separate year and month variables, use a vector with the year variable first and the month variable second. E.g. c("year", "month")

df

The dataframe which needs to be made a time series data

vars

A vector of variable names, e.g. c("pop", "inv", )

Value

The new dataset

Examples

1
2
3
file = system.file("extdata", "hseinv.txt", package="Kenometrics")
data <- read.delim(file)
TS_data <- make_ts("year", data)

pointonjoel/Kenometrics documentation built on Jan. 24, 2021, 6:05 a.m.