Skip to contents

This function lets the user create his portfolio's full report with plots and send it to an email with the HTML report attached

Usage

stocks_report(
  data = NA,
  keep_old = TRUE,
  dir = NA,
  mail = FALSE,
  attachment = TRUE,
  to = "laresbernardo@gmail.com",
  sectors = FALSE,
  keep = FALSE,
  creds = NA,
  cache = TRUE
)

Arguments

data

Character. stocks_obj() output. If NA, automatic parameters and stocks_file() defaults will be used.

keep_old

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

dir

Character. Directory for HTML report output. If set to NA, current working directory will be used. If mail sent, file will be erased

mail

Boolean. Do you want to send an email with the report attached? If not, an HTML file will be created in dir

attachment

Boolean. Create and add report as attachment if mail=TRUE? If not, no report will be rendered and only tabulated summaries will be included on email's body.

to

Character. Email to send the report to

sectors

Boolean. Return sectors segmentation for ETFs?

keep

Boolean. Keep HTML file when sent by email?

creds

Character. Credential's user (see get_creds()) for sending mail and Dropbox interaction.

cache

Boolean. Use daily cache if available?

Value

Invisible list. Aggregated results and plots.

Examples

if (FALSE) {
list <- stocks_obj()
stocks_report(list, dir = "~/Desktop")
}