Displaying 20 results from an estimated 300 matches similar to: "merge large number of raster objects"
2009 Jul 30
3
Looping through R objects with $ operator and tags
Hi all,
Suppose I want to set the values in a column to the log of the values
of another column like so:
object$LogDist <- log10(object$Distance)
How do I loop through the objects if I have object1, object2, etc to
perform this function?
object1$LogDist <- log10(object1$Distance)
object2$LogDist <- log10(object2$Distance)
object3$LogDist <- log10(object3$Distance)
I was trying to
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
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"
2013 Jul 24
1
R base package grid does not output raster image
Hi,
I don't think this is a remote desktop issue. I can run the following
code by remoting into both a Windows 7 machine and a Windows Server R2
machine. I can see the results on the Windows 7 machine but not the
server.
> library(grid)
> grid.raster(1:10/11)
Best regards,
Terry
Terry Seaward Risk Manager
T +27 21 416 1923
terry.seaward@investecmail.com
36 Hans Strijdom
2010 Feb 22
1
Raster table: how separate lines with the same value (count > 1)
Dear all,
I intend to do some statistics with my raster table, like correlations or
regression analysis. For that, I need that each pixel be in one line, that
is, there is no count > 1. So, all columns should have the same number of
lines, when I compare (combine) rasters.
I'd like to know if there is a way to create lines and copy the values of
the lines, when count is > 1. So, even
2013 Feb 14
0
How write raster files after manipulation?
I have 12 binary (raster) files
https://echange-fichiers.inra.fr/get?k=k3M2jatJyHy65Cs99G4 .
I would like to calculate the moving average for the 12 values for each
pixel in the 12 files.
For a simple vector we can get a moving average by using this :
x <- c(1,2,3,NA,NA,4,6,5,6,4,2,5)
movingmean <- rollapply(x, 3, FUN = mean, na.rm = T)
now I want
2024 Aug 22
1
paired raster boxplots
Dear community
I have two raster files (here r and r2: y-axis) and an equal x-axis (here s,
4 classes).
Instead of plotting two boxplots I would like to plot paired boxplots: for
each class the boxplots from r and r2 paired).
I tried to adapt the code, but I am struggling around with the error:
> names(rs) <- c('r', 's', 'r2')
Error in `names<-`(`*tmp*`,
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",
2013 Sep 16
1
Patch: fix segfault from empty raster
Hi,
A colleague recently came across an R crash, which I can boil down to
the following, running under Rgui on Windows 7:
library(ggplot2)
ggplot(data.frame(x=1, y=1, z=4.7), aes(x, y, z=z)) + stat_summary2d()
This reliably causes a segmentation fault. sessionInfo() below.
What's happening is that (for reasons which I'll discuss with the
ggplot2 developers) the 'colorbar'
2012 Oct 29
3
How can I map numbers to colours with raster?
This code will read binary file and display it as a map. may problem is that
this code is using a continuous colour scheme, even though I have discrete
data (which is a classification scheme). How can I map numbers to colours
with raster? Please
require(raster)
conne <- file("C:\\lai.bin", "rb")
sd<- readBin(conne, integer(), size=1, n=360*720, signed=F)
2006 Jun 21
26
Implementing a boolean "switch" in a Class
I need a single boolean which would be "globally" accessible to all
instances of a class. Seems like the boolean should be in the class
prototype, but I was troubled by the difficulty of setting the prototype
boolean to true. Maybe I''m missing something?
var MyObject = Class.create();
MyObject.prototype = {
bSwitch: false,
... other methods and properties
}
var oMyOb1
2006 Aug 04
2
RoR: recognizing a defined class
Hi all,
I am very new to Ruby and I have a silly question: how do I get RoR to
"recognize" that I just defined a class? To be more explicit, I have a
controller and view, and then I want to create a class and get the
controller to "see" it. So, I created a file called "myobject.rb" in the
models/ directory and inside it defined "class myobject [...] end".
2003 Oct 22
2
Automatically updating GLM object
Dear all,
i generated several GLM objects, named myobject1 to myobject25.
Now i'd like to update both of them.
So i tried:
for(ii in 1:25) {
assign(paste("myobject.updated", ii, sep=""), update( myobject[ii]
,.~ + VAR2))
}
Doesn't work
I also tried to get all the names in a vector and
update(names.myobject[ii],.~ + VAR2)
Stiil doesn't work
Any ideas
2009 Nov 23
1
OOP with Encapsulated Class Definitions
Hi all,
I'm seeking feedback (good, bad or indifferent) in regards to
developing (further) a new class system for R, that uses encapsulated
class definitions (i.e. the method definitions are literally inside
the body of the class definition).
A working (however very rough and poorly tested) system is available
in my R package "oosp" with documentation in the vignette
2004 Nov 18
5
Lexical Scoping: eval(expr,envir=)
Hi R-listers,
I am trying to better undertand what we would call "functional paradigm"
use of S/R to better map my programming activities in other languages.
This little function is aimed to create an object (at the end end, it would
have it's own class):
--
myObject =function(){
list(
a=1,
foo=function(b)
{
cat("b:",b)
2006 Jun 17
2
problem with select_date
In my form I have these items:
<%= select_year Date.today,
:start_year => Schoolyear.get_startdate.year,
:end_year => Schoolyear.get_enddate.year %>
<%= select_month Date.today.month %>
No matter what I do, in my controller I can''t seem to access the
selected year and
month.
I have tried params[:month].to_s and also
2008 Nov 04
18
Can I do foo.should (be_nil || be_empty) in rspec
Is there any way to do
foo.should (be_nil || be_empty)
in rspec.
Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081104/ee43c9c9/attachment.html>
2006 Dec 12
1
S4 'properties' - creating 'slot' functions?
Dear R users!
Several languages like C# or VB allow one to create properties; typically
these are under 'get', 'set' tags. My question is this really, what are
similar or comparable strategies in R, and what might be preferred? I have a
couple of situations where I want a certain computation to belong to a
class, but I do not really want to seperate it out to a stand-alone
2006 Feb 17
2
Sorting Multiple Arrays
Hey Cats,
I''m having a problem. I''m working with an object that contains a bunch
of arrays:
var myObject = {
"data": [
{"line": [1,"aoo","far"]},
{"line": [2,"boo","ear"]},
{"line": [3,"coo","dar"]},
{"line":
2008 Jan 09
1
Subsetting Method [ Revisited
Hello Everyone:
As usual, thanks in advance for any help.
I was hoping to get some more advice on this question:
I'm trying to write a subsetting routine for an S3 object I've created --
lets call it myObject.
myObject has a few attributes basically of type string and numerics. Its
atomic value is just a vector of ints.
I want to write my own subsetting routine to subset myObject in