r - 创建直方图“无效的'中断'数量”时R中的错误
问题描述
R 和 RStudio 相对较新,需要为我的遥感项目测试一个假设。一些背景知识:测试刚果盆地 2 个不同保护区的森林损失坡度,因此也在 ArcMap 中做一些工作。当使用一些代码时(见下文),其中一个区域的直方图看起来很好,但是当为另一个区域创建直方图时,R 会弹出“无效的'breaks'数量”错误。我似乎无法弄清楚,所以任何帮助或建议表示赞赏。谢谢!
我正在使用的代码是这样的:
# Open the .tif file for each protected area's forest loss once you specify
# the filename correctly
tifSankuruNR<-raster("..." )
tifVirungaNP<-raster("...")
# Extract just the numeric values from the rasters
valuesSankuruNR<-values(tifSankuruNR)
valuesVirungaNP<-values(tifVirungaNP)
# Create a histogram of the values in the rasters
hist(valuesSankuruNR)
hist(valuesVirungaNP)
Sankuru 和 Virunga 是我正在调查的两个保护区,NR = 自然保护区,而 NP = 国家公园
**Edit**
**tifSankuruNR<-raster("SankuruForestLoss.tif")**
**tifVirungaNP<-raster("VirungaForestLoss.tif")**
解决方案
推荐阅读
- phpunit - phpunit 你不能序列化或反序列化 PDO 实例
- r - 将两个数据集与数据表合并,但保留其中一个相同的列
- emacs - 你如何“导入”github MELPA fetcher?
- django - Django 管理员添加 ajax 功能
- github - GraphQL - 如何在给定提交后获取所有提交?
- bash - 如何在 ~/ 以外的文件夹中将多个文件从远程 scp 到本地?
- database - 大数据的 Oracle 示例模式
- java - 如何将字段作为键添加到休眠更新语句
- php - Woocommerce - 显示最近一个月最畅销的商品
- windows - 是关机、命令还是应用程序?