# NOT RUN {
#Load the minerals library
data(minerals)
# Load the soils data
data(soils)
#Since the reference library is relatively small,
#the whole library can be used at once to get an
#estimate of the phases within each sample.
# }
# NOT RUN {
fps_sand <- fps(lib = minerals,
smpl = soils$sandstone,
refs = minerals$phases$phase_id,
std = "QUA.1",
align = 0.2)
fps_lime <- fps(lib = minerals,
smpl = soils$limestone,
refs = minerals$phases$phase_id,
std = "QUA.1",
align = 0.2)
fps_granite <- fps(lib = minerals,
smpl = soils$granite,
refs = minerals$phases$phase_id,
std = "QUA.1",
align = 0.2)
#Alternatively run all 3 at once using lapply
fps_soils <- lapply(soils, fps,
lib = minerals,
std = "QUA.2",
refs = minerals$phases$phase_id,
align = 0.2)
#Using the rockjock library:
data(rockjock)
data(rockjock_mixtures)
rockjock_1 <- fps(lib = rockjock,
smpl = rockjock_mixtures$Mix1,
refs = c("ORDERED_MICROCLINE",
"LABRADORITE",
"KAOLINITE_DRY_BRANCH",
"MONTMORILLONITE_WYO",
"ILLITE_1M_RM30",
"CORUNDUM"),
std = "CORUNDUM",
align = 0.3)
#Alternatively you can specify the internal standard
#concentration if known:
rockjock_1s <- fps(lib = rockjock,
smpl = rockjock_mixtures$Mix1,
refs = c("ORDERED_MICROCLINE",
"LABRADORITE",
"KAOLINITE_DRY_BRANCH",
"MONTMORILLONITE_WYO",
"ILLITE_1M_RM30",
"CORUNDUM"),
std = "CORUNDUM",
std_conc = 20,
align = 0.3)
# }
Run the code above in your browser using DataLab