MBA

CRAN status R-CMD-check pkgdown

MBA package hex logo

MBA interpolates irregularly and regularly spaced data using multilevel B-spline approximation. The package provides functions for estimating smooth surfaces on a regular grid and for predicting surface values at arbitrary point locations.


Installation

Install the CRAN release with:

install.packages("MBA")

Install the development version from GitHub with:

remotes::install_github("finleya/MBA")

Basic Use

library(MBA)

data(LIDAR)
set.seed(1)

train <- sample(seq_len(nrow(LIDAR)), 500)
xyz <- LIDAR[train, ]

surf <- mba.surf(xyz, no.X = 100, no.Y = 100, extend = TRUE)
image(surf$xyz.est, xaxs = "r", yaxs = "r")

pts <- mba.points(
  xyz = xyz,
  xy.est = LIDAR[-train, c("x", "y")],
  h = 8,
  verbose = FALSE
)

head(pts$xyz.est)

Functionality

The package provides:

Citation

The MBA implementation calls portions of the SINTEF Multilevel B-spline Library written by Oyvind Hjelle and implements methods developed in:

Lee, S., Wolberg, G., and Shin, S. Y. (1997). Scattered data interpolation with multilevel B-splines. IEEE Transactions on Visualization and Computer Graphics, 3(3), 229-244. doi:10.1109/2945.620490.