similar to: merge large number of raster objects

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
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
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
2005 Nov 23
8
getting started, reading listing and saving data
Dear List I am new to R and to the list and will try best as I can be clear and concise. My apologies if anything I write contravenes the posting code on this list. I would also like to say I have run through most of the material on the R website before writing this email however, I am stuck. Here is what I want to do and what I have done 1. Read a comma seperated text file into R I have used
2006 May 24
2
newbie oo question
Hey everyone, I''m trying to create an object that will have some properties predefined, but will allow me to pass in properties to override those standard props if needed. I''m trying something like: var myObject = Class.create(); myObject.prototype = { initialize: function(element, options) { this.element = $(element); this.name = this.element.id; this.options =
2005 Jul 19
2
Obtaining argument name within a function
Dear all How can I obtain the name of the argument passed in a function? Here is a simplistic example of what I would like to obtain: myfunction= function(name) { print(paste("The parameter name was",unknownFunction(name)) } myfunction(myobject) [1] "The parameter name was myobject" Thanks Francisco
2012 Jun 20
1
Edges and Rasters
Hi everyone! I would like to draw a line surrounding my raster, with i want it in black, and i don't know if its possible to change the colour. A simple example is: r <- raster(nrow=30, ncol=30, xmn=0) r[]<-NA r[393:409]<-99 r[423:439]<-99 r[453:455]<-99 r[456:460]<-30 r[461:469]<-99 r[483:499]<-99 r[513:529]<-99 plot(r,col=terrain.colors(100)) plot( edge(r,