Learn R Programming

istatR (version 0.1.0)

istat_dataset: Create an ISTAT dataset object

Description

Creates a dataset object for a specific ISTAT dataflow. This object can be used to explore the dataset's structure, dimensions, and available values, and to set filters before retrieving data.

Usage

istat_dataset(dataflow_identifier)

Value

A list with class "istat_dataset" containing:

df_id

Dataflow ID

version

Dataset version

df_description

Dataset description

df_structure_id

Data structure definition ID

dimensions

Named list of dimension information

filters

Named list of current filters (initialized to "." for all)

Arguments

dataflow_identifier

Either a dataflow ID (e.g., "139_176"), a structure ID, or an exact dataset description

Examples

Run this code
if (FALSE) {
# Create dataset by ID
ds <- istat_dataset("139_176")

# View dimensions
dimensions_info(ds)

# Get available values for a dimension
get_dimension_values(ds, "TIPO_DATO")

# Set filters
ds <- set_filters(ds, FREQ = "M", TIPO_DATO = c("ISAV", "ESAV"))
}

Run the code above in your browser using DataLab