create_transposed_data {lazytrade} | R Documentation |
PURPOSE: function gets indicator data in each column. Goal is to splitting this data into periods and transpose the data.
create_transposed_data(x, n = 50)
x |
|
n |
|
each column contains records of the indicator value of the assets every column will be split into chunks of n observations and transposed into rows this repeated for all the columns coming up with a matrix. Function works in combination with a function create_labelled_data
function returns transposed data. Transposed values from every column are stacked one to each other
library(dplyr)
library(magrittr)
library(lazytrade)
# usind a sample data
data(indicator_dataset)
create_transposed_data(indicator_dataset, n = 75)