Skip to content

Commit

Permalink
- parse_cardano(): add sep argument and fix dec argument
Browse files Browse the repository at this point in the history
  • Loading branch information
pat-s committed Nov 19, 2021
1 parent 9ec9cd1 commit c7052ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions R/cardano.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#' @template param_pp_lang
#' @template param_securities_account
#' @template param_dec
#' @template param_sep
#' @template param_filename
#'
#' @importFrom readr read_csv write_csv write_csv2 col_double col_datetime
Expand All @@ -28,7 +29,7 @@
#' parse_cardano(cardano, pp_lang = "EN")
parse_cardano <- function(data, pp_security_name = "Cardano", pp_lang = "DE",
securities_account = NULL,
filename = NULL, dec = NULL) {
filename = NULL, dec = NULL, sep = ";") {
if (!inherits(data, "data.frame")) {
data <- readr::read_csv(data, col_types = cols(
date = col_datetime(format = ""),
Expand Down Expand Up @@ -68,7 +69,7 @@ parse_cardano <- function(data, pp_security_name = "Cardano", pp_lang = "DE",
data_mod$`Depot` <- securities_account
}
if (!is.null(filename)) {
readr::write_csv2(data_mod, filename)
write_csv_helper(data_mod, filename, dec)
}
} else if (pp_lang == "EN") {
data_mod <- data %>%
Expand Down
6 changes: 5 additions & 1 deletion man/parse_cardano.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c7052ad

Please sign in to comment.