首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何找到映射的范围(dismo R)?

如何找到映射的范围(dismo R)?
EN

Stack Overflow用户
提问于 2022-01-30 15:04:38
回答 1查看 41关注 0票数 0

我试图在R中为入侵牡蛎物种(海洋)做物种分布图。使用我正在使用的代码,它将只在陆地上绘制点(ext= geographic.extent)。我找不到其他的“范围”选项,例如marine.extent或一种方法来执行-geographic.extent,以便它将成为除当前绘制区域之外的所有内容。

代码语言:javascript
复制
# Randomly sample points (same number as our observed points)
background <- randomPoints(mask = mask,     # Provides resolution of sampling points
                           n = nrow(obs.data),      # Number of random points
                           ext = geographic.extent, # Spatially restricts sampling
                           extf = 1.25)             # Expands sampling a little bit
# Plot the base map
plot(wrld_simpl, 
     xlim = c(0, 30), #north and baltic sea
     ylim = c(50, 70),
     axes = TRUE, 
     col = "grey95",
     main = "Presence and pseudo-absence points")

# Add the background points
points(background, col = "grey30", pch = 1, cex = 0.75)

EN

回答 1

Stack Overflow用户

发布于 2022-01-30 19:22:06

geographic.extent是您提供的一个变量。它可能是在您自己的代码中创建的,或者是由您加载的包创建的。你能编辑你的问题并显示它是什么(打印它)吗?

若要仅对某些区域的点进行示例,请使用掩码参数(正如您所做的)。在你的例子中,所有的陆地区域都应该是NA,所有的海洋区域都不应该是NA

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70915886

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档