replace.dates: replace.dates

Description Usage Arguments Value

Description

Replaces query dates with a vector of dates specified by the user. Function will error if length(dates) is not the same as dates found by find.dates.

Usage

1
2
3
replace.dates(text, dates, date.reg = "\\d+[/-]\\d+[/-]\\d+",
  text.split = function(x) x %>% as.character %>% strsplit(" ") %>%
  unlist, text.combine = function(x) paste(x, collapse = " "))

Arguments

text

- query as a single character string

dates

- a vector of dates to replace in the query. Function will error if length(dates) != length(find.dates(text,T))

Value

Function returns the original query text, but with the new dates.


christiantillich/AnaliTools documentation built on May 13, 2019, 6:59 p.m.