Extract a JVS report from CSV files containing the diagnostics matrix and the output series.
Arguments
- dir
path to the directory containing the
demetra_m,y,sa,sandifiles.- demetra_m
dataframe containing the diagnostics matrix. If missing, the file is searched for in
dir.- y
dataframe containing the initial series. If missing, the file is searched for in
dir.- sa
dataframe containing the seasonally adjusted series. If missing, the file is searched for in
dir.- s
dataframe containing the seasonal component of the series. If missing, the file is searched for in
dir.- i
dataframe containing the irregular component series. If missing, the file is searched for in
dir.- ...
Other parameters to pass to
read_demetra_msuch assep(the separator used in the csv file. By default,sep = ";") anddec(the decimal separator used in the csv file. By default,dec = ",")
Value
a JVS_matrix object.
Details
This function generates a JVS report from a CSV file containing
diagnostics (usually from the file demetra_m.csv) and from the csv files
containing the initial series (file series_y.csv), the seasonally adjusted
series (file series_sa.csv), the seasonal component of the series (file
series_s.csv) and the irregular component of the series (file
series_i.csv).
The demetra_m.csv file can be generated by launching the cruncher
(functions cruncher or
cruncher_and_param) with the default export
parameters, having used the default option csv_layout = "vtable" to
format the output tables of the functions
cruncher_and_param and
create_param_file when creating the parameters
file.
The files series_y.csv, series_sa.csv, series_s.csv,
series_i.csv can be obtained from the associated GUI or R packages.
Dates must appear in the first column.
This function returns a JVS_matrix object, which is a data.frame
containing several indications on the seasonal adjustment of the series.
If all data frames (demetra_m, y, sa, s and i) are supplied,
the dir argument is ignored. Otherwise, dir should point to the
directory containing the corresponding CSV files.
Examples
# Path leading to the directory containing the needed files
dir_path <- system.file(
"extdata",
"WS/WS_world/Output/SAProcessing-1",
package = "JDCruncheR"
)
# Extract the JVS report from the directory
JVS <- extract_JVS(dir = dir_path)