interpolate {powdR}R Documentation

Interpolate an XY, multiXY or powdRlib object to a given 2theta scale.

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

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

#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)


[Package powdR version 1.3.0 Index]