grp.rename.nc | R Documentation |
Rename a NetCDF group.
grp.rename.nc(ncid, newname, oldname=NULL)
ncid |
Object of class |
newname |
The new group name. |
oldname |
By default, the rename applies to the group represented by |
This function renames an existing group in a dataset of "netcdf4"
format that is open for writing. A group cannot be renamed to have the same name as another group, type or variable in the parent group.
Pavel Michna, Milton Woods
https://www.unidata.ucar.edu/software/netcdf/
## Create a new NetCDF dataset and define a group
file1 <- tempfile("grp.rename_", fileext=".nc")
nc <- create.nc(file1, format="netcdf4")
grp <- grp.def.nc(nc, "oldgroup")
## Rename the group (operation not supported by early versions of the netcdf4 library)
try(grp.rename.nc(grp, "newgroup"))
close.nc(nc)
unlink(file1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.