lazytrade (version 0.4.0)

writeCommandViaCSV: Write csv files with indicated commands to the external system

Description

Function is capable to read the data and writing multiple files e.g. 'SystemControl8139124.csv'

Usage

writeCommandViaCSV(x, path_terminal = "", fileName = "SystemControl")

Arguments

x

- dataframe object with resulting command e.g. 1 - enable; 0 - disable

path_terminal

- path to the terminal

fileName

- desired control file prefix e.g. 'SystemControl'

Value

Function is writing multiple files e.g. 'SystemControl8139124.csv' to the Sandbox

typical content of the file: "Magic","IsEnabled" 8139124,1

Examples

Run this code
# NOT RUN {


library(dplyr)
library(readr)
library(lubridate)
DFT1 <- import_data(trade_log_file = system.file("extdata",
                                                 "OrdersResultsT1.csv",
                                                 package = "lazytrade"),
                    demo_mode = TRUE)

dir <- normalizePath(tempdir(),winslash = "/")
DFT1 %>%
group_by(MagicNumber) %>% select(MagicNumber) %>% mutate(IsEnabled = 0) %>%
# write commands to disable systems
writeCommandViaCSV(path_terminal = file.path(dir))



# }

Run the code above in your browser using DataCamp Workspace