# 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)
Run the code above in your browser using DataLab