data <- data.frame(
species_code = c("PICEA_ABIES", "QUERCUS_ROBUR", "FAGUS_SYLVATICA"),
dagnelie_vc22_2 = c(1.1, NA, NA),
dagnelie_vc22_1g = c(NA, NA, NA),
dagnelie_vc22_1 = c(NA, 0.9, NA),
vallet_vc22 = c(NA, 1.2, NA),
rondeux_vc22 = c(NA, NA, 1.0),
algan_vc22 = c(NA,0.8,NA),
vallet_vta = c(1.5, NA, 1.3)
)
output_path <- tempfile(fileext = ".csv")
results <- biomass_calc(data, output = output_path)
if (file.exists(output_path)) {
message("CSV file successfully created.")
} else {
warning("CSV file was not created.")
}
Run the code above in your browser using DataLab