#set path to EBV netCDF file <-
system.file(file.path("extdata","baisero_spepop_id5_20220405_v1_empty.nc"),
package="ebvcube")
if (FALSE) {
try({
#change the standard_name of the metric
attribute1 <- 'standard_name'
value1 <- 'habitat availability'
level1 <- 'scenario_1/metric_1'
ebv_attribute(filepath = file, attribute_name = attribute1,
value = value1, level = level1)
#change the units of the ebv_cube
attribute2 <- 'units'
value2 <- 'Land-use of 5,090 mammals calculated in sqkm'
level2 <- 'scenario_1/metric_1/ebv_cube' #equal to the datacubepath
ebv_attribute(filepath = file, attribute_name = attribute2,
value = value2, level = level2)
#change the name of the creator at the global level
attribute3 <- 'creator_name'
value3 <- 'Jane Doe'
ebv_attribute(filepath = file, attribute_name = attribute3,
value = value3)
}, TRUE)
}
Run the code above in your browser using DataLab