0

Relatively new to R and RStudio, need to test a hypothesis for my Remote Sensing project. A bit of context: testing the slope of forest loss in 2 different protected areas in the Congo Basin, so doing a bit of work in ArcMap too. When using some code (see below), a histogram for one of the areas looks just fine, but when creating a histogram for another area, R pops up with an "invalid number of 'breaks'" error. I can't seem to figure it out, so any help or suggestions is appreciated. Thanks!

The code I'm using is this:

# 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 and Virunga are two of the protected areas I'm investigating and NR = Nature Reserve, whilst NP= National Park

**Edit**
**tifSankuruNR<-raster("SankuruForestLoss.tif")**

**tifVirungaNP<-raster("VirungaForestLoss.tif")**

0 Answers0