View source: R/nc_attributes_from_template.R
nc_attributes_from_template | R Documentation |
Write any number of netCDF attributes from a csv template specifying variable names and attribute properties.
nc_attributes_from_template(nc_object, templatefile, verbose = F)
nc_object |
An object of class ncdf4, indicating what file to write to. |
templatefile |
character, path to a csv text file that provides information about the attributes to add. See details |
verbose |
logical, whether to print additional output |
This function allows the same variable attributes to be standardized across a number of netcdf objects without having to change each one manually.
The templatefile csv should have the following column headers: variable_id: the name of the variable to which to add an attirubte. Leave blank to create global attributes attribute_name: the name of the desired attribute attribute_value: the value of the attribute precision: the precision of the attribute. Can have values of "short", "float", "double", or "text". If unspecified, the written precision is the same as the variable whose attribute it is.
Nick Brown <nick.brown@carleton.ca>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.