attribute,ncdfObject-method {ncdfCF} | R Documentation |
Extract the value of a named attribute of the ncdfCF object. When found, the value will have the type of the attribute and it may be of type list if the attribute has multiple values.
## S4 method for signature 'ncdfObject'
attribute(object, att)
object |
A |
att |
Attribute to find in $name column. |
Value of the $value column or character(0)
when not found.
fn <- system.file("extdata",
"pr_day_EC-Earth3-CC_ssp245_r1i1p1f1_gr_20240101-20241231_vncdfCF.nc",
package = "ncdfCF")
ds <- open_ncdf(fn)
lon <- ds[["lon"]]
attribute(lon, "standard_name")