interpolate: Interpolate an XY, multiXY or powdRlib object to a given...

Description Usage Arguments Value Examples

View source: R/interpolate.R

Description

interpolate takes an XY, multiXY or powdRlib object and interpolates the data onto a new 2theta scale using a natural spline. See additional help via ?interpolate.XY, ?interpolate.multiXY or ?interpolate.powdRlib.

Usage

1
interpolate(x, new_tth, ...)

Arguments

x

an XY or multiXY object.

new_tth

a numeric vector of the new 2theta scale.

...

other arguments

Value

an XY or multiXY object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#Define a new 2theta scale:
data(rockjock_mixtures)
tth <- seq(10, 60, 0.04)

#interpolate multiXY object of data onto new scale
i1 <- interpolate(rockjock_mixtures, new_tth = tth)

#interpolate XY object onto new scale
i2 <- interpolate(rockjock_mixtures$Mix1, new_tth = tth)

#interpolate powdRlib object onto new scale
i3 <- interpolate(minerals, new_tth = tth)

powdR documentation built on Aug. 13, 2021, 5:08 p.m.