Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling spatial object in 2D smooths #61

Open
mfasiolo opened this issue May 27, 2019 · 0 comments
Open

Handling spatial object in 2D smooths #61

mfasiolo opened this issue May 27, 2019 · 0 comments

Comments

@mfasiolo
Copy link
Owner

It would be nice to be able to do something like:

library(mgcViz)
dat <- gamSim(1, n = 700, dist = "normal", scale = 2)
b <- gamV(y ~ s(x0) + s(x1, x2) + s(x3), data = dat)

plot(sm(b, 2), newdata = mySpatialObject) + l_fitRaster()

Where mySpatialObject is of class "sf" or "sp", so that we could then be able to use
the methods from the ggspatial package.

The basic problem is that mgcv does not understand spatial objects, and mgcViz
has the same problem. Not sure how to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant