Copies populations from a DAF file into a copy of another DAF file. Only creates new file with copied population.
popsCopy(
from,
into,
write_to,
pops,
use_regex = FALSE,
overwrite = FALSE,
append_name = TRUE,
offset = 0,
endianness = .Platform$endian,
verbose = FALSE,
...
)
a new file is created containing exported populations.
It invisibly returns full path of exported file.
path to file to copy populations from.
path to file that will be used as a template to copy population into. Caution, it is mandatory that 'into' contains 'from' starting at 'offset'.
pattern used to export file.
Placeholders, like "%d/%s_fromR.%e", will be substituted:
-%d: with full path directory of 'into'
-%p: with first parent directory of 'into'
-%e: with extension of 'into' (without leading .)
-%s: with shortname from 'into' (i.e. basename without extension).
Exported file extension will be deduced from this pattern. Note that it has to be a .daf.
regular expression or vector of desired populations present in 'from'.
If missing, the default, all populations found will be copied.
If given but not found, a warning will be sent.
whether to use regex to pick up population into 'from'. Default is FALSE.
whether to overwrite existing file or not. Default is FALSE.
Note that if TRUE, it will overwrite exported file if path of 'into' and deduced from 'write_to' arguments are different.
Otherwise, you will get an error saying that overwriting source file is not allowed.
Note also that an original file, i.e. generated by IDEAS(R) or INSPIRE(R), will never be overwritten.
Otherwise, you will get an error saying that overwriting original file is not allowed.
whether to append_name basename(from) to exported populations. Default is TRUE.
Object number of 1st object of 'from' in 'into'. Default is 0.
The endian-ness ("big" or "little") of the target system for the file. Default is .Platform$endian.
Endianness describes the bytes order of data stored within the files. This parameter may not be modified.
whether to display information (use for debugging purpose). Default is FALSE.
Other arguments to be passed.
Populations are exported as tagged populations.