# NOT RUN {
if(requireNamespace("IFCdata", quietly = TRUE)) {
## use a daf file
file_daf <- system.file("extdata", "example.daf", package = "IFCdata")
tmp <- tempdir(check = TRUE)
## create a tagged population named test with 1st object
pop <- buildPopulation(name = "test", type = "T", obj = 0)
ExportToDAF(file_daf, write_to = paste0(tmp, "\\test.daf"),
overwrite = TRUE, pops = list(pop))
} else {
message(sprintf('Please run `install.packages("IFCdata", repos = "%s", type = "source")` %s',
'https://gitdemont.github.io/IFCdata/',
'to install extra files required to run this example.'))
}
# }
Run the code above in your browser using DataLab