Re: [R] using which to identify a range of values

2008-07-18 Thread Sebastian P. Luque
On Fri, 18 Jul 2008 11:42:09 -0700, sj <[EMAIL PROTECTED]> wrote: [...] > a <- rnorm(1000, 100, 50) which( 100 < a <= 200) > of course this doesn't work but illustrates what I ma trying to do, If > anyone has suggestions I would greatly appreciate it Have a look at ?& -- Seb

[R] update'ing trellis object

2009-10-03 Thread Sebastian P. Luque
Hi, I thought the following would only remove the legend element of a trellis object, but it actually removes both the legend and key elements: fig <- xyplot(Sepal.Length ~ Petal.Length, groups=Species, data=iris, key=list(x=1, y=0.02, corner=c(1, 0), size=3, between=1,

[R] update'ing trellis object

2009-10-03 Thread Sebastian P. Luque
Hi, I thought the following would only remove the legend element of a trellis object, but it actually removes both the legend and key elements: ------ fig <- xyplot(Sepal.Length ~ Petal.Length, groups=Species, data=iris,

Re: [R] update'ing trellis object

2009-10-04 Thread Sebastian P. Luque
On Sun, 4 Oct 2009 16:14:58 -0400, Gabor Grothendieck wrote: > On Sun, Oct 4, 2009 at 3:45 PM, Deepayan Sarkar > wrote: > Yes, unfortunately the trellis object cannot distinguish between the >> "legend" and the "key" any more. > If you are willing to muck around at the grid level you can do it

[R] suffix convention?

2009-04-23 Thread Sebastian P. Luque
Hi, Is there some convention for choosing 'RData' or 'rda' for binary files written by save() or save.image()? The docs treat these interchangeably. Thanks. Cheers, -- Seb __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/

[R] [R-pkgs] diveMove 1.6.0 released

2021-05-17 Thread Sebastian P. Luque
see help(diveMove-defunct) and help(diveMove-deprecated) for details. https://github.com/spluque/diveMove -- Sebastian P. Luque ___ R-packages mailing list r-packa...@r-project.org https://stat.ethz.ch/mailman/listinfo/r-packages

[R] multiple filled.contour() on single page

2013-03-15 Thread Sebastian P. Luque
Hi, It seems as if filled.contour can't be used along with layout(), or par(mfrow) or the like, since it sets the page in a very particular manner. Someone posted a workaround (http://r.789695.n4.nabble.com/several-Filled-contour-plots-on-the-same-device-td819040.html). Has a better approach been

Re: [R] Options to extend memory limit

2012-10-11 Thread Sebastian P. Luque
On Thu, 11 Oct 2012 14:45:16 +0200, wrote: > Dear All, at the moment I am using R for calculations of large > databases. Unfortunately, R only manages to complete certain > operations at some times, and not at others. I usually get the error > message "cannot allocate vector of size XX" > I am

Re: [R] write.table -- maintain decimal places

2011-01-25 Thread Sebastian P. Luque
On Tue, 25 Jan 2011 16:16:37 -0800, Jim Moon wrote: > Hello, All, How can I maintain the decimal places when using > write.table()? Have a look at ?format.data.frame -- Seb __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/

[R] 'panel.smooth' error

2010-08-18 Thread Sebastian P. Luque
Hi, The following call: xyplot(incidence ~ year, melanoma, panel=panel.smooth) produces a blank plot region with an error message: Error using packet 1 plot.new has not been called yet > sessionInfo() R version 2.11.1 (2010-05-31) x86_64-pc-linux-gnu locale: [1] LC_CTYPE=en_CA.UTF-8

Re: [R] 'panel.smooth' error

2010-08-18 Thread Sebastian P. Luque
On Wed, 18 Aug 2010 13:56:23 -0700 (PDT), Phil Spector wrote: > Sebastian - panel.loess will be more suitable for use with xyplot. To > get both points and the smoothed line, you can use > xyplot(incidence~year,melanoma,panel=function(x,y,...){ > panel.xyplot(x,y,...) panel.loess(x,y,...)}) T

[R] L-BFGS-B and parscale in optim()

2011-05-25 Thread Sebastian P. Luque
Hi, When using method L-BFGS-B along with a parscale argument, should the lower and upper bounds provided be on the scaled or unscaled values? Thanks. Cheers, -- Seb __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PL

Re: [R] L-BFGS-B and parscale in optim()

2011-05-25 Thread Sebastian P. Luque
On Wed, 25 May 2011 23:46:02 +, Ben Bolker wrote: > Sebastian P. Luque gmail.com> writes: >> Hi, >> When using method L-BFGS-B along with a parscale argument, should the >> lower and upper bounds provided be on the scaled or unscaled values? >> Thanks. >

Re: [R] L-BFGS-B and parscale in optim()

2011-05-25 Thread Sebastian P. Luque
On Wed, 25 May 2011 19:33:24 -0500, "Sebastian P. Luque" wrote: > which shows me that the estimate for at least one parameter is outside > the bounds. I meant the value for the parameter during the failing iteration, not the estimate, of

Re: [R] L-BFGS-B and parscale in optim()

2011-05-25 Thread Sebastian P. Luque
On Wed, 25 May 2011 19:33:24 -0500, "Sebastian P. Luque" wrote: > which shows me that the estimate for at least one parameter is outside > the bounds. I'll try to prepare a simplified example to reproduce. I got it, it turned out to be the ndeps being too large so it pus

Re: [R] Group by multiple variables

2011-05-30 Thread Sebastian P. Luque
On Mon, 30 May 2011 16:47:45 -0500, "Mendolia, Franco" wrote: > Hello, I would like to create a group variable that is based on the > values of three variables: > For example, >> dat <- data.frame(A=c(1,1,1,1,1,2,2,2,2,2), > B=c(1,1,1,5,5,5,9,9,9,9), > C=c(1,1,1,1,1,2,2,7,7,

[R] segplot (latticeExtra)

2010-05-24 Thread Sebastian P. Luque
Hi, I'm having a bit of trouble with 'scales="free"' in the segplot() function of latticeExtra. Say we need panels for each year, showing only those counties that are represented in each one: ------ library(latticeExtra) data(U

Re: [R] combining expressions in mathplot

2010-06-08 Thread Sebastian P. Luque
On Wed, 9 Jun 2010 00:15:19 -0400, "RICHARD M. HEIBERGER" wrote: > text(5,1, parse(text=paste(deparse(aa[[1]]), deparse(bb[[1]]), > sep="~"))) text(5,2, parse(text=paste(deparse(aa[[1]]), > deparse(bb[[1]]), sep="~', '~"))) > Is there a cleaner way of combining the expressions aa and bb to get >

[R] tryCatch in a package

2012-03-07 Thread Sebastian P. Luque
Hi, Suppose we have a general function that returns a logical indicating which values in 'x' are found in 'l', throwing an error if none are found and a warning if only some are found: "checkFun" <- function(l, x) { xinl <- x %in% l if (! any(xinl)) stop("none of the x values found in l")

[R] [R-pkgs] diveMove 1.3.1

2012-03-14 Thread Sebastian P. Luque
/Tk widgets, to accomodate for changes in R 2.14.2. Legend is plotted only if there is at least one level in the phase factor. Cheers, -- Sebastian P. Luque, Ph.D. Department of Biological Sciences University of Manitoba http://www.ucs.mun.ca/~sluque _

Re: [R] Default Argument Passing in Script

2008-06-11 Thread Sebastian P. Luque
On Wed, 11 Jun 2008 21:01:54 +0800, "Gundala Viswanath" <[EMAIL PROTECTED]> wrote: > Hi all, Currently I run R script with arguments the following ways > $ R --vanilla < myscript.R ARGUMENT1 I don't think that call could possibly recognize ARGUMENT1 in myscript.R, according to the docs. > And

Re: [R] passing a variable at the command line

2008-07-01 Thread Sebastian P. Luque
Hi Erin, On Tue, 1 Jul 2008 18:49:02 -0500, "Erin Hodgess" <[EMAIL PROTECTED]> wrote: > Dear R People: I have used > ./R --no-save -q -f e.in >stuff.out > with great success on SUSE10.1 with R-2.7.1. > My question is, please: is there a way to pass in a variable to the > e.in file? I'm fairl

Re: [R] subset and boxplots

2008-04-22 Thread Sebastian P. Luque
On Tue, 22 Apr 2008 07:55:41 -0800, "Marlin Keith Cox" <[EMAIL PROTECTED]> wrote: > R users, This should be simple, but I cannot figure it out. I import > test.csv, then create a subset for "brook_dis". When I plot (week, R) > I get a nice boxplot, but along the x axis, there are weeks a, b, c >

[R] Sweave data-figure coupling

2009-01-05 Thread Sebastian P. Luque
Hi, With the following Sweave minimal file: ------ \documentclass{article} \usepackage{Sweave} \begin{document} <>= thetas <- seq(0, 1, by=0.001) prior <- rep(1, length(thetas)) / length(thetas) lik <- dbinom(1, 1, thetas) l

Re: [R] Sweave data-figure coupling

2009-01-05 Thread Sebastian P. Luque
On Mon, 05 Jan 2009 15:14:37 -0500, Duncan Murdoch wrote: [...] > You missed an @ after this chunk. If this is true in the original, > I'm surprised Sweave didn't report an error, but it probably ate up > the second chunk as part of the first. AFAIK there's no need to separate every chunk by "

Re: [R] behavior of "by"

2008-10-28 Thread Sebastian P. Luque
On Tue, 28 Oct 2008 18:04:57 -0700, Jeff Laake <[EMAIL PROTECTED]> wrote: > Any insight into the behavior of "by" in the following case would be > appreciated. There is a note in the help details for "by" about > documenting behavior since v2.7 but I don't entirely understand what > it is saying.

Re: [R] behavior of "by"

2008-10-29 Thread Sebastian P. Luque
On Wed, 29 Oct 2008 10:49:03 -0700, Jeff Laake <[EMAIL PROTECTED]> wrote: > Again thanks for the input. I've been a recipient of this list for > quite a few years although I don't post often. It is an invaluable > resource and I appreciate the effort of all the contributors. I > support a lot o

Re: [R] unable to install rjags on 64-bit Debian Linux (etch)

2008-11-09 Thread Sebastian P. Luque
Hi Roger, On Sat, 08 Nov 2008 14:31:01 -0800, Roger Levy <[EMAIL PROTECTED]> wrote: > While I have been able to install rjags on my Windows computer, oddly > I have been unable to install rjags successfully on my 64-bit Linux > compute server (etch, Linux kernel 2.6.18). I am required to specif

Re: [R] maptools sunrise sunset function

2008-11-10 Thread Sebastian P. Luque
On Mon, 10 Nov 2008 11:20:03 -0800, "Farley, Robert" <[EMAIL PROTECTED]> wrote: > I have a time zone problem. Running the code provided I get the > result in UTC, and a lot of warnings like this: 28: In > as.POSIXlt.POSIXct(x, tz) ... : unknwon timezone 'PST' >> sunrise.set(34.11583, -118.18719,

Re: [R] maptools sunrise sunset function

2008-11-10 Thread Sebastian P. Luque
On Mon, 10 Nov 2008 15:27:52 -0500, "stephen sefick" <[EMAIL PROTECTED]> wrote: > library(maptools) sunrise.set <- function(lat, long, date, > timezone="UTC", num.days=1){ #this needs to be long lat# lat.long <- > matrix(c(long, lat), nrow=1) day <- as.POSIXct(date, tz=timezone) > sequence <- seq(

Re: [R] Gmane-interface

2008-11-19 Thread Sebastian P. Luque
On Wed, 19 Nov 2008 21:49:54 + (UTC), Ben Bolker <[EMAIL PROTECTED]> wrote: [...] > Perhaps you would be willing (in the spirit of improving things) to > go to > http://gmane.org/info.php?group=gmane.comp.lang.r.general&edit=t > and specify some information so that the Gmane people can ch

Re: [R] multiple plots in R

2008-11-23 Thread Sebastian P. Luque
On Sun, 23 Nov 2008 18:19:19 -0800, Suyan Tian <[EMAIL PROTECTED]> wrote: > Hi, I just try to draw multiple plots in one page using R, I used par > command. For example I have 7 plots, but instead of arranging them in > the default way > plot1 plot2 plot3 plot4 plot5 plot6 plot7 > I want them in

[R] NA and logical indexes

2008-11-28 Thread Sebastian P. Luque
Hi, I vaguely remember this issue being discussed at some length in the past, but am having trouble relocating the proper thread (defining an adequate search string to do so): ---<---cut here---start-->--- R> foo <- data.frame(A=gl(2, 5, labels=letters[1:2]), X

Re: [R] NA and logical indexes

2008-11-28 Thread Sebastian P. Luque
On Fri, 28 Nov 2008 22:01:15 - (GMT), (Ted Harding) <[EMAIL PROTECTED]> wrote: [...] > It is not! Oops, of course, I meant to say "return" rather than "set" :-/ [...] > NA can seem to have a bewildering logic, but it all becomes clear if > you interpret NA as "value unkown". > You asked

[R] format.data.frame and NA control

2007-10-22 Thread Sebastian P. Luque
Hi, Is there a more efficient way to output NA strings as empty strings in format.data.frame than this: ---<---cut here---start-->--- R> tt <- data.frame(a=c(NA, rnorm(8), NA), b=c(NA, letters[1:8], NA)) R> tt <- format(tt, digits=5, trim=TRUE) R> tt

Re: [R] The "reverse" of do.call("rbind",) on a list

2007-11-12 Thread Sebastian P. Luque
On Tue, 13 Nov 2007 02:07:39 +0100, Søren Højsgaard <[EMAIL PROTECTED]> wrote: > Dear List, I want to turn the matrix >> xm > [,1] [,2] [1,] "a" "b" [2,] "d" "e" > into a list "by rows" as: [[1]] [1] "a" "b" [[2]] [1] "d" "e" > A (bad?) way of doing this is as >> unlist(apply(xm,1, list), r