make_numeric: Convert (Zoo) Data Frame to Numeric

Description Usage Arguments Value Examples

Description

Convert (Zoo) Data Frame to Numeric

Usage

1
make_numeric(df, time_var = "year")

Arguments

df

The data frame to be converted (which is not numeric)

time_var

The variable in the dataset which marks the year of the observations. E.g. "year"

Value

The original data frame but in numeric form

Examples

1
2
3
4
5
6
7
8
9
#Souring the data
file = system.file("extdata", "hseinv.txt", package="Kenometrics")
data <- read.delim(file)

#Making the data time-series
TS_data <- make_ts("year", data)

#Converting back to numeric
non_TS_data <- make_numeric(TS_data, "year")

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