diff --git a/R/plottingfns.R b/R/plottingfns.R index eaceaec..fa8509e 100644 --- a/R/plottingfns.R +++ b/R/plottingfns.R @@ -51,7 +51,7 @@ draw_world <- function(g = ggplot() + theme_bw() + xlab("") + ylab(""),inc_borde } ## Now return a gg object with the map overlayed - g + geom_path(data = worldmap, aes(x=long, y=lat, group=group), colour="black",size=0.1) + g + geom_path(data = worldmap, aes(x=long, y=lat, group=group), colour="black",linewidth=0.1) } #' @rdname show_basis diff --git a/tests/testthat/test_basis.R b/tests/testthat/test_basis.R index 6323888..7c3b201 100644 --- a/tests/testthat/test_basis.R +++ b/tests/testthat/test_basis.R @@ -78,13 +78,18 @@ test_that("can average basis over polygons in plane", { HexPols_df <- SpatialPolygonsDataFrame(HexPols, cbind(over(HexPols,meuse.grid), coordinates(HexPts))) - ## Generate basis functions - G <- auto_basis(manifold = plane(),data=meuse,nres = 2,prune=10,type = "Gaussian") - - expect_true({eval_basis(G,coordinates(HexPts)); TRUE}) - expect_true({eval_basis(G,HexPols_df); TRUE}) - #plot(as.numeric(S1)) - #lines(as.numeric(S2),col='red') + ## Generate regular basis functions with prune + G1 <- auto_basis(manifold = plane(),data=meuse,nres = 2,prune=10,type = "Gaussian") + expect_true({eval_basis(G1,coordinates(HexPts)); TRUE}) + expect_true({eval_basis(G1,HexPols_df); TRUE}) + #plot(as.numeric(S1)) + #lines(as.numeric(S2),col='red') + + ## Generate irregular basis functions, no prune, with fmesher + G2 <- auto_basis(manifold = plane(), data=meuse, nres = 2, type = "bisquare", regular = 0) + expect_true({eval_basis(G2,coordinates(HexPts)); TRUE}) + expect_true({eval_basis(G2,HexPols_df); TRUE}) + }) ## Deprecated: