Learn R Programming

lazytrade (version 0.5.4)

import_data: Import Data file with Trade Logs to R.

Description

Function is capable to import file with executed trades log. Files do not have column headers hence function will take care to name columns as well as to perform relevant cleansing

[Stable]

Usage

import_data(path_sbxm, trade_log_file)

Value

Function will return the dataframe with trade data and automatically set proper column types

Arguments

path_sbxm
  • String, Path to the sandbox with the log file where the file with data is written

trade_log_file
  • String, File name where the order results are written

Author

(C) 2019, 2020 Vladimir Zhbanko

Examples

Run this code

library(lazytrade)
library(dplyr)
library(readr)
library(lubridate)

path_sbxm <- normalizePath(tempdir(),winslash = "/")

file.copy(from = system.file("extdata", "OrdersResultsT1.csv", package = "lazytrade"),
          to = file.path(path_sbxm, "OrdersResultsT1.csv"), overwrite = TRUE)

DFT1 <- import_data(path_sbxm = path_sbxm,
                    trade_log_file = "OrdersResultsT1.csv")



Run the code above in your browser using DataLab