# NOT RUN {
## Create a new NetCDF dataset and define two dimensions
nc <- create.nc("dim.rename.nc")
dim.def.nc(nc, "station", 5)
dim.def.nc(nc, "time", unlim=TRUE)
## Rename the dimensions
dim.rename.nc(nc, 0, "mystation")
dim.rename.nc(nc, "time", "mytime")
close.nc(nc)
# }
Run the code above in your browser using DataLab