getAttributes | R Documentation |
List the netCDF attributes for a specified variable or data.frame
getAttributes(dname, vname = NULL, .print = TRUE)
dname |
The name of the data.frame. Alternately, a data.frame column. |
vname |
The name of a variable in the netCDF file. If provided, this can be either a column name in 'dname' (e.g., "TASX") or the variable itself (e.g., TASX). If omitted, the attributes of the first parameter (the data.frame) will be returned. |
.print |
A logical variable indicating if the values should be printed. Default is TRUE. The format of this listing is more concise than that obtained by printing the returned list of attributes, so when used interactively it may be preferable to use .print=TRUE and assign the returned list to avoid printing it a second time; e.g., Z <- getAttributes(RAFdata, TASX) |
Prints the netCDF attributes and their values, and (invisibly) returns a text vector with the names of the attributes, for a specified data.frame. For variable attributes, the name of the variable should be specified as a string. For global attributes, omit the 'vname' parameter. This function is designed to work with data.frames generated by Ranadu::getNetCDF.R, and for such data.frames it will list attributes as in the original netCDF file from which the data.frame was generated.
A list of the attributes and associated values
William Cooper
ATT <- getAttributes (RAFdata, TASX) ATT <- getAttributes (RAFdata) ATT <- getAttributes (RAFdata, "TASX", .print=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.