View source: R/qedata_define.R
| horizon | R Documentation |
This function reclassifies specified columns of a data.table to the 'qe.horizon' format if column names are provided. If no column names are provided, it returns the names of columns that are already classified as 'qe.horizon'.
horizon(x, ...)
x |
A data.table. The data.table containing the columns to be reclassified or checked. |
... |
Additional arguments specifying the names of the columns to be reclassified. |
The modified data.table with specified columns reclassified as 'qe.horizon', or a character vector of column names already classified as 'qe.horizon'.
library(data.table)
dt <- data.table(a = 1:5, b = 6:10)
# Reclassify columns 'a' and 'b' as 'qe.horizon'
dt <- horizon(dt, "a", "b")
# List columns classified as 'qe.horizon'
horizon_columns <- horizon(dt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.