writeIFC {IFC} | R Documentation |
IFC Files Generic Writer
Description
Writes IFC data to DAF and subsets or merges RIF/CIF Files.
Usage
writeIFC(fileName, ...)
Arguments
fileName |
path to file. |
... |
arguments to pass to |
Details
If an ‘IFC_data' object is provided as ’fileName' or in '...' ExportToFCS
or data_to_DAF
will be used to export object.
Otherwise, if 'fileName' is a DAF file ExportToDAF
will be used to write file whereas if it is RIF or CIF file(s) writeIFC
will use ExportToXIF
.
Value
it invisible returns the path of exported file.
Examples
if(requireNamespace("IFCdata", quietly = TRUE)) {
tmp <- tempdir(check = TRUE)
## use a daf file
file_daf <- system.file("extdata", "example.daf", package = "IFCdata")
## create a tagged population named test with 1st object
pop <- buildPopulation(name = "test", type = "T", obj = 0)
writeIFC(file_daf, write_to = paste0(tmp, "\\test_write.daf"),
overwrite = TRUE, pops = list(pop))
## use a rif file, but you can also use a cif
file_rif <- system.file("extdata", "example.rif", package = "IFCdata")
writeIFC(fileName = file_rif, write_to = paste0(tmp, "\\test_write.rif"),
overwrite = TRUE, objects = 0)
} 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.'))
}
[Package IFC version 0.2.1 Index]