Functions to Check a Returned Time Series Data Object

Share:

Description

Check a time series (matrix) for returned data and metadata.

Usage

1
2
3
4

Arguments

x

A time series (matrix) as returned by TSget using an sdmx connection.

quiet

Suppress warnings and just return the logical result.

Details

These functions check data returnded from SDMX databases such as Eurostat to verify if data and metadata has been returned by a query specification. This is a useful check because wildcard specifications may often result in no data being returned.

hasData returns a logical vector, one element for each series in x, indication TRUE if there is numeric data in that series or FALSE if all the data in the series is NA or NaN. If quiet=FALSE (the default) then a warning is issued for each series that has completely missing data.

hasDataCount prints a count of the number of series with actual data, and returns the number (invisibly).

hasDataNames returns the names of series with actual data.

hasDataDescriptions returns the descriptions of series with actual data.

Value

Depends.

See Also

TSget

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
  ## Not run: 
  require("TSsdmx")
  eurostat <- TSconnect("sdmx", dbname="EUROSTAT")

  # 28 series, 23 with data
  z <-  TSget("ei_nama_q.Q.MIO-EUR.NSA.CP.*.IT", eurostat) 

  sum(hasData(z, quiet=TRUE)) 

  hasDataCount(z)
  hasDataNames(z)

  hasDataDescriptions(z)
  
## End(Not run)