Displaying 20 results from an estimated 4000 matches similar to: "paired raster boxplots"
2024 Aug 22
1
paired raster boxplots
? Thu, 22 Aug 2024 08:46:03 +0200
SIBYLLE ST?CKLI via R-help <r-help at r-project.org> ?????:
> rr2s <- stack(r, r2,s)
> > names(rs) <- c('r', 's', 'r2')
>
> Error in `names<-`(`*tmp*`, value = c("r", "s", "r2")) :
>
> incorrect number of layer names
The error must be happening because the variable
2024 Aug 23
1
paired raster boxplots
Dear Ivan
Many thanks.
Using my own dataset, my "s" is a layer shape file.
Somewhere I need to define : snew<-s$Unterregio
I tried it to do it before stack(), but it seems to be the wrong way. Do you have any suggestion?
Code:
> #first import all files in a single folder as a list
> rastlist_pres <- list.files(path ="C:/Users/....._bee_presence",
2024 Aug 24
1
paired raster boxplots
Dear Ivan
Dear community
Quite nice book recommendation.
Yes indeed my raster "s" (the shape file for the boxplot classes) has several layers. That's way I tried to select a layer by " s<-sf$Unterregio".
> sf <- read_sf("C:/Users/....._BiogeoRegion.shp")
> names(sf)
> names(sf)
[1] "RegionNumm" "RegionName"
2024 Aug 23
1
paired raster boxplots
? Fri, 23 Aug 2024 10:15:55 +0200
<sibylle.stoeckli at gmx.ch> ?????:
> > s<-sf$Unterregio
> > r<-allrasters_pres[[1]]
> >
> >
> > rs <- stack(r, s)
> > names(rs) <- c('r', 's')
> Error in `names<-`(`*tmp*`, value = c("r", "s")) :
> incorrect number of layer names
It looks like at least one
2010 Jul 28
2
Beginner stucked with raster + geoR package.
Hello everyone.
I am trying to build up understanding in R by trying to develop just some simple
scenarios.
I would like to explain you what I am trying to do and what I did so far.
I would like to put inside a RasterLayer (raster package) a Gaussian field (for
given covariance) using grf function (geoR package)
1. First I created a Raster Layer object
r <- raster() # Default values are
2024 Aug 15
1
allequal diff
Digging into the code for raster::compareRaster():
library(raster)
r <- raster(ncol=3, nrow=3)
values(r) <- 1:ncell(r)
r2 <- r
values(r2) <- c(1:8,10)
all.equal(getValues(r), getValues(r2), tolerance = 0)
[1] "Mean relative difference: 0.1111111"
compareRaster has fancier machinery internally for doing the
comparison for large rasters a block at a time if everything
2024 Aug 16
1
allequal diff
Dear Ben
Many thanks.
I see that a second challenge are NA values. Is it possible to consider na.rm=TRUE?
> r2_resampled <- resample(r2, r1)
> compareRaster(r1, r2_resampled)
[1] TRUE
>
> all.equal(getValues(r1), getValues(r2_resampled), tolerance = 0)
[1] "'is.NA' value mismatch: 9544032 in current 66532795 in target"
Kind regards
Sibylle
2011 Jan 24
0
writeRaster with raster package
Hello,
I have a problem writing a raster with the raster package.
I have the raster object "mask" which has the following geoinformation:
---- R output
> mask
class : RasterLayer
filename :
E:/Daten/FE/HyMAP/Luxembourg_2010/Kehlen_Useldange/mosaik/LUX_LC_noOverlap_mask
nrow : 5198
ncol : 2813
ncell : 14621974
min value : 0
max value : 255
2018 Jun 01
0
Problem with adding a raster and a brick
This is now fixed in development on RForge, you can try it out by
installing from there, or from the Github mirror with
devtools::install_github("rforge/raster/pkg/raster").
(To get fixes into raster email the maintainer directly - you might not get
a response but it'll be addressed).
Cheers, Mike.
On Thu, 24 May 2018 at 20:08 Michael Sumner <mdsumner at gmail.com> wrote:
2018 May 24
0
Problem with adding a raster and a brick
On Thu, 24 May 2018 at 18:41 Mark R Payne <markpayneatwork at gmail.com> wrote:
Hi,
I seem to be having a problem adding the following two raster objects
together - one is a rasterLayer, the other is a rasterBrick. The extent,
resolution, and origin are the same, so according to my understand it
should work. The objects look like so:
> obs.clim
class : RasterLayer
dimensions : 60, 200,
2018 Mar 06
0
raster time series statistics
I can't test that at the moment as I don't have the libraries. Perhaps later.
Jim
On Tue, Mar 6, 2018 at 11:36 AM, <Alexander.Herr at csiro.au> wrote:
> Last line in the following (updated) code produces the error
> require(raster)
> require(rts)
> require(stringr)
> r <- raster(ncol=100, nrow=100)
> values(r) <- runif(ncell(r))
> stack(r)->s
>
2018 Mar 06
2
raster time series statistics
Last line in the following (updated) code produces the error
require(raster)
require(rts)
require(stringr)
r <- raster(ncol=100, nrow=100)
values(r) <- runif(ncell(r))
stack(r)->s
r->rs
for(i in 1:23){
rs[]<-r[]*i
addLayer(s,rs)->s
print(nlayers(s))
}
dt<-list(ID=seq(1:24),month=rep(formatC(1:12,flag=0,width=2),2),
year=sort(rep(2016:2017,12)))
2013 Mar 19
1
How to get the rolling standard deviation in rasters?
I am using this code to calculate the moving average mean.It worked fine but
when I wanted to also calculate based on sd(stander deviation) I got the
error shown below.
I read this documentation of R movingFun and found that sd was mentioned at
http://hosho.ees.hokudai.ac.jp/~kubo/Rdoc/library/raster/html/movingFun.html
I wonder if needs any other things to conseder or sd is not at all supplied
2011 Apr 21
1
Sorting values within a raster
I am working with a raster and want to take values assigned to each
cell and sort them from largest to smallest, then cummulatively sum
them together (in order from largest to smallest). I'll then be
coding the individual cells such that the top 10% of the largest cell
values can be visualize with one color, the next 10% with another and
so on.
I have tried a number of schemes but
2013 Mar 21
0
Problems of exporting raster to ArcGIS
Hello:
I am using R raster package to replace ArcGIS when processing multiple shp files. However, when I export R raster back to ArcGIS, it couldn't recognize R raster file correctly. For example, I used {raster} package and got a RasterLayer as followed.
class : RasterLayer
dimensions : 8280, 18480, 153014400 (nrow, ncol, ncell)
resolution : 0.008333334, 0.008333334 (x, y)
2018 Mar 06
1
raster time series statistics
It works if you use as.Date. But this defeates the purpose for the yearmon notion...
require(raster)
require(rts)
require(stringr)
r <- raster(ncol=100, nrow=100)
values(r) <- runif(ncell(r))
stack(r)->s
r->rs
for(i in 1:23){
rs[]<-r[]*i
addLayer(s,rs)->s
print(nlayers(s))
}
dt<-list(ID=seq(1:24),month=rep(formatC(1:12,flag=0,width=2),2), year=sort(rep(2016:2017,12)))
2018 May 24
2
Problem with adding a raster and a brick
Hi,
I seem to be having a problem adding the following two raster objects
together - one is a rasterLayer, the other is a rasterBrick. The extent,
resolution, and origin are the same, so according to my understand it
should work. The objects look like so:
> obs.clim
class : RasterLayer
dimensions : 60, 200, 12000 (nrow, ncol, ncell)
resolution : 0.5, 0.5 (x, y)
extent : -70,
2024 Apr 18
1
Import multiple tif raster
Dear community
My aim is to import multiple .tif raster files using the help here:
https://stackoverflow.com/questions/52746936/how-to-efficiently-import-multi
ple-raster-tif-files-into-r
Does anyone now about the error "subscripts out of bounds"?
I am not sure about the check with alllrasters: is list() ok or should there
be a number (the number of imported .tif files?
Kind regards
2024 Apr 18
1
Import multiple tif raster
Dear Ivan
Thanks a lot.
I tried now to provide the full path. However probably the "?" in the path produces the error, would that be possible?
> #first import all files in a single folder as a list
> rastlist <- list.files(path = "C:\Users\Sibylle St?ckli\Desktop\NCCS_Impacts_Lot2_2022\InVEST\Species_Input\valpar_bee_presence", pattern='.tif$', all.files=
2024 Apr 18
2
Import multiple tif raster
Dear community
Dear Ivan
Thanks a lot. The code works now. Solution: direct and full path to the .tif files.
I confused back and forward slash
#first import all files in a single folder as a list
rastlist <- list.files(path = "C:/Users/Sibylle St?ckli/Desktop/NCCS_Impacts_Lot2_2022/InVEST/Species_Input/valpar_bee_presence", pattern='.tif$', all.files= T, full.names= T)
At