Learn R Programming

ncdfCF (version 0.1.1)

showObject: Summary of object details

Description

These methods provide information on the various ncdfCF objects. While the individual methods are generally behaving the same for all descendant classes, there are some differences related to the nature of the objects.

  • Method show() will provide many details of the object over multiple lines printed to the console. This includes all attributes so it could be a substantive amount of information.

  • Method brief() returns some details of the object in a 1-row data.frame for further processing, such as combining details from all variables of a dataset into a single table.

  • Method shard() returns a very short character string with some identifying properties of the object, typically only useful when combined with shards of other object to provide a succinct overview of the dataset. This method has limited usability for the user but may be of interest for programmatic access.

Usage

# S4 method for ncdfDimension
shard(object)

# S4 method for ncdfVariable show(object)

# S4 method for ncdfVariable brief(object)

# S4 method for ncdfVariable shard(object)

# S4 method for ncdfDataset show(object)

# S4 method for ncdfDataset brief(object)

# S4 method for ncdfDimensionCharacter show(object)

# S4 method for ncdfDimensionCharacter brief(object)

# S4 method for ncdfDimensionNumeric show(object)

# S4 method for ncdfDimensionNumeric brief(object)

# S4 method for ncdfDimensionTime show(object)

# S4 method for ncdfDimensionTime brief(object)

Value

show() prints information to the console. brief() returns a 1-row data.frame with some details of object. shard() returns a character string with a few identifying details of object.

Arguments

object

The ncdfObject to show.

Examples

Run this code
fn <- system.file("extdata", "ERA5land_Rwanda_20160101.nc", package = "ncdfCF")
ds <- open_ncdf(fn)

# ncdfDataset, show
ds

# ncdfDataset, brief
# Note that the variables and dimensions are described by shards
brief(ds)

# ncdfVariable, show
pev <- ds[["pev"]]
pev

# ncdfDimensionNumeric, shard
lon <- ds[["longitude"]]
shard(lon)

Run the code above in your browser using DataLab