Package 'rjd3providers'

Title: Interface to 'JDemetra+ 3.x' time series analysis software.
Description: Interface to 'JDemetra+ 3.x' (<https://github.com/jdemetra>) time series analysis software. It offers full acces to txt, csv, xml and spreadsheets files whicha are meant to be read by JDemetra+ Graphical User Interface.
Authors: Jean Palate [aut], Alessandro Piovani [aut, cre], Tanguy Barthelemy [ctb, art]
Maintainer: Alessandro Piovani <[email protected]>
License: EUPL
Version: 3.2.3.9000
Built: 2024-11-09 05:38:54 UTC
Source: https://github.com/rjdverse/rjd3providers

Help Index


Generates a java moniker for the corresponding id

Description

Generates a java moniker for the corresponding id

Generates a java moniker for the corresponding id

Usage

.spreadsheet_moniker(id)

.spreadsheet_moniker(id)

Arguments

id

Check existing JD+ object

Description

Check existing JD+ object

Usage

check_information(jws, idx_sap = NULL, idx_sai = NULL)

Arguments

jws

the workspace object

idx_sap

the index (or the indices) of the SA-Processing (s) to check

idx_sai

the index (or the indices) of the SA-Item(s) to check.

Details

If the object idx_sai is NULL then the function will only check if the workspace contains a SA-Processing at the index idx_sap. If the object idx_sap is NULL then the function will check if every SA-Processing of the workspace contains a SA-Item at the index idx_sai. If the object idx_sap is NULL and idx_sai is NULL then the function will check nothing.

If the object idx_sap and / or idx_sai have a length > 1 then the checks are iterated over all the indices.

Value

This function return either a boolean (TRUE) if the SAI and the SAP exist in the WS, or an error specifying the not found object.

Examples

# library("rjd3workspace")
# ws <- rjd3workspace::.jws_open(file = "ws_production.xml")
#
# # Check if the SA-Item n°3 in the SA-Processing n°1 exist
# check_information(jws = ws, idx_sap = 1, idx_sai = 3)
#
# # Check if the SA-Items 1, 2 and 5 in the SA-Processing n°1 exist
# check_information(jws = ws, idx_sap = 1, idx_sai = c(1, 2, 5))

Title

Description

Title

Usage

set_spreadsheet_paths(paths)

Arguments

paths

Title

Description

Title

Usage

set_txt_paths(paths)

Arguments

paths

Set the paths of the provider

Description

Set the paths of the provider

Usage

set_xml_paths(paths)

Arguments

paths

Examples

set_xml_paths(system.file("examples", package = "rjd3providers"))

Change the file of a moniker

Description

Change the file of a moniker

Usage

spreadsheet_change_file(id, nfile, ofile = NULL)

Arguments

id

Identifier of the series (from its moniker)

nfile

New file name

ofile

Old file name. NULL or "" to change any file to the new file


Title

Description

Title

Usage

spreadsheet_content(file)

Arguments

file

Title

Description

Title

Usage

spreadsheet_data(
  file,
  sheet = 1,
  period = 0,
  aggregation = c("None", "Sum", "Average", "First", "Last", "Max", "Min"),
  partialAggregation = FALSE,
  cleanMissings = TRUE,
  fullNames = FALSE
)

Arguments

fullNames

Examples

set_spreadsheet_paths(system.file("examples", package = "rjd3providers"))
xls_all <- spreadsheet_data("Insee.xlsx", 1)

Gets the list of the properties corresponding to the identifier of a moniker

Description

Gets the list of the properties corresponding to the identifier of a moniker

Usage

spreadsheet_id_properties(id)

Arguments

id

Title

Description

Title

Usage

spreadsheet_name()

Title

Description

Title

Usage

spreadsheet_series(
  file,
  sheet = 1,
  series = 1,
  period = 0,
  aggregation = c("None", "Sum", "Average", "First", "Last", "Max", "Min"),
  partialAggregation = FALSE,
  cleanMissings = TRUE,
  fullName = TRUE
)

Arguments

fullName

Generates the id corresponding to a list of properties

Description

Generates the id corresponding to a list of properties

Usage

spreadsheet_to_id(props)

Arguments

props

Update the path of a spreadsheet in a workspace

Description

Update the path of a spreadsheet in a workspace

Usage

spreadsheet_update_path(jws, new_path, idx_sap = NULL, idx_sai = NULL)

Arguments

jws

the workspace object

new_path

the new raw data path of the spreadsheet

idx_sap

the index (or the indices) of the SA-Processing (s) to check

idx_sai

the index (or the indices) of the SA-Item(s) to check.

Details

The spreadsheet file must be a .xlsx file. .xls file are no longer accepted.

Value

This function return either NULL if the updating were successfull, or an error.

Examples

# library("rjd3workspace")
# ws <- rjd3workspace::.jws_open(file = "ws_production.xml")
#
# # Update all the second SA-Processing with a new path
# spreadsheet_update_path(
#     jws = jws_object,
#     new_path = normalizePath("./data/IPI_nace4.xlsx", mustWork = TRUE),
#     idx_sap = 2L
# )

Title

Description

Title

Usage

txt_change_file(id, nfile, ofile = NULL)

Arguments

id

Identifier of the series (from its moniker)

nfile

New file name

ofile

Old file name. NULL or "" to change any file to the new file


Title

Description

Title

Usage

txt_content(
  file,
  fmt.locale = NULL,
  fmt.date = NULL,
  fmt.number = NULL,
  fmt.ignoreNumberGrouping = TRUE,
  gathering.period = 0,
  gathering.aggregation = c("None", "Sum", "Average", "First", "Last", "Max", "Min"),
  gathering.partialAggregation = FALSE,
  gathering.includeMissing = TRUE,
  charset = NULL,
  delimiter = c("TAB", "SEMICOLON", "COMMA", "SPACE"),
  txtQualifier = c("NONE", "QUOTE", "DOUBLE_QUOTE"),
  header = TRUE,
  skip = 0
)

Arguments

skip

Examples

set_txt_paths(system.file("examples", package = "rjd3providers"))
txt_all <- txt_content("ABS.csv", delimiter = "COMMA")

Title

Description

Title

Usage

txt_data(
  file,
  fmt.locale = NULL,
  fmt.date = NULL,
  fmt.number = NULL,
  fmt.ignoreNumberGrouping = TRUE,
  gathering.period = 0,
  gathering.aggregation = c("None", "Sum", "Average", "First", "Last", "Max", "Min"),
  gathering.partialAggregation = FALSE,
  gathering.includeMissing = TRUE,
  charset = NULL,
  delimiter = c("TAB", "SEMICOLON", "COMMA", "SPACE"),
  txtQualifier = c("NONE", "QUOTE", "DOUBLE_QUOTE"),
  header = TRUE,
  skip = 0
)

Arguments

skip

Examples

set_txt_paths(system.file("examples", package = "rjd3providers"))
all <- txt_data("ABS.csv", delimiter = "COMMA")

Gets the list of the properties corresponding to the identifier of a moniker

Description

Gets the list of the properties corresponding to the identifier of a moniker

Usage

txt_id_properties(id)

Arguments

id

Title

Description

Title

Usage

txt_name()

Title

Description

Title

Usage

txt_series(
  file,
  series,
  fmt.locale = NULL,
  fmt.date = NULL,
  fmt.number = NULL,
  fmt.ignoreNumberGrouping = TRUE,
  gathering.period = 0,
  gathering.aggregation = c("None", "Sum", "Average", "First", "Last", "Max", "Min"),
  gathering.partialAggregation = FALSE,
  gathering.includeMissing = TRUE,
  charset = NULL,
  delimiter = c("TAB", "SEMICOLON", "COMMA", "SPACE"),
  txtQualifier = c("NONE", "QUOTE", "DOUBLE_QUOTE"),
  header = TRUE,
  skip = 0
)

Arguments

skip

Examples

set_txt_paths(system.file("examples", package = "rjd3providers"))
txt_5 <- txt_series("ABS.csv", series = 15, delimiter = "COMMA")

Generates the id corresponding to a list of properties

Description

Generates the id corresponding to a list of properties

Usage

txt_to_id(props)

Arguments

props

Update the path of a txt/csv file in a workspace

Description

Update the path of a txt/csv file in a workspace

Usage

txt_update_path(jws, new_path, idx_sap = NULL, idx_sai = NULL)

Arguments

jws

the workspace object

new_path

the new raw data path of the text data

idx_sap

the index (or the indices) of the SA-Processing (s) to check

idx_sai

the index (or the indices) of the SA-Item(s) to check.

Value

This function return either NULL if the updating were successfull, or an error.

Examples

# library("rjd3workspace")
# ws <- rjd3workspace::.jws_open(file = "ws_production.xml")
#
# # Update all the second SA-Processing with a new path
# spreadsheet_update_path(
#     jws = jws_object,
#     new_path = normalizePath("./data/IPI_nace4.csv", mustWork = TRUE),
#     idx_sap = 1L
# )

Change the file of a moniker

Description

Change the file of a moniker

Usage

xml_change_file(id, nfile, ofile = NULL)

Arguments

id

Identifier of the series (from its moniker)

nfile

New file name

ofile

Old file name. NULL or "" to change any file to the new file


Title

Description

Title

Usage

xml_content(file, charset = NULL)

Arguments

file

Examples

set_xml_paths(system.file("examples", package = "rjd3providers"))
xml_content("Prod.xml")

Title

Description

Title

Usage

xml_data(file, collection = 1, charset = NULL, fullNames = FALSE)

Arguments

fullNames

Examples

set_xml_paths(system.file("examples", package = "rjd3providers"))
xml_all <- xml_data("Prod.xml", 1, charset = "iso-8859-1")

Gets the list of the properties corresponding to the identifier of a moniker

Description

Gets the list of the properties corresponding to the identifier of a moniker

Usage

xml_id_properties(id)

Arguments

id

Examples

set_xml_paths(system.file("examples", package = "rjd3providers"))
xml_1_5 <- xml_series("Prod.xml", 1, 5, charset = "iso-8859-1")
xml_id_properties(xml_1_5$moniker$id)

Gets the name of the provider

Description

Gets the name of the provider

Usage

xml_name()

Examples

xml_name()

Title

Description

Title

Usage

xml_series(file, collection = 1, series = 1, charset = NULL, fullName = TRUE)

Arguments

fullName

Examples

set_xml_paths(system.file("examples", package = "rjd3providers"))
xml_1_5 <- xml_series("Prod.xml", 1, 5, charset = "iso-8859-1")

Generates the id corresponding to a list of properties

Description

Generates the id corresponding to a list of properties

Usage

xml_to_id(props)

Arguments

props

Examples

set_xml_paths(system.file("examples", package = "rjd3providers"))
xml_1_5 <- xml_series("Prod.xml", 1, 5, charset = "iso-8859-1")
q <- xml_id_properties(xml_1_5$moniker$id)
q$series <- 50
xml_to_id(q)