-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathget_series.Rd
66 lines (56 loc) · 2.4 KB
/
get_series.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_series_export.R
\name{get_series}
\alias{get_series}
\title{Requests data from multiple data sources.}
\usage{
get_series(
index = NULL,
start_date = default_start_date(),
end_date = default_end_date(),
freq = NULL,
cache = FALSE,
na.remove = TRUE,
verbose = NULL,
...,
source = c("multi", "evds", "fred"),
base = c("multi", "series", "table"),
debug = FALSE
)
}
\arguments{
\item{index}{A character vector or string representing the index to be retrieved.}
\item{start_date}{Limits the start date of the data.}
\item{end_date}{Limits the end date of the data.}
\item{freq}{Frequency of the data (rarely needed).}
\item{cache}{If FALSE, a new request will be made; if TRUE, cached data will be used.}
\item{na.remove}{If TRUE, NA values are removed only if all columns are NA.}
\item{verbose}{If TRUE, prints information during the process; if FALSE, silently does its job.
default is NULL which implies applying default verbose option. If this function is called with
a TRUE or FALSE value it changes global verbose option for \code{Rapi} package.
If verbose option is FALSE it gives a warning only if something goes wrong.}
\item{...}{Additional parameters for future versions.}
\item{source}{Source such as \code{evds} or \code{fred} for internal use at this version.}
\item{base}{Table or series on the source for internal use at this version.}
\item{debug}{Debug option for development.}
}
\value{
An S3 object, Rapi_GETPREP, which has generic functions such as print and excel.
The \code{print} generic provides hints to the user on how to use requested data,
such as creating output with the \code{excel} function or examining requested data in the global environment.
}
\description{
The \code{get_series()} function retrieves data from various sources, including the \code{EDDS} API and \code{FRED} API at this version.
When multiple indexes are provided as a character vector or string template, the function individually
requests each item from the corresponding sources, discerning the source from the item's format.
The function combines data frames when there are common frequencies and returns both a combined data frame and
individual data frames for each requested item.
}
\examples{
\dontrun{
o <- get_series(template_test())
excel(o)
object <- get_series("UNRATE", start_date = "2000/01/01", na.remove = TRUE)
excel(object)
}
}