View source: R/interpolate_x3p.R
x3p_interpolate | R Documentation |
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.
x3p_interpolate(x3p, resx = 1e-06, resy = resx, maxgap = 1)
interpolate_x3p(x3p, resx = 1e-06, resy = resx, maxgap = 1)
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 |
interpolated x3p object
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.