Changes between Version 6 and Version 7 of EcomsUdg/RPackage/Functions


Ignore:
Timestamp:
Apr 29, 2013 2:37:44 PM (9 years ago)
Author:
juaco
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • EcomsUdg/RPackage/Functions

    v6 v7  
    1 * '''__dataInventory.R__'''
     1'''__1. dataInventory.R__'''
    22
    3 Prior to data analysis, a common need is to have an overview of all data available and their structure (variables, dimensions, units, geographical extent, time span ...). The function `dataInventory.R` is intended to perform this task, returning a list of components summarizing the main characteristics of the selected dataset. The function is called in the following way:
     3Prior to data analysis, a common need is to have an overview of all data available and their structure (variables, dimensions, units, geographical extent, time span ...). The function `dataInventory.R` is intended to perform this task, returning a list of meta-data components summarizing the main characteristics of the selected dataset. Note that his function provides an overview of the data as they are stored in the original data files. The characteristics of the loaded data after using any of the functions for data access (e.g., `loadSystem4.R`) may change (for instance, after data transformation temperature may be provided in ºC instead of the originally stored K, and so on).
     4
     5The function is called in the following way:
    46
    57{{{
    6 dataInventory(dataset, print.summary = TRUE)
     8> dataInventory(dataset, print.summary = TRUE)
    79}}}
    810
     
    1012
    1113* `dataset`: a character string indicating the full path to the virtual dataset (a `ncml` file). This can be either a path containing the directory and name of the file, or an appropriate URL in case the dataset is remotely accessed (e.g., via the [https://www.meteo.unican.es/trac/meteo/wiki/SpecsEuporias/DataServer/THREDDS SPECS-EUPORIAS THREDDS]).
    12 * `print.summary`: logical flag indicating if a summary table is printed on screen, in addition to the output list.
     14* `print.summary`: logical flag indicating if a summary table is printed on screen, in addition to the output list. Default to `TRUE`.
    1315
    14 The output of the function consists of a list of variable length depending on the number of variables contained in the dataset, following this structure:
     16The output of the function consists of a list of variable length, depending on the number of variables contained in the dataset, following this structure:
    1517
    16  * `Name of the variable`
    17     * `Description`
    18     * `Name`
     18    * `Description`: Description of the variable
     19    * `Name`: Character string. Long name of the variable
     20    * `DataType`: Character string indicating data type (i.e. float ...)
     21    * `Units`: Character string indicating the units of the variable
     22    * `Shape`: A vector of ''n'' integers, where ''n''=number of dimensions, specifying the length of each dimension
     23    * `Dimensions`: A list of length ''n'', containing the following information for each of the ''n'' dimensions:
     24       * `Type`: Character vector indicating the type of dimension (e.g. Time, Lon, Pressure ...)
     25       * `Units`: Character vector indicating the units of the dimension axis
     26       * `Values`: A vector containing all the dimension values. This might be a vector of `POSIXlt` class in case of time type dimension, or numeric in other cases.
    1927
    2028
    21 * '''__loadSystem4.R__'''
     29'''__2. loadSystem4.R__'''
    2230
    2331The ''SPECS-EUPORIAS Data Portal'' can be remotely accessed from R via the [mtl:browser:MLToolbox/trunk/MLToolbox_experiments/antonio/system4/r/loadSystem4.R loadSystem4.R] function. Note that this function is part of a more comprehensive R package currently under development. This function automatically cares about the proper location of the right indices for data sub-setting across the different variable dimensions, given a few simple arguments for subset definition. In addition, instead of retrieving a NetCDF file that needs to be opened and read, the requested data is directly loaded into the current R working session, according to a particular structure described below, prior to data analysis and/or representation.