Learn R Programming

lares (version 4.8.4)

stocks_file: Get Personal Portfolio's Data

Description

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

Usage

stocks_file(
  filename = NA,
  creds = NA,
  auto = TRUE,
  sheets = c("Portafolio", "Fondos", "Transacciones"),
  keep_old = TRUE
)

Arguments

filename

Character. Import a local Excel file

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

keep_old

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

See Also

Other Investment: daily_portfolio(), daily_stocks(), etf_sector(), splot_change(), splot_etf(), splot_growth(), splot_roi(), splot_summary(), splot_types(), stocks_hist(), stocks_obj(), stocks_quote(), stocks_report()

Other Credentials: db_download(), f1_contacts(), geoAddress(), get_credentials(), get_tweets(), mailSend(), queryDB(), queryGA(), slackSend(), stocks_report()

Examples

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

Run the code above in your browser using DataLab