Learn R Programming

backtestGraphics (version 0.1.6)

slice_data: Slice Data Set

Description

This function is part of the Shiny reactive functions. The function looks at what strategy, portfolio and instrument the user selects, and then slices the data set into different pieces or summarizes the data set into a summary.

Usage

slice_data(x, input, capital.num)

Arguments

x
is an input data frame that is to be sliced according to the user's selection of strategy, portfolio and instrument.
input
is a Shiny object that contains all the shiny inputs as a list.
capital.num
is the amount of allocated capital for the portfolio, numeric type. The function will use capital.num to calculate return rates if available, or use everyday's GMV to calculate return rates instead.

Value

A small data set that has been retrieved from the previous data set.