match_helpers: Helpers for matching common financial columns

Description Usage Arguments Details Examples

Description

Extensions of the family of "select helpers" from tidyselect like tidyselect::contains() and tidyselect::matches(). matches_ohlca() selects the columns open, high, low, close, and adjusted. matches_ohlcav() additionally matches volume.

Usage

1
2
3

Arguments

vars

A character vector of variable names. When called from inside selecting functions like dplyr::select() these are automatically set to the names of the table.

Details

As a user, you should rarely, if ever, need to specify vars.

Examples

1
2
3
4
5
6
7
8
data(FANG)

dplyr::select(FANG, matches_ohlca())

FANG %>%
  as_tbl_time(date) %>%
  dplyr::group_by(symbol) %>%
  calculate_return(matches_ohlca())

DavisVaughan/tidyfinance documentation built on May 24, 2019, 8:46 p.m.