# NOT RUN {
data(soils)
sandstone2 <- soils$sandstone
#Convert from Cu (1.54056 Angstroms) to Co (1.78897 Angstroms)
sandstone2$tth <- tth_transform(sandstone2$tth,
from = 1.54056,
to = 1.78897)
sandstone_list <- as_multi_xy(list("sandstone" = soils$sandstone,
"sandstone2" = sandstone2))
#plot the change
plot(sandstone_list, wavelength = "Cu")
#Alternatively convert the 2theta axis of a library
data(minerals)
minerals2 <- minerals
minerals2$tth <- tth_transform(minerals2$tth,
from = 1.54056,
to = 1.78897)
#Plot the difference
plot(x = minerals$tth, y = minerals$xrd$QUA.1,
type = "l", xlim = c(0, 85))
lines(x = minerals2$tth, y = minerals2$xrd$QUA.1,
col = "red")
# }
Run the code above in your browser using DataLab