Learn R Programming

pxweb (version 0.5.3)

calculate_data_dim: The function calculates the dimension of a data object

Description

The function calculates the dimension of a data object

Usage

calculate_data_dim(dim_length, clean)

Arguments

dim_length
Vector from get_dim_size
clean
Is the data cleaned (TRUE/FALSE)

Value

  • An integer vector of length 2

Examples

Run this code
url <- "http://api.scb.se/OV0104/v1/doris/sv/ssd/BE/BE0101/BE0101A/BefolkningNy"
dims <- list(Region = c('*'), Civilstand = c('*'), Alder = '1', Kon = c('*'),
            ContentsCode = c('*'), Tid = c('*'))
call_size <- get_dim_size(url, dims)
calculate_data_dim(call_size[[1]], TRUE)
calculate_data_dim(call_size[[1]], FALSE)

Run the code above in your browser using DataLab