Skip to contents

This function lets the user download his personal Excel with his Portfolio's data, locally or from Dropbox.

Usage

stocks_file(
  file = NA,
  creds = NA,
  auto = TRUE,
  sheets = c("Portafolio", "Fondos", "Transacciones"),
  keep_old = TRUE,
  cache = TRUE,
  quiet = FALSE
)

Arguments

file

Character. Import an Excel file, local or from URL.

creds

Character. Dropbox's credentials (see get_creds())

auto

Boolean. Automatically use my local personal file? You might want to set in into your .Renviron LARES_PORTFOLIO=~/dir/to/your/file.xlsx so you can leave all other parameters as NA and use it every time.

sheets

Character Vector. Names of each sheet containing Portfolio summary, Cash, and Transactions information. Please, keep the order of these tabs.

keep_old

Boolean. Include sold tickers even though not currently in portfolio?

cache

Boolean. Use daily cache if available?

quiet

Boolean. Keep quiet? If not, informative messages will be printed.

Value

List with portfolio, transactions, and cash data.frames.

Examples

if (FALSE) {
# Load lares dummy portfolio XLSX
file <- system.file("inst/docs", "dummyPortfolio.xlsx", package = "lares")
df <- stocks_file(
  file = file,
  sheets = c("Portafolio", "Fondos", "Transacciones"),
  keep_old = FALSE
)
}