View source: R/readXDS_ASCII.R
writeXDS_ASCII | R Documentation |
Function to write an XDS_ASCII-tye named list to a file with XDS_ASCII format (unmerged or merged).
writeXDS_ASCII(proc_info, header, reflections, filename)
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. |
The XDS_ASCII-type named list includes three components,
processing_info
, header
and reflections
(see readXDS_ASCII
).
This function does not return any R object. It outputs an XDS_ASCII reflection file to some target location.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.