ExportToXIF | R Documentation |
Subsets or merges RIF or CIF files.
ExportToXIF(
fileName,
write_to,
objects,
offsets,
fast = TRUE,
extract_features = FALSE,
endianness = .Platform$endian,
verbose = FALSE,
verbosity = 1,
overwrite = FALSE,
display_progress = TRUE,
add_tracking = TRUE,
...
)
fileName |
path(s) of file(s) to subset or merge. If multiple files are provided they will be merged. Otherwise, if only one file is input it will be subsetted. All files have to be either '.rif' or '.cif' files. All files should have same channels. |
write_to |
pattern used to export file.
Placeholders, like "%d/%s_fromR.%e", will be substituted: |
objects |
integer vector, IDEAS objects ids numbers to use. If missing, the default, all objects will be used. Only apply for subsetting. |
offsets |
object of class ‘IFC_offset'. If missing, the default, offsets will be extracted from ’fileName'. |
fast |
whether to fast extract 'objects' or not. Default is TRUE.
Meaning that 'objects' will be extracted expecting that 'objects' are stored in ascending order. |
extract_features |
whether to try to extract features. Default is FALSE. IMPORTANT: it is not clear if how features are stored and which objects they rely to when input file is already a merge or a subset. For this reason it should be carefully checked. Note that features extraction is not implemented for merging. |
endianness |
the endian-ness ("big" or "little") of the target system for the file. Default is .Platform$endian. |
verbose |
whether to display information (use for debugging purpose). Default is FALSE. |
verbosity |
quantity of information displayed when verbose is TRUE; 1: normal, 2: rich. Default is 1. |
overwrite |
whether to overwrite file or not. Default is FALSE. |
display_progress |
whether to display a progress bar. Default is TRUE. |
add_tracking |
whether to register files' paths and objects' ids in the exported file. Default is TRUE. |
... |
other arguments to be passed. |
when 'extract_features' is set TRUE, only features stored in binary format will be extracted if found.
If the input 'fileName' is a merged of several files then features will be extracted from these files.
If these files can't be found, Warning(s) will be thrown and input 'fileName' will be extracted without features values.
It invisibly returns full path of exported file.
if(requireNamespace("IFCdata", quietly = TRUE)) {
tmp <- tempdir(check = TRUE)
## use a cif file, but you can also subset rif
file_cif <- system.file("extdata", "example.cif", package = "IFCdata")
## subset objects 0,1 and 4 from file
exported <- ExportToXIF(fileName = file_cif, write_to = paste0(tmp, "\\test.cif"),
overwrite = TRUE, objects = c(0,1,4))
} 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.'))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.