[Rd] creating a '[' method for an S4 class

2012-07-06 Thread Benilton Carvalho
Hi, I'm working on an S4 class that is expected to behave like an array. I have some difficulties when defining '[' and I wonder if someone could point me to the right direction: 1) Call the S4 object "obj" 2) Assume dim(obj) = c(10, 4, 2) 3) Suppose someone calls: obj[1:3,] , which is a mistake

Re: [Rd] length-0 list as dimnames

2012-06-05 Thread Benilton Carvalho
Thank you very much for pointing me to the correct part of the documentation (and apologies for that), Simon. Very much appreciated, b On 6 June 2012 00:43, Simon Urbanek wrote: > > On Jun 5, 2012, at 7:37 PM, Benilton Carvalho wrote: > >> Hi, >> >> I'm wor

[Rd] length-0 list as dimnames

2012-06-05 Thread Benilton Carvalho
Hi, I'm working on a package and observed a behaviour that was suggested to be incompatible with the documentation. The code below: x <- matrix(1:4, 2) dimnames(x) <- list() works just fine. But checking the documentation for dimnames(), it states that if value is a list "its components are eit

Re: [Rd] changes in recent R-devel revisions?

2011-03-02 Thread Benilton Carvalho
Martin and Professor Ripley, Thank you very much for your attention and time on this. I've fixed the package accordingly. benilton On 2 March 2011 06:39, Prof Brian Ripley wrote: > On Tue, 1 Mar 2011, Martin Morgan wrote: > >> On 03/01/2011 03:19 PM, Benilton Carvalho

[Rd] changes in recent R-devel revisions?

2011-03-01 Thread Benilton Carvalho
Hi, I have a BioC infra-structure package that works fine (I can build, check and load it successfully) on revision r53950. The very same package fails on r54591 with the error below: Error in loadNamespace(package, c(which.lib.loc, lib.loc), keep.source = keep.source) : cyclic name space depen

Re: [Rd] news.Rd format

2011-01-24 Thread Benilton Carvalho
the version format should be x.y 'Changes in version 2.36' should work... benilton On 22 January 2011 15:58, Terry Therneau wrote: >  I'm converting the "Changelog" files that I have used in the survival package > (since the 1980s) to the inst/NEWS.Rd format and a couple of things are not > cle

Re: [Rd] optional package dependency

2010-01-15 Thread Benilton Carvalho
How about using: Enhances: Rmpi ? b On Fri, Jan 15, 2010 at 6:00 AM, Ross Boylan wrote: > I have a package that can use rmpi, but works fine without it. None of > the automatic test code invokes rmpi functionality. (One test file > illustrates how to use it, but has quit() as its first comma

Re: [Rd] Surprising length() of POSIXlt vector (PR#14073)

2009-11-30 Thread Benilton Carvalho
Thank you Martin, for putting this together. Cheers, b On Nov 30, 2009, at 11:10 AM, maech...@stat.math.ethz.ch wrote: >> Tony Plate >>on Sun, 22 Nov 2009 10:21:33 -0600 writes: > >> maech...@stat.math.ethz.ch wrote: "PD" == Peter Dalgaard on Fri, 20 Nov 2009 09:54

[Rd] Display list redraw incomplete

2009-11-28 Thread Benilton Carvalho
Hi, I'm observing the following warning with R-2.10.0 on a machine I have remote access to. Like what happened to Roger ( http://www.mail-archive.com/r-devel@r-project.org/msg08669.html ), two extra instances of X11 are open after dev.off(). Although I'm reporting this on R-2.10.0, it's reprod

Re: [Rd] Surprising length() of POSIXlt vector (PR#14073)

2009-11-19 Thread Benilton Carvalho
right archive or documentation source that discusses why objects of class POSIXlt always need to return a length of 9? Thanks Steve McKinney -Original Message- From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r- project.org] On Behalf Of Benilton Carvalho Sent: Thursday, November

Re: [Rd] Surprising length() of POSIXlt vector (PR#14073)

2009-11-19 Thread Benilton Carvalho
Check the documentation and the archives. Not a bug. b On Nov 19, 2009, at 8:30 PM, m...@celos.net wrote: Arrays of POSIXlt dates always return a length of 9. This is correct (they're really lists of vectors of seconds, hours, and so forth), but other methods disguise them as flat vectors, giv

[Rd] problem with plot.lm?

2009-08-21 Thread Benilton Carvalho
I'm bringing this issue to r-devel as my idea of sending it to r-help appears to be wrong. The following is reproducible in R-patched and R-devel (also in older versions). An outlier is inserted in group E and the last plot by plot.lm suggests that the point belongs to D. It appears to

Re: [Rd] diag() has a bug (PR#13702)

2009-05-14 Thread Benilton Carvalho
My understanding is that providing nrow and ncol, you want to create a diagonal matrix with those dimensions. diag(pi, 6, 6) and that by diag(foo, 2, 2) you really meant diag(foo)[2] Apologies if I misunderstood. b On May 14, 2009, at 10:45 AM, michael.m.spie...@gmail.com wrote: Full_N

Re: [Rd] diag() has a bug (PR#13702)

2009-05-14 Thread Benilton Carvalho
at 3:24 PM, Benilton Carvalho wrote: My understanding is that providing nrow and ncol, you want to create a diagonal matrix with those dimensions. diag(pi, 6, 6) and that by diag(foo, 2, 2) you really meant diag(foo)[2] Apologies if I misunderstood. b On May 14, 2009, at 10:45 AM, mich

Re: [Rd] Bug using X11 on mac osx (for jpeg or png creation) (PR#10800)

2008-02-19 Thread Benilton Carvalho
It's not a bug and it is my understanding that it's documented. From the man page on jpeg: They may not be usable unless the X11 display is available to the owner of the R process. and later: 'bitmap' provides an alternative way to generate PNG and JPEG plots that does not dep

Re: [Rd] Vector binding on harddisk

2008-02-14 Thread Benilton Carvalho
also, take a look at the "ff" package. b On Feb 14, 2008, at 11:43 AM, Greg Snow wrote: You may want to look at the SQLiteDF package, this allows you to put your data into an SQLite database and treat that like a normal vector or data frame inside of R. Hope this helps, -- Gregory (Greg) L

Re: [Rd] X11() dies in remote background

2007-07-21 Thread Benilton Carvalho
Won't ServerAliveInterval 60 in /etc/ssh_config do the job of keeping your connection alive? And wouldn't it be more appropriate if bitmap() was used instead? b On Jul 21, 2007, at 12:23 PM, Vincent Carey 525-2265 wrote: > >> Vincent Carey 525-2265 <[EMAIL PROTECTED]> writes: >> >>> this is n

Re: [Rd] Behavior of seq_along (was: Create a new var reflecting the order of subjects in existing var)

2007-04-02 Thread Benilton Carvalho
I'm not sure what your sessionInfo() is, but take a look at what I got: > set.seed(123) > dat <- data.frame(ID= c(rep(1,2),rep(2,3), rep(3,3), rep(4,4), +rep(5,5)), var1 =rnorm(17, 35,2), var2=runif(17,0,1)) > dat ID var1 var2 1 1 33.87905 0.02461368 2 1 34.53965 0.4777959

[Rd] accessing "hidden" functions

2007-03-27 Thread Benilton Carvalho
Hi, (I tried looking for it, but I don't think it was discussed before... or maybe I didn't use the correct keywords). I have a package (say, pkg1), which uses NAMESPACE. This package contains a bunch of functions the are used internally, therefore they're not exported (say, internalFunc1).

Re: [Rd] how to use debug.mypkg

2007-03-22 Thread Benilton Carvalho
Great tip Seth... thanks a bunch... b On Mar 22, 2007, at 9:54 PM, Seth Falcon wrote: > Benilton Carvalho <[EMAIL PROTECTED]> writes: > >> it doesn't matter where.. >> >> just pick one of your files and set it... >> >> of course, your file should

Re: [Rd] how to use debug.mypkg

2007-03-22 Thread Benilton Carvalho
ine this flag. > When I set the flag "debug.mypkg<-T" in the R session, everything > works, > but the problem is that if I do not set it, it is undefined. So I > need to set it > initially in my package, but where? > > Christian > > Benilton Carvalho w

Re: [Rd] how to use debug.mypkg

2007-03-22 Thread Benilton Carvalho
debug.affy123 is not a function... it's just a logical flag set in ProgressBarText.R. b On Mar 22, 2007, at 6:22 PM, cstrato wrote: > Dear all, > > The package "affy" has the following statement in file "AffyBatch.R": > if (debug.affy123) cat("-->initAffyBatch\n") > > This is great and I would

Re: [Rd] Problems with package containing S4 classes

2007-03-16 Thread Benilton Carvalho
Biobase itself does. b On Mar 16, 2007, at 7:43 PM, cstrato wrote: > Thank you, I have already read the R-exts manual, but the collate > field is optional. > Do you know a package which uses the Collate field so that I can > study it? > > Best regards > Christian > &

Re: [Rd] Problems with package containing S4 classes

2007-03-16 Thread Benilton Carvalho
not the only possibility. > BTW, what is a collate field? > > Best regards > Christian > > Benilton Carvalho wrote: >> Well, my understanding is that if you "need" to define it (the >> generic) twice you're doing something wrong. >> >> Do

Re: [Rd] Problems with package containing S4 classes

2007-03-16 Thread Benilton Carvalho
, I need to define setGeneric twice, otherwise I get the > error. > It is not clear to me, why this is the case? > > I know, that BioBase has a file AllGeneric.R, but I would like to > define > the generics in the respective methods files. > > Best regards > Christian

Re: [Rd] Problems with package containing S4 classes

2007-03-16 Thread Benilton Carvalho
> ** save image > Error in setMethod("export", "derivedClass", export.derivedClass) : >no existing definition for function "export" > Error: unable to load R code in package 'mytest' > Execution halted > > What may be the reason for th

Re: [Rd] Problems with package containing S4 classes

2007-03-16 Thread Benilton Carvalho
your namespace probably contains: useDynLib(testS4) but you don't have any compiled code... remove that line and everything will be fine. btw, if you're playing with S4, you must import 'methods' b On Mar 16, 2007, at 4:55 PM, cstrato wrote: > Dear all, > > Currently, I am trying to create a

Re: [Rd] can't plot a line

2007-01-23 Thread Benilton Carvalho
you don't see the line b/c you're squaring both "pi" and "-pi" compare that with lines(c(0,0), c(-1,1)*(2*pi)^2) b On Jan 23, 2007, at 10:41 AM, Spencer Graves wrote: > Consider the following: > > plot(0, 0, xlim=c(-10, 10), ylim=c(-50, 50)) > lines(c(0,0), (2*c(-pi, pi))^2) > >

Re: [Rd] Trailing message on R CMD BATCH

2007-01-10 Thread Benilton Carvalho
I do find that info to be useful and would very much appreciate if it is kept. b Brian Ripley wrote: > Unix versions of R CMD BATCH have reported proc.time() unless the script > ends in q(). E.g. if the input is 'search()' the output is > >> invisible(options(echo = TRUE)) >> search() > [1] ".G

Re: [Rd] Missing install libraries for R on OpenSuse 10.2 (PR#9425)

2006-12-20 Thread Benilton Carvalho
Hi Matjaz, I don't see that as a bug. Instead, you don't have the requirements, as you already noticed. Isn't it simpler just to install the requirements? See: http://download.opensuse.org/distribution/10.2/repo/oss/suse/i586/ best, benilton On Dec 20, 2006, at 2:04 PM, [EMAIL PROTECTED] wr

Re: [Rd] inconsistency or bug in coef() (PR#9358)

2006-11-12 Thread Benilton Carvalho
it doesn't appear to be a bug for me, given that one of your coefficients is NA due to linear dependencies on your design matrix. i prefer to think of it as a feature :-) (show only the coefficients for the variables that do not show linear dependencies). x=1:5 y=c(1:3, 7, 6) fit=lm(y~x) coef

Re: [Rd] Building R from the source

2006-11-11 Thread Benilton Carvalho
Professor Ripley, thank you very much for your reply. I'm currently trying to build R-2.4.0 from the source on a system (Xeon) running Fedora Core 4. As for the available compilers: gcc/g++/gfortran/f95 (version 4.0.0-8) Thank you very much, Benilton Carvalho PhD Candidate Departme

[Rd] Building R from the source

2006-11-11 Thread Benilton Carvalho
Hi Everyone, when building (say) R-2.4.0 from the source, is it still the recommendation to use GCC 3.4? Thank you very much, Benilton Carvalho PhD Candidate Department of Biostatistics Johns Hopkins University __ R-devel@r-project.org mailing list

[Rd] Failing to install R-2.4.0 on FC4

2006-11-09 Thread Benilton Carvalho
all] Error 1 Searching the archive, I did find a similar report (http:// tolstoy.newcastle.edu.au/R/devel/06/01/3699.html) but the proposed solution did not work for me. Any suggestion? Thank you very much, Benilton Carvalho PhD Candidate Department of Biostatistics Johns Hopkins University ___