Description Usage Arguments Value Note Author(s) Examples
Interpolation takes a three columns data frame to do a linear interpolation over X with points seperated by intervX then over Y with points seperated by intervY.
1 | Interpolation(Tab, intervX = NULL, intervY = NULL)
|
Tab |
Dataframe to be interpolated. This data frame must be a three columns data frame. Columns must be x, y and z, in that order. |
intervX |
Interval between two interpolated points over X axis. |
intervY |
Interval between two interpolated points over Y axis. |
Returns a three data frame of the form x, y and z with the same column names as input data frame.
For further details on the use of interp, please refer to help(interp).
Vincent Le Bourlot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # an example using the data volcano
require(lattice)
# Load volcano
data(volcano)
# Transform the data to be plotted with lattice function levelplot
x=1:dim(volcano)[1]
y=1:dim(volcano)[2]
data=expand.grid(x,y)
vol=cbind(data,c(volcano))
colnames(vol)=c("x","y","z")
# Plot the volcano with function levelpot
STdiag(z~x*y,vol,log=FALSE,col="terrain")
# Interpolate with finner X and Y and plot the new volcano
Interpvol=Interpolation(vol,intervX=0.5,intervY=0.2)
STdiag(z~x*y,Interpvol,log=FALSE,col="terrain")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.