to_m: Convert time series data to matrix with defined number of...

View source: R/to_m.R

to_mR Documentation

Convert time series data to matrix with defined number of columns

Description

Transforms Time Series Column of the dataframe to the matrix with specified number of columns. Number of rows will be automatically found. Eventually not complete last row will be discarded.

[Superseded]

Usage

to_m(x, n_cols)

Arguments

x
  • dataframe with one column

n_cols
  • number of columns in the matrix

Value

  • matrix with specified amount of rows

Examples


library(magrittr)
library(lazytrade)
macd_m <- seq(1:1000) %>% as.data.frame() %>% to_m(64)



lazytrade documentation built on Sept. 12, 2024, 9:36 a.m.