writeXDS_ASCII {cry} | R Documentation |
Write data to an XDS_ASCII file.
Description
Function to write an XDS_ASCII-tye named list to a file with XDS_ASCII format (unmerged or merged).
Usage
writeXDS_ASCII(proc_info, header, reflections, filename)
Arguments
proc_info |
The first component of an XDS_ASCII-type
object. It includes up to three
components, |
header |
The second component of an XDS_ASCII-type object.
This object includes several other objects (see
|
reflections |
The third component of an XDS_ASCII-type
object. It contains the data (the
experimental observations). See
|
filename |
A character string. The path to a valid XDS_ASCII file. If a file with the same name exists, it will be deleted. |
Details
The XDS_ASCII-type named list includes three components,
processing_info
, header
and reflections
(see readXDS_ASCII
).
Value
This function does not return any R object. It outputs an XDS_ASCII reflection file to some target location.
Examples
# Load one of the XDS ASCII files included with
# this distribution of cry
datadir <- system.file("extdata",package="cry")
filename <- file.path(datadir,"xds00_ascii.hkl")
lXDS <- readXDS_ASCII(filename)
# Change date
print(lXDS$header$DATE)
lXDS$header$DATE <- "7-Apr-2021"
# Write to a file called "new.hkl"
wd <- tempdir()
fname <- file.path(wd,"new.hkl")
writeXDS_ASCII(lXDS$processing_info,lXDS$header,
lXDS$reflections,fname)