search for: allequ

Displaying 14 results from an estimated 14 matches for "allequ".

Did you mean: arlequ
2009 Jun 17
4
searching help for partial matches
The situation is that I know there is a function and know approximately what the name is, and want to find the exact name. Is there a way of searching for near-matches (similar to unix apropos). For example, I know there is a function called something like allequal (or allequals or AllEquals or...). But ?allequal, etc, return nothing, only if I remember the name can I get help via ?all.equal. Thanks -- View this message in context: http://www.nabble.com/searching-help-for-partial-matches-tp24078042p24078042.html Sent from the R help mailing list archive...
2024 Aug 16
2
allequal diff
...t getValues and then in the second step your code? Kind regards Sibylle -----Original Message----- From: Ivan Krylov <ikrylov at disroot.org> Sent: Friday, August 16, 2024 9:28 AM To: SIBYLLE ST?CKLI via R-help <r-help at r-project.org> Cc: sibylle.stoeckli at gmx.ch Subject: Re: [R] allequal diff ? Fri, 16 Aug 2024 07:19:38 +0200 SIBYLLE ST?CKLI via R-help <r-help at r-project.org> ?????: > Is it possible to consider na.rm=TRUE? > > all.equal(getValues(r1), getValues(r2_resampled), tolerance = 0) > > [1] "'is.NA' value mismatch: 9544032 in curren...
2024 Aug 16
1
allequal diff
? Fri, 16 Aug 2024 07:19:38 +0200 SIBYLLE ST?CKLI via R-help <r-help at r-project.org> ?????: > Is it possible to consider na.rm=TRUE? > > all.equal(getValues(r1), getValues(r2_resampled), tolerance = 0) > > [1] "'is.NA' value mismatch: 9544032 in current 66532795 in target" Use is.na() on getValues() outputs, combine the two masks using the | operator
2024 Aug 16
1
allequal diff
? Fri, 16 Aug 2024 10:35:35 +0200 <sibylle.stoeckli at gmx.ch> ?????: > what do you mean by use is.na() in getValues(). So I need to call > getValues a second time? Not necessarily, but it's one of the options. I was thinking along the lines of: values1 <- getValues(r1) mask1 <- is.na(values1) # Do the same for r2 # Combine the masks all.equal(values1[!combined_mask],
2024 Aug 16
1
allequal diff
...ust a mismatch in NA not in the xy pixels, right? Sibylle -----Original Message----- From: Ivan Krylov <ikrylov at disroot.org> Sent: Friday, August 16, 2024 10:51 AM To: sibylle.stoeckli at gmx.ch Cc: 'SIBYLLE ST?CKLI via R-help' <r-help at r-project.org> Subject: Re: [R] allequal diff ? Fri, 16 Aug 2024 10:35:35 +0200 <sibylle.stoeckli at gmx.ch> ?????: > what do you mean by use is.na() in getValues(). So I need to call > getValues a second time? Not necessarily, but it's one of the options. I was thinking along the lines of: values1 <- getValues(r...
2024 Aug 16
1
allequal diff
? Fri, 16 Aug 2024 11:32:58 +0200 <sibylle.stoeckli at gmx.ch> ?????: > # values and mask r1 > r1 <- getValues(r1) > mask1 <- is.na(r1) > # Do the same for r2 > r2 <- getValues(r2_resampled) > mask2 <- is.na(r2) > > # Combine the masks > all.equal(r1[!(mask1 & mask2)], r2[!(mask1 & mask2)]) Let's consider a more tangible example: # The
2024 Aug 16
1
allequal diff
...ot;'is.NA' value mismatch: 9544032 in current 66532795 in target" Kind regards Sibylle -----Original Message----- From: R-help <r-help-bounces at r-project.org> On Behalf Of Ben Bolker Sent: Friday, August 16, 2024 1:06 AM To: r-help at r-project.org Subject: Re: [R] 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"...
2024 Aug 15
1
allequal diff
Dear community Similar to the example of the rdocumentation, my idea is to use all.equal and to print the difference. https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/all.equal > d45 <- pi*(1/4 + 1:10) > stopifnot( + all.equal(tan(d45), rep(1, 10))) # TRUE, but > all (tan(d45) == rep(1, 10)) # FALSE, since not exactly [1] FALSE
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 18
2
allequal diff
...nces in the number of decimal places. Kind regards Sibylle -----Original Message----- From: Ivan Krylov <ikrylov at disroot.org> Sent: Friday, August 16, 2024 11:45 AM To: sibylle.stoeckli at gmx.ch Cc: 'SIBYLLE ST?CKLI via R-help' <r-help at r-project.org> Subject: Re: [R] allequal diff ? Fri, 16 Aug 2024 11:32:58 +0200 <sibylle.stoeckli at gmx.ch> ?????: > # values and mask r1 > r1 <- getValues(r1) > mask1 <- is.na(r1) > # Do the same for r2 > r2 <- getValues(r2_resampled) > mask2 <- is.na(r2) > > # Combine the masks > all.eq...
2024 Aug 18
1
allequal diff
...riginal Message----- > >> From: Ivan Krylov <ikrylov at disroot.org> > >> Sent: Friday, August 16, 2024 11:45 AM > >> To: sibylle.stoeckli at gmx.ch > >> Cc: 'SIBYLLE ST?CKLI via R-help' <r-help at r-project.org> > >> Subject: Re: [R] allequal diff > >> > >> ? Fri, 16 Aug 2024 11:32:58 +0200 > >> <sibylle.stoeckli at gmx.ch> ?????: > >> > >>> # values and mask r1 > >>> r1 <- getValues(r1) > >>> mask1 <- is.na(r1) > >>> # Do the same for r2 &...
2024 Aug 18
1
allequal diff
...>> >> -----Original Message----- >> From: Ivan Krylov <ikrylov at disroot.org> >> Sent: Friday, August 16, 2024 11:45 AM >> To: sibylle.stoeckli at gmx.ch >> Cc: 'SIBYLLE ST?CKLI via R-help' <r-help at r-project.org> >> Subject: Re: [R] allequal diff >> >> ? Fri, 16 Aug 2024 11:32:58 +0200 >> <sibylle.stoeckli at gmx.ch> ?????: >> >>> # values and mask r1 >>> r1 <- getValues(r1) >>> mask1 <- is.na(r1) >>> # Do the same for r2 >>> r2 <- getValues(r2_resamp...
2024 Aug 18
2
allequal diff
...gards > Sibylle > > > > -----Original Message----- > From: Ivan Krylov <ikrylov at disroot.org> > Sent: Friday, August 16, 2024 11:45 AM > To: sibylle.stoeckli at gmx.ch > Cc: 'SIBYLLE ST?CKLI via R-help' <r-help at r-project.org> > Subject: Re: [R] allequal diff > > ? Fri, 16 Aug 2024 11:32:58 +0200 > <sibylle.stoeckli at gmx.ch> ?????: > > > # values and mask r1 > > r1 <- getValues(r1) > > mask1 <- is.na(r1) > > # Do the same for r2 > > r2 <- getValues(r2_resampled) > > mask2 <- is.n...
2006 Jan 13
2
find mean of a list of timeseries
Can someone please give me a clue how to 're'write this so I dont need to use loops. a<-ts(matrix(c(1,1,1,10,10,10,20,20,20),nrow=3),names=c('var1','var2','var3')) b<-ts(matrix(c(2,2,2,11,11,11,21,21,21),nrow=3),names=c('var1','var2','var3'))