| x3p_interpolate {x3ptools} | R Documentation | 
Interpolate from an x3p object
Description
An interpolated scan is created at specified resolutions resx, resy in x and y direction.
The interpolation is based on na.approx from the zoo package. It is possible to create interpolations at a higher resolution than the one specified in the data itself, but it is not recommended to do so.
x3p_interpolate can also be used as a way to linearly interpolate any missing values in an existing scan without changing the resolution.
Usage
x3p_interpolate(x3p, resx = 1e-06, resy = resx, maxgap = 1)
interpolate_x3p(x3p, resx = 1e-06, resy = resx, maxgap = 1)
Arguments
x3p | 
 x3p object  | 
resx | 
 numeric value specifying the new resolution for the x axis.  | 
resy | 
 numeric value specifying the new resolution for the y axis.  | 
maxgap | 
 integer variable used in   | 
Value
interpolated x3p object
Examples
logo <- x3p_read(system.file("csafe-logo.x3p", package="x3ptools"))
# resolution:
logo$header.info$incrementX
# change resolution to 1 micron = 1e-6 meters
logo2 <- x3p_interpolate(logo, resx = 1e-6)
logo2$header.info$incrementX
[Package x3ptools version 0.0.4 Index]