Re: [R] order() with randomised order in ties?

2009-06-04 Thread Rainer M Krug
On Thu, Jun 4, 2009 at 12:45 PM, Rainer M Krug r.m.k...@gmail.com wrote: On Thu, Jun 4, 2009 at 12:36 PM, Patrick Burns pbu...@pburns.seanet.com wrote: How about: order(x, runif(length(x))) Thanks - that is really elegant. One thing: it is saver to use sample(length(x)) instead of runif

Re: [R] creating list with 200 identical objects

2009-06-02 Thread Rainer M Krug
= 'bar'    foos[[...@content$name    # bar in this case, even if you're careful enough to create two objects, they share the representation because they both get it from the same prototype. vQ -- Rainer M. Krug, Centre of Excellence for Invasion Biology, Stellenbosch University, South

[R] creating list with 200 identical objects

2009-06-01 Thread Rainer M Krug
the continuous reallocation of memory when a new track is added, and fill it wit the object created by new(track). How can I do this? thanks Rainer -- Rainer M. Krug, Centre of Excellence for Invasion Biology, Stellenbosch University, South Africa

Re: [R] creating list with 200 identical objects

2009-06-01 Thread Rainer M Krug
to understand. Thanks for these options. I think I will go with the first one, as it is the most intuitive one. Thanks, Rainer Romain Rainer M Krug wrote: Hi I am doing an simulation, and I a large proportion of the simulation time is taken up by memory allocations. I am creating

Re: [R] creating list with 200 identical objects

2009-06-01 Thread Rainer M Krug
On Mon, Jun 1, 2009 at 12:27 PM, Chuck Cleland cclel...@optonline.net wrote: On 6/1/2009 6:08 AM, Rainer M Krug wrote: Hi I am doing an simulation, and I a large proportion of the simulation time is taken up by memory allocations. I am creating an object, and storing it in a list of those

[R] Calculating Modal value and huge dataset

2009-04-02 Thread Rainer M Krug
])), sum) result - result[[1]][which.max(result[[2]])] return(result) } } ) p 158726 158727 158728 158729 158730 158731 3 3 3 3 NA NA -- Rainer M. Krug, Centre

Re: [R] limiting simulated animal movement

2009-03-21 Thread Rainer M Krug
list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Rainer M. Krug, Centre of Excellence for Invasion Biology, Stellenbosch University, South

[R] Automatically execute traceback when execution of script causes error?

2009-03-06 Thread Rainer M Krug
Hi I am using R scripts which are running remotely. To make debugging easier, I would like to have the possibility to execute traceback() automatically when an error occurs. Is this possible? OS: Linux Thanks Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation

Re: [R] Installing different versions of R simultaneously on Linux

2009-02-27 Thread Rainer M Krug
On Fri, Feb 27, 2009 at 12:37 PM, Prof Brian Ripley rip...@stats.ox.ac.uk wrote: This is really an R-devel question. sorry about the wrong list. On Fri, 27 Feb 2009, Rainer M Krug wrote: Hi I want to install some versions of R simultaneously from source on a computer (running Linux

Re: [R] Installing different versions of R simultaneously on Linux

2009-02-27 Thread Rainer M Krug
On Fri, Feb 27, 2009 at 1:49 PM, Berwin A Turlach ber...@maths.uwa.edu.au wrote: G'day Rainer, On Fri, 27 Feb 2009 10:53:12 +0200 Rainer M Krug r.m.k...@gmail.com wrote: What flavour of Linux are we talking about? Sorry - I am running SuSE on the machine where I need it. Sorry, I am

[R] Installing different versions of R simultaneously on Linux

2009-02-26 Thread Rainer M Krug
for the executables? Thanks Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Faculty of Science Natural Sciences Building Private Bag X1 University of Stellenbosch Matieland 7602 South Africa

[R] R interest group at Stellenbosch University formed: r...@sun

2009-02-25 Thread Rainer M Krug
of the email. Please feel free to contact me if you have further questions me (Rainer Krug)        rai...@krugs.de or, the easier solution, subscribe to the mailing list and post your question there. Hope to see you there, Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation

Re: [R] maptools: Test if point is in polygon

2009-02-05 Thread Rainer M Krug
__ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Rainer M. Krug, PhD (Conservation Ecology, SUN

Re: [R] Running R under Sun Grid Engine with OpenMPI tight integration

2009-01-27 Thread Rainer M Krug
On Tue, Jan 27, 2009 at 11:04 AM, Marce marc...@gmail.com wrote: 2009/1/27 Rainer M Krug r.m.k...@gmail.com: On Tue, Jan 27, 2009 at 2:30 AM, Peter Waltman peter.walt...@gmail.com wrote: Hi - I saw your posting on the R-help mailing list. Were you ever able to get this working? did you

Re: [R] Running R under Sun Grid Engine with OpenMPI tight integration

2009-01-26 Thread Rainer M Krug
it going. Thanks! Peter Waltman -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Faculty of Science Natural Sciences Building Private Bag X1 University of Stellenbosch Matieland 7602 South Africa

Re: [R] How to calculate the distance between two density functions

2008-12-06 Thread Rainer M Krug
-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Faculty of Science Natural Sciences Building Private

Re: [R] Running R under Sun Grid Engine with OpenMPI tight integration

2008-12-04 Thread Rainer M Krug
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology

Re: [R] Running R under Sun Grid Engine with OpenMPI tight integration

2008-12-04 Thread Rainer M Krug
On Fri, Dec 5, 2008 at 12:11 AM, Sean Davis [EMAIL PROTECTED] wrote: On Thu, Dec 4, 2008 at 5:21 AM, Rainer M Krug [EMAIL PROTECTED] wrote: Did you make any progress in using R in the SGE / OpenMPI environment? I am asking, because I am struggling with the same problem. Using qsub does

Re: [R] Latin Hypercube with condition sum = 1

2008-11-25 Thread Rainer M Krug
On Tue, Nov 25, 2008 at 4:16 PM, Rob Carnell [EMAIL PROTECTED] wrote: Rainer M Krug r.m.krug at gmail.com writes: Hi I want to du a sensitivity analysis using Latin Hypercubes. But my parameters have to fulfill two conditions: 1) ranging from 0 to 1 2) have to sum up to 1 So far I am

Re: [R] Latin Hypercube with condition sum = 1

2008-11-24 Thread Rainer M Krug
sum(x)1 -- although it won't work if length(x)2 or var(x)==0) transformation 2 will necessarily reduce the range and therefore not violate criterion 1 ... ? Ben Bolker Rainer M Krug wrote: On Sun, Nov 23, 2008 at 7:43 PM, Ben Bolker [EMAIL PROTECTED] wrote: Rainer M Krug r.m.krug

[R] Problem with Rmpi and snow - makeCluster(type=MPI) not working

2008-11-24 Thread Rainer M Krug
major 2 minor 7.2 year 2008 month 08 day25 svn rev46428 language R version.string R version 2.7.2 (2008-08-25) Any help welcome, Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys

Re: [R] Problem with Rmpi and snow - makeCluster(type=MPI) not working

2008-11-24 Thread Rainer M Krug
Sorry - posting reposted at R-sig-hpc Rainer On Mon, Nov 24, 2008 at 4:45 PM, Rainer M Krug [EMAIL PROTECTED] wrote: Hi I managed tio install Rmpi and to load it, but I get the following errormessage when I try to create an MPI cluster and R hangs (no response): library(Rmpi) [head001

[R] Latin Hypercube with condition sum = 1

2008-11-23 Thread Rainer M Krug
/ wsSums but I think I can't do that, as after the normalization min(wss) [1] 0.0001113015 max(wss) [1] 0.5095729 Therefore my question: how can I create a Latin Hypercube whicgh fulfills the conditions 1) and 2)? Thanks a lot Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc

Re: [R] Latin Hypercube with condition sum = 1

2008-11-23 Thread Rainer M Krug
On Sun, Nov 23, 2008 at 7:43 PM, Ben Bolker [EMAIL PROTECTED] wrote: Rainer M Krug r.m.krug at gmail.com writes: Hi I want to du a sensitivity analysis using Latin Hypercubes. But my parameters have to fulfill two conditions: 1) ranging from 0 to 1 2) have to sum up to 1 Perhaps I'm

[R] matlab style of storing arrays compared to R

2008-11-21 Thread Rainer M Krug
the following reference http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/matlab_prog/f1-86528.html#f1-86846 And it seems to be the same, but another source says it is different. Could somebody confirm, if it is the same? Thanks, Rainer -- Rainer M

Re: [R] matlab style of storing arrays compared to R

2008-11-21 Thread Rainer M Krug
and Linpack) and uses the same representation of arrays. Thanks a lot for your detailed explanation. This will make my life much easier. Rainer On Fri, Nov 21, 2008 at 2:41 AM, Rainer M Krug [EMAIL PROTECTED] wrote: Hi I am trying to figure out, if the matlab style of linear indexing

[R] C++ code from R

2008-11-19 Thread Rainer M Krug
/EMD/EmdL1_vs/emdL1_R.so: undefined symbol: _ZN5EmdL1D1Ev --- The two other files (emdL1.h and emdL1.cpp) are in the following zip file: http://vision.ucla.edu/~hbling/code/EmdL1_v2.zip Any suggestions are welcome, Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN

Re: [R] C++ code from R

2008-11-19 Thread Rainer M Krug
On Wed, Nov 19, 2008 at 2:57 PM, Duncan Temple Lang [EMAIL PROTECTED] wrote: Rainer M Krug wrote: Hi I managed to compile (and use) C code from R, but now I have to use C++ code. After reading Writing R extensions, I came up with the following code, which compiles fine

[R] skeleton for package containing C code?

2008-11-19 Thread Rainer M Krug
to make it easier to install the function on several Linux computers - no windows required at the moment. Thanks, Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Faculty of Science Natural

[R] Need help in calling C code from R

2008-11-16 Thread Rainer M Krug
should be rather straight forward, but there are still several things I don't understand. Could somebody please help me in calling the code from R? Thanks, Rainer P.S: if the code works nicely, I would like to either put it into a package or add it to one. -- Rainer M. Krug, PhD (Conservation

Re: [R] Mallows' distance or Earth Mover's distance in R?

2008-10-27 Thread Rainer M Krug
package distrMod one can compute minimum distance estimators. Thanks a lot for this info - I will look into these options. Rainer library(distrMod) ?MCEstimator ?MDEstimator hth, Matthias Rainer M Krug wrote: Hi I am looking for an implementation (or alternative to) Mallow's distance

[R] Mallows' distance or Earth Mover's distance in R?

2008-10-26 Thread Rainer M Krug
Hi I am looking for an implementation (or alternative to) Mallow's distance or the Earth Mover's distance to compare distributions or unnormalized distributions (signatures). Is there an implementation in R or can somebody recommend an alternative? Thanks Rainer -- Rainer M. Krug, PhD

Re: [R] Desperatly seeking Parallel R simulation with Windows XP

2008-09-30 Thread Rainer M Krug
and provide commented, minimal, self-contained, reproducible code. -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Faculty of Science Natural Sciences Building Private Bag X1 University

Re: [R] Problem with R on dual core under Linux - can not execute mpi.spawn.Rslaves()

2008-09-29 Thread Rainer M Krug
On Mon, Sep 29, 2008 at 12:19 AM, Martin Morgan [EMAIL PROTECTED] wrote: Rainer M Krug [EMAIL PROTECTED] writes: Hi I am trying to utilize my dual core processor (and later a High-performance clusters (HPC) ) by using the Rmpi, snow, snowfall, ... packages, but I am struggling

Re: [R] Problem with R on dual core under Linux - can not execute mpi.spawn.Rslaves()

2008-09-29 Thread Rainer M Krug
mpich (almost surely that can be avoided but it may be easier if you don't really need mpich). OK - I don't mind if I am using lam or mpich, so which one should I use? I am confused. If it helps, I am using Ubuntu Hardy Rainer Best, luke On Mon, 29 Sep 2008, Rainer M Krug wrote: On Mon

Re: [R] Problem with R on dual core under Linux - can not execute mpi.spawn.Rslaves()

2008-09-29 Thread Rainer M Krug
simulation) to run one complete simulation on one node. Thanks Rainer On Mon, Sep 29, 2008 at 3:46 PM, Rainer M Krug [EMAIL PROTECTED] wrote: On Mon, Sep 29, 2008 at 3:05 PM, Luke Tierney [EMAIL PROTECTED] wrote: Look at the configure output below: configure is finding mpi.h in /usr/lib/mpich

[R] Problem with R on dual core under Linux - can not execute mpi.spawn.Rslaves()

2008-09-27 Thread Rainer M Krug
the pdf Developing parallel programs using snowfall by Jochen Knaus,. installed the relevant libraries and programs, but it does not work. I am stuck. Any help appreciated, Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre

[R] use of system() under Linux

2008-09-22 Thread Rainer M Krug
are exclusive, either the one or the other. Is this true, or is there another way of accomplishing this? My prefered return value would be a list, consisting of thre entries: return code of the command stderr and the result Thanks Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc

[R] evaluate return values of commands executed with system()

2008-09-19 Thread Rainer M Krug
Hi I would like to check the return value of commands executed with system() I am using Linux (Ubuntu Hardy) and I am executing GRASS commands and would like to call stop() when they return an error (i.e. return code = 1). Thanks Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN

[R] linebreak in mathematical anotation?

2008-09-01 Thread Rainer M Krug
to have it with set in a second column, like tt - c(First\nset, Second\nset, third\nset) barplot(1:3, names.arg=tt) only in italics. Is this possible? Thanks Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence

Re: [R] linebreak in mathematical anotation?

2008-09-01 Thread Rainer M Krug
for Rainer On Mon, Sep 1, 2008 at 12:17 PM, Rainer M Krug [EMAIL PROTECTED] wrote: Hi I am using mathematical anotation to make the labels in a barplot in italics. as an example (adapted from http://finzi.psych.upenn.edu/R/Rhelp02a/archive/129808.html): tt - c(italic(First~~set), italic(Second

Re: [R] linebreak in mathematical anotation?

2008-09-01 Thread Rainer M Krug
On Mon, Sep 1, 2008 at 5:26 PM, Rainer M Krug [EMAIL PROTECTED] wrote: On Mon, Sep 1, 2008 at 5:22 PM, Henrique Dallazuanna [EMAIL PROTECTED] wrote: If I understand: tt - c(expression(italic('First\nset')), expression(italic('Second\nset')), expression(italic('third\nset'))) barplot(1:3

[R] bug in readRAST6 function in package spgrass6

2008-08-01 Thread Rainer M Krug
= to_int) : no such file: /home/rkrug/Documents/Projects/AlienSpread/R/../grass/simulation/.tmp/ecolmod/HSericea_seedsDisperse_2007 Thanks Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion

Re: [R] bug in readRAST6 function in package spgrass6

2008-08-01 Thread Rainer M Krug
On Fri, Aug 1, 2008 at 6:03 PM, Roger Bivand [EMAIL PROTECTED] wrote: On Fri, 1 Aug 2008, Rainer M Krug wrote: Hi if I try to import a raster layer which consists only of NULL values from grass by using the readRAST6, I get an error message: readRAST6(HSericea_seedsDisperse_2007) ERROR

Re: [R] version problems of rkward in ubuntu hardy repository

2008-07-10 Thread Rainer M Krug
On Thu, Jul 10, 2008 at 6:26 AM, Vincent Goulet [EMAIL PROTECTED] wrote: Le mer. 09 juil. à 06:20, Rainer M Krug a écrit : Hi I tried to install rkward under ubuntu hardy heron, but it tried to use the one from the cran repository which was newer, but it did not install. To be able

[R] version problems of rkward in ubuntu hardy repository

2008-07-09 Thread Rainer M Krug
the feeling, that the dependencies are not correct (it is looking for libqt4GUI, but I have a libqt4-GUI from the ubuntu repository). Just for information, Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Plant Conservation Unit

[R] rpart with circular data?

2008-05-12 Thread Rainer M Krug
could use to transform aspect? Thanks Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Plant Conservation Unit Department of Botany University of Cape Town Rondebosch 7701 South Africa

[R] RMySQL and R 2.7.0 - Error in field.types$row.names : $ operator is invalid for atomic vectors

2008-05-08 Thread Rainer M Krug
, tblName, dat, overwrite=FALSE, append=TRUE ) Error in field.types$row.names : $ operator is invalid for atomic vectors -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Plant

[R] Selecting elements in vector

2008-03-14 Thread Rainer M Krug
way, that I can do that easily? Thanks Rainer -- Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT) Plant Conservation Unit Department of Botany University of Cape Town Rondebosch 7701 South Africa __ R-help@r-project.org mailing

Re: [R] Selecting elements in vector

2008-03-14 Thread Rainer M Krug
Thanks - that is exactly what I was looking for Rainer On Fri, Mar 14, 2008 at 1:10 PM, Henrique Dallazuanna [EMAIL PROTECTED] wrote: Try this: x[x %in% y] On 14/03/2008, Rainer M Krug [EMAIL PROTECTED] wrote: Hi Consider the following code x - rep(1:13, 13) y

Re: [R] How to plot raster obtained from readRAST6 in grey scale?

2008-03-09 Thread Rainer M Krug
Thanks - I was quite in a rush when writing the question - sorry about that. But it works now with image(TheImage, col=gray.colors(10, start=0.9, end=0.3) On 08/03/2008, Roger Bivand [EMAIL PROTECTED] wrote: Uwe Ligges ligges at statistik.tu-dortmund.de writes: Rainer M Krug wrote

[R] How to navigate in layout() created graph?

2008-03-07 Thread Rainer M Krug
using a function which is converting the number to mfg parameter for par, but it does not seem to work as expected. Thanks, Rainer -- Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT) Plant Conservation Unit Department of Botany University of Cape Town Rondebosch 7701 South

[R] How to plot raster obtained from readRAST6 in grey scale?

2008-03-07 Thread Rainer M Krug
Hi I have a raster which I would like to plot in a greyscale instead of colour. Is this possible, and how? Thanks Rainer -- Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT) Plant Conservation Unit Department of Botany University of Cape Town Rondebosch 7701 South Africa

Re: [R] How to navigate in layout() created graph?

2008-03-07 Thread Rainer M Krug
On 07/03/2008, Charilaos Skiadas [EMAIL PROTECTED] wrote: On Mar 7, 2008, at 7:18 AM, Rainer M Krug wrote: Hi I created a complex layout with using layout() and it looks exactly as I need it. But I don't want to print in the order in which the subfigure are numbered

Re: [R] How to navigate in layout() created graph?

2008-03-07 Thread Rainer M Krug
On 07/03/2008, Charilaos Skiadas [EMAIL PROTECTED] wrote: On Mar 7, 2008, at 8:02 AM, Rainer M Krug wrote: On 07/03/2008, Charilaos Skiadas [EMAIL PROTECTED] wrote: On Mar 7, 2008, at 7:18 AM, Rainer M Krug wrote: Hi I created a complex layout with using layout() and it looks

[R] Plan to build Package to use GRASS from R

2008-02-27 Thread Rainer M Krug
easily all commands from GRASS and the parameters possible and required? Any ideas and comments welcome, Rainer -- Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT) Plant Conservation Unit Department of Botany University of Cape Town Rondebosch 7701 South Africa

Re: [R] [R-sig-Geo] Plan to build Package to use GRASS from R

2008-02-27 Thread Rainer M Krug
to add waht you develop to that package. Sounds like a perfect suggestion - otherwise everything could become to fragmented and difficult to use. Regards, Virgilio -- -- Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT) Plant Conservation Unit Department of Botany

[R] Analysis with spatstat and Kcross() requires to much memory

2008-02-14 Thread Rainer M Krug
2008 month 02 day08 svn rev44383 language R version.string R version 2.6.2 (2008-02-08) -- Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT) Plant Conservation Unit Department of Botany University of Cape Town Rondebosch 7701 South

Re: [R] advice requested re: building good system (R, SQL db) for handling large datasets

2008-02-06 Thread Rainer M Krug
/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- -- Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT) Plant Conservation Unit Department of Botany University of Cape Town Rondebosch 7701 South Africa [[alternative HTML

Re: [R] problem getting multiple densityplots on one page

2008-02-01 Thread Rainer M Krug
]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- -- Rainer M. Krug, Dipl. Phys

Re: [R] problem getting multiple densityplots on one page

2008-02-01 Thread Rainer M Krug
Sorry - I thought about plot(density()) should read more carefull... On 01/02/2008, Gavin Simpson [EMAIL PROTECTED] wrote: On Fri, 2008-02-01 at 14:00 +0200, Rainer M Krug wrote: On 01/02/2008, Ng Stanley [EMAIL PROTECTED] wrote: Hi, I used the following statements to generate

Re: [R] using facet_grid() from ggplot2 with additional text in labels

2008-01-28 Thread Rainer M Krug
, properly conducted, is a delicate dissection of uncertainties, a surgery of suppositions. ~M.J.Moroney -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Rainer M Krug Verzonden: zaterdag 26 januari 2008 14:15 Aan: r-help; hadley wickham Onderwerp: [R

[R] Putting frame around single panels in ggplot 2 and facet_grid()

2008-01-27 Thread Rainer M Krug
Hi I want to highlight two panels in a grid created with facet_grid() by putting a box around it or usiong another background colour. Is this possible, and if yes, how? Thanks Rainer -- Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT) Plant Conservation Unit Department

[R] using facet_grid() from ggplot2 with additional text in labels

2008-01-26 Thread Rainer M Krug
Hi I am using ggplot2 at the moment and I must say it is definitely better then ggplot - good work. My problem is that I am using facet_grid() in the following way: p - ggplot(ssq, aes(x=year, y=-log(ssq))) p + geom_point() + facet_grid(me*gi~cs*rz) and it works nicely, except that I

[R] lapply without return values?

2008-01-25 Thread Rainer M Krug
Hi I am looking for a function which is executing some code repeatedly, exactly like lapply() and sappl() are doing, but do not return anything as I am not interested in the return values. An example would be: p - data.frame(runif(10), runif(10), runif(10)) lapply( p, function(ps) {x11();

Re: [R] lapply without return values?

2008-01-25 Thread Rainer M Krug
Berwin A Turlach wrote: G'day Rainer, On Fri, 25 Jan 2008 10:34:32 +0200 Rainer M Krug [EMAIL PROTECTED] wrote: [...] p - data.frame(runif(10), runif(10), runif(10)) lapply( p, function(ps) {x11(); plot(ps)} ) which results in three graphs and a printout: [...] How can I avoid

[R] Calculating sum of squares from density estimates

2008-01-24 Thread Rainer M Krug
Hi I have some density estimates obtained from density(). I would like to calculate the sum of squares of these. As the x values of the estimates are not the same, and I would prefer not to restrict the estiomate to a certain range of x values, how can I do the calculation? Lets say: d1 -

Re: [R] Calculating sum of squares from density estimates

2008-01-24 Thread Rainer M Krug
David Winsemius wrote: Rainer M Krug [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: Hi I have some density estimates obtained from density(). I would like to calculate the sum of squares of these. As the x values of the estimates are not the same, and I would prefer not to restrict

[R] Question concerning pdfs

2008-01-16 Thread Rainer M Krug
Hi I have a dataset of absolute growth rates g ranging from close to 0 to around whatever of which I want to calculate a pdf. If I use density(g) the pdf will extend to below 0 so I logtransform g and do d - density(log(g)). Now I would like to transform this pdf back, i.e. d$x - exp(d$x) but

Re: [R] Question concerning pdfs

2008-01-16 Thread Rainer M Krug
://www.student.kuleuven.be/%7Em0390867/dimitris.htm - Original Message - From: Rainer M Krug [EMAIL PROTECTED] To: r-help [EMAIL PROTECTED] Sent: Wednesday, January 16, 2008 10:34 AM Subject: [R] Question concerning pdfs Hi I have a dataset of absolute growth rates g ranging

[R] Looking for simpler solution to probabilistic question

2008-01-15 Thread Rainer M Krug
Hi I have two processes which take with a certain probability (p1 and p2) x number of years to complete (age1 and age2). As soon as thge first process is completed, the second one begins. I want to calculate the time it takes for the both processes to be completed. I have the following script

Re: [R] Looking for simpler solution to probabilistic question

2008-01-15 Thread Rainer M Krug
Berwin A Turlach wrote: G'day Rainer, On Tue, 15 Jan 2008 14:24:08 +0200 Rainer M Krug [EMAIL PROTECTED] wrote: ager - range(age1) + range(age2) ager - ager[1]:ager[2] pp1 - c(cumsum(p1), rev(cumsum(rev(p1 pp2 - c(cumsum(p2[-21]), rev(cumsum(rev(p2)))[-1]) pr - pp1+pp2 pr - pr

[R] Using density() and turnpoint to Identify maxima in data

2007-11-19 Thread Rainer M. Krug
results in different bandwidths) to be able to compare the identified maxima between different datasets? And: Is there a better approach to do this? Thanks a lot in advance, Rainer -- NEW EMAIL ADDRESS AND ADDRESS: [EMAIL PROTECTED] [EMAIL PROTECTED] WILL BE DISCONTINUED END OF MARCH Rainer M

Re: [R] analytical solution to Sum of binominal distributed random numbers?

2007-10-24 Thread Rainer M Krug
sum (rbinom( length(prob) , size, prob ) ) works. Chuck On Tue, 23 Oct 2007, Rainer M Krug wrote: Hi I have two vectors, prob and size, and I want to add the random deviates of these two, i.e. sum( sapply( 1:length(prob), function(n){ rbinom(1, size(n), prob(n

Re: [R] analytical solution to Sum of binominal distributed random numbers?

2007-10-24 Thread Rainer M. Krug
: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] På vegne af Rainer M Krug Sendt: 24. oktober 2007 09:11 Til: Charles C. Berry Cc: r-help Emne: Re: [R] analytical solution to Sum of binominal distributed random numbers? Hi Charles thanks for the pointing out that size and prob can be vectors

Re: [R] analytical solution to Sum of binominal distributed random numbers?

2007-10-24 Thread Rainer M. Krug
(Z)( n = 5 ) # random variates Please note, however, that size and prob must be of length 1. Best, Jay On 10/24/07, Rainer M. Krug [EMAIL PROTECTED] wrote: Frede Aakmann Tøgersen wrote: Perhaps http://stinet.dtic.mil/cgi-bin/GetTRDoc?AD=ADA266969Location=U2doc=GetTRDoc.pdf

Re: [R] flipping vector and matrix

2007-10-23 Thread Rainer M Krug
,]123 [2,]456 [3,]789 apply(t(x),1,rev) [,1] [,2] [,3] [1,]789 [2,]456 [3,]123 On Tue, 23 Oct 2007, Rainer M Krug wrote: Hi I have a vector x - c(1, 2, 3, 4, 5) and I want to flip it around, i.e. I need 5

Re: [R] flipping vector and matrix

2007-10-23 Thread Rainer M Krug
,]147 [2,]258 [3,]369 arev(b) [,1] [,2] [,3] [1,]963 [2,]852 [3,]741 On 23 Oct 2007, at 11:45, Rainer M Krug wrote: Hi I have a vector x - c(1, 2, 3, 4, 5) and I want to flip it around, i.e. I

[R] adding matrix of smaller dimensions to matrix of larger dimensions and apply question

2007-10-23 Thread Rainer M Krug
Hi I have another question concerning matrices: I have two matrices: b - matrix(1:25,5,5,byrow=T) b [,1] [,2] [,3] [,4] [,5] [1,]12345 [2,]6789 10 [3,] 11 12 13 14 15 [4,] 16 17 18 19 20 [5,] 21 22 23 24 25 and d -

Re: [R] One pdf file with plots and text output

2007-10-17 Thread Rainer M. Krug
Olivier Delaigue * wrote: Maybe with: print(plot.new()) mtext(summary(xlm)) Thanks Olivier - that sounds like an easy approach - I'll try itr out and report back. Rainer Regards, Olivier Delaigue Rainer M Krug-2 wrote: Hi I create one pdf file with plots via pdf() and one

Re: [R] One pdf file with plots and text output

2007-10-17 Thread Rainer M Krug
Dirk Eddelbuettel wrote: On 17 October 2007 at 10:44, Rainer M Krug wrote: | I create one pdf file with plots via pdf() and one text file with text | via sink() that works very nice. But I would prefer to have one pdf file | with plots and the text which I store in the te=xt file via sink

Re: [R] R-2.6.0 - packages installation through a proxy - not working

2007-10-16 Thread Rainer M. Krug
/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- NEW EMAIL ADDRESS AND ADDRESS: [EMAIL PROTECTED] [EMAIL PROTECTED] WILL BE DISCONTINUED END OF MARCH Rainer M. Krug, Dipl. Phys

Re: [R] R-2.6.0 - packages installation through a proxy - not working

2007-10-16 Thread Rainer M Krug
Liviu Andronic wrote: On 10/16/07, Rainer M. Krug [EMAIL PROTECTED] wrote: I always change the variables in the terminal window before I start R, i.e. export http_proxy=SERVER:3128 export ftp_proxy=SERVER:3128 and then start R - I did it this morning, and it worked. I always start up

[R] error message with option checkBuild in update.packages in R 2.6.0

2007-10-10 Thread Rainer M Krug
Hi System: Linux Open SuSE 10.2 I upgraded to R 2.6.0 and wanted to upgrade my packages as well. I tried to use the checkBuild=TRUE option in update.packages, it asked me if I wanted to update the package and I answered with yes, and finally ig tave me the error message unknown parameter

Re: [R] error message with option checkBuild in update.packages in R2.6.0

2007-10-10 Thread Rainer M Krug
Van Campenhout Bjorn wrote: I upgraded to R 2.6.0 and wanted to upgrade my packages as well. I tried to use the checkBuild=TRUE option in update.packages, it asked me if I wanted to update the package and I answered with yes, and finally ig tave me the error message unknown parameter

Re: [R] Linux editor for R+LaTeX, but not Emacs

2007-10-08 Thread Rainer M. Krug
Christian Salas wrote: Using Tinn-R (in windows) is possible to run latex and R from the same editor, which was great. Now, I am using Ubuntu-linux, which has been better than WinXP. Currently, I am using Emacs (and then install ESS) for running LaTeX and R from a same editor-program (like

Re: [R] Concatenating one character vector into one string

2007-10-01 Thread Rainer M. Krug
Thanks a million Rainer [EMAIL PROTECTED] wrote: x - c(This , is , one , sentence.) paste(x,collapse=) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Rainer M. Krug Sent: 01 October 2007 13:23 To: r-help Subject: [R] Concatenating one

<    1   2   3   4