[Rd] .S3methods: issue in content of info data.frame

2016-11-11 Thread Renaud Gaujoux
Hi, I was trying to get a list of S3 method for a given generic, along with the package in which they are defined, and I came across what looks like an issue in the data.frame returned in attribute 'info'. The column 'from' mostly gets the value "registered S3method for ..." except for visible met

[Rd] Ubuntu console weird behaviour

2016-03-03 Thread Renaud Gaujoux
SAGES=en_US.UTF-8 [7] LC_PAPER=en_ZA.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_ZA.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base -- Renaud Gaujoux, PhD Systems Immunology - Tec

[Rd] Method from package dependency is not updated due to lazy load?

2016-02-10 Thread Renaud Gaujoux
ib', repos = NULL, quiet = TRUE)> install.packages('test/pkgB', lib = 'test/lib', repos = NULL, quiet = TRUE)> # this returns A-v1> system("Rscript -e \"library(pkgA, lib = 'test/lib'); genericA()\"")Loading required package: methods [1] "A-v1"> system("Rscript -e \"library(pkgB, lib = 'test/lib'); callA(); pkgA::genericA()\"")Loading required package: methods [1] "A-v1" [1] "A-v1"> > # install pkgA version 2> install.packages('test/v2/pkgA', lib = 'test/lib', repos = NULL, quiet = TRUE)> # this returns A-v2> system("Rscript -e \"library(pkgA, lib = 'test/lib'); genericA()\"")Loading required package: methods [1] "A-v2"> # this still returns A-v1> system("Rscript -e \"library(pkgB, lib = 'test/lib'); callA(); pkgA::genericA()\"")Loading required package: methods [1] "A-v1" [1] "A-v1"> > # re-install pkgB> install.packages('test/pkgB', lib = 'test/lib', repos = NULL, quiet = TRUE)> # this now returns A-v2> system("Rscript -e \"library(pkgB, lib = 'test/lib'); callA(); pkgA::genericA()\"")Loading required package: methods [1] "A-v2" [1] "A-v2" -- Renaud Gaujoux, PhD Systems Immunology - Technion, Haifa, Israel [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] List S3 methods and defining packages

2015-07-08 Thread Renaud Gaujoux
; Kevin Wright > > > On Wed, Jul 8, 2015 at 5:09 AM, Renaud Gaujoux > wrote: >> Thank you for your reply Martin. >> Your code made me realize that S3 methods are added to the >> .__S3MethodsTable__. of the package that defines the generic, not to >> the ones defi

Re: [Rd] List S3 methods and defining packages

2015-07-08 Thread Renaud Gaujoux
A? I don't get any warning message and there seems to be only one entry in the relevant .__S3MethodsTable__. Aren't these tables updated when the masking package B is detached? On 7 July 2015 at 21:01, Martin Morgan wrote: > On 07/07/2015 02:05 AM, Renaud Gaujoux wrote: >> &g

[Rd] List S3 methods and defining packages

2015-07-07 Thread Renaud Gaujoux
Hi, from the man page ?methods, I expected to be able to build pairs (class,package) for a given S3 method, e.g., print, using attr(methods(print), 'info'). However all the methods, except the ones defined in base or S4 methods, get the 'from' value "registered S3method for print", instead of th

Re: [Rd] install.packages deletes PACKAGES file in local repo

2014-12-05 Thread Renaud Gaujoux
t happened. Closing the thread. Thanks. On 6 December 2014 at 02:23, Gabriel Becker wrote: > Can you post exact code, i have not seen this behavior, and I work with > local repositories quite extensively on my current project. > > ~G > > On Fri, Dec 5, 2014 at 7:4

[Rd] install.packages deletes PACKAGES file in local repo

2014-12-05 Thread Renaud Gaujoux
Hi, running install.packages() to install a package from a local repository (i.e., starts with file:///) appears to delete the PACKAGES file that is in the src/contrib/ directory. This happens on a cluster running Scientific Linux release 6.4 (Carbon), but not on my Ubuntu local machine. Subseque

Re: [Rd] Is it possible to make install.packages compile source code on Unix but use shipped binary on Windows?

2014-06-19 Thread Renaud Gaujoux
Hi Martyn, > It isn't hard to set up Rtools on Windows and you only need to do it > once. Then you build a binary package on your development system to > distribute to your users. Yes, but since I am working on Linux, it is slightly more steps involved in order to generate a windows binary (even

Re: [Rd] Is it possible to make install.packages compile source code on Unix but use shipped binary on Windows?

2014-06-18 Thread Renaud Gaujoux
> Maybe. Read the documentation and sources for yourself (see below). Not working, at least in my hands, as it requires `sh`. > Yes, *and documented* True. I overlooked the beginning of the NB point. > (including that it should not be used for Windows executables). Yes, that's why I use the s

Re: [Rd] Is it possible to make install.packages compile source code on Unix but use shipped binary on Windows?

2014-06-18 Thread Renaud Gaujoux
Thank you for the replies and hints. > A 'pre-built windows binary' of what? Sorry this was not clear, src/ contains source code for a binary executable, which produces no .lib or .dll. It is all fine in a R development environment: * On Linux, the executable is compiled and copied to R_PACKAGE

[Rd] Is it possible to make install.packages compile source code on Unix but use shipped binary on Windows?

2014-06-13 Thread Renaud Gaujoux
Hi, is it possible to make install.packages install a source package by compiling it on Unix, but skip compilation and use a pre-built windows binary (shipped in exec/) if installing on Windows? The package should be installable on Windows machines that do not have Rtools installed. This is to ma

[Rd] traceback does not show source line number of long calls when truncating output

2014-05-12 Thread Renaud Gaujoux
Hi, in R-3.1.0 (Linux), traceback() does not show the source file line number for the truncated calls, when limiting the number of lines output for each call with argument max.lines. See sample code, output and session info below (in particular, output for call number 5). I guess this is not inten

Re: [Rd] Proxy settings not honoured anymore

2014-03-27 Thread Renaud Gaujoux
All right, just ignore this silly post, things magically came back into place... :| On 27 March 2014 17:28, Renaud Gaujoux wrote: > Hi, > > it seems that my proxy settings are not picked up by the R console any > longer, although the environment variable http_proxy is set and >

[Rd] Proxy settings not honoured anymore

2014-03-27 Thread Renaud Gaujoux
Hi, it seems that my proxy settings are not picked up by the R console any longer, although the environment variable http_proxy is set and exported. Is anybody experiencing this issue as well? Thank you. Bests, Renaud # System info (from R --vanilla) > sessionInfo() R version 3.0.3 (2014-03-06)

[Rd] contrib.url in non-interactive mode

2014-02-14 Thread Renaud Gaujoux
Hi, is it intended that one cannot install packages in non-interactive mode, without explicitly setting a CRAN mirror (see below)? Couldn't a default mirror be used in that case? Thank you. Bests, Renaud $ Rscript --vanilla -e "install.packages('whatever')" Installing package into '/home/renaud/

[Rd] S4 method for '[' with extra arguments: distinguishing between x[i] and x[i, ]

2013-12-05 Thread Renaud Gaujoux
Hi, I want to implement a '[' for an S4 class, that behaves differently when called with a single index argument or multiple indexes (possibly missing), like what happens when subsetting matrices x[i] vs. x[i, ]. I manage to do it using nargs() and checking if drop is missing (see code below), bu

Re: [Rd] cat with backspace and newline characters

2013-11-06 Thread Renaud Gaujoux
I agree that the handling of \b is not that strange, once one agrees on what \b actually means, i.e. "go back one character" and not "delete previous character". The fact that R GUI on Mac and Windows interprets/renders it differently shows that normality and strangeness is quite relative though.

Re: [Rd] How to do package cleanup: hooks .onUnload, R_unload_mylib, .onDetach are not called on quit

2013-11-06 Thread Renaud Gaujoux
uncan Murdoch wrote: >> >> On 13-11-06 5:26 AM, Renaud Gaujoux wrote: >>> >>> Hi, >>> >>> it seems that the package hooks .onLoad and its C++ pendant >>> R_unload_mylib are actually not called when R quits, but only when >>> explic

[Rd] How to do package cleanup: hooks .onUnload, R_unload_mylib, .onDetach are not called on quit

2013-11-06 Thread Renaud Gaujoux
Hi, it seems that the package hooks .onLoad and its C++ pendant R_unload_mylib are actually not called when R quits, but only when explicitly calling detach('package:mylib', unload = TRUE). Maybe this is platform specific, I'm on Ubuntu 13.10 - R 3.0.2 (see below). * is there a mechanism that a

Re: [Rd] cat with backspace and newline characters

2013-11-06 Thread Renaud Gaujoux
> Anyway, > thanks for all the experiments, and (to Renaud) support.rstudio.org is > the place to report such problems. > Funny how the post diverged to an RStudio-related issue. Anyway, I posted a link to this post at support.rstudio.org: http://support.rstudio.org/help/discussions/problems/9242-

Re: [Rd] cat with backspace and newline characters

2013-11-05 Thread Renaud Gaujoux
Thanks for the clarification. This appears to be a terminal behaviour issue. It is user lack-of-understanding: there is no error here. > I believe lack of understanding is probably amongst the top reasons why users post to the list and get happily enlightened. I don't think I said there was an er

Re: [Rd] cat with backspace and newline characters

2013-11-05 Thread Renaud Gaujoux
Maybe it's a Linux problem: > cat("abc\b") ab> cat("abc\b\n") abc > sessionInfo() R version 3.0.2 (2013-09-25) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8LC_MESS

Re: [Rd] cat with backspace and newline characters

2013-11-01 Thread Renaud Gaujoux
in wrote: > Hi Renaud, > > Are you sure it's not applied? is \b a backspace i.e. just move the > cursor back one space, or is it a delete the character to the left of > the cursor? > > Kind regards, > Sean > > > On 1 November 2013 11:06, Renaud Gaujoux > wro

[Rd] cat with backspace and newline characters

2013-11-01 Thread Renaud Gaujoux
Hi, when mixing newline and backspace characters I get the following output (see below). In the second call, the backspace character is simply not applied. Is this normal behaviour? Thank you. > cat("abc\b") ab> cat("abc\b\n") abc > [[alternative HTML version deleted]] _

[Rd] [Windows] Behaviour of shell on error

2013-10-07 Thread Renaud Gaujoux
Hi, on my R-3.0.2 windows (32bits) no error is thrown occurs when calling a shell command with intern=TRUE, mustWork=TRUE. Is this a intended/known behaviour? >From the source of base::shell it is clear that mustWork is only used when intern=FALSE. This is not that clear from the help page: " Ar

Re: [Rd] R CMD check: unknown option ?--outdir==RCHECK?

2013-05-21 Thread Renaud Gaujoux
Oh... I read too quickly your previous post, which actually gives me some hope on explaining why some R-forge checks might be broken. Great thanks! :) On 21 May 2013 15:54, Duncan Murdoch wrote: > On 21/05/2013 8:13 AM, Renaud Gaujoux wrote: > >> Hi, >> >> I believ

Re: [Rd] R CMD check: unknown option ?--outdir==RCHECK?

2013-05-21 Thread Renaud Gaujoux
Hi, I believe this is kind of a long standing bug though. In R-3.0.1, but this also happened in previous versions, the long version '--outdir' is not recognised: For `R CMD check --outdir=mydir pkg_0.1.tar.gz` we get: Warning: unknown option ‘--outdir=mydir’ But with `R CMD check -o mydir pkg_0.

Re: [Rd] Namespace/inheritance problem in S4 methods for a union class

2013-05-08 Thread Renaud Gaujoux
sses of classes from PkgA. > > This is one of R's touchier points in general: The state of things with > respect to classes and methods changes dynamically as packages are loaded. > Until PkgB is loaded, "A" has no known subclasses. > > If the guess is correct, then wh

[Rd] Namespace/inheritance problem in S4 methods for a union class

2013-05-07 Thread Renaud Gaujoux
: Re: [Bioc-devel] ExpressionSet and LumiBatch: inheritance problem in S4 methods for union class To: Renaud Gaujoux Cc: bioc-de...@r-project.org, dupan.m...@gmail.com I can replicate this with a simpler example, where PkgA has setClass("A", representation(x="numeric")) with

Re: [Rd] lsfit: Error in formatting error message

2013-04-29 Thread Renaud Gaujoux
Ah yes, nice, I had noticed the swapped words in other situations, it will definitely help me to tell users about sample size issues... :) Bests, Renaud On 29 April 2013 12:15, Uwe Ligges wrote: > On 25.04.2013 13:29, Renaud Gaujoux wrote: > >> Hi, >> >> in R-3.0 I

[Rd] lsfit: Error in formatting error message

2013-04-25 Thread Renaud Gaujoux
Hi, in R-3.0 I get the following error when calling lsfit with more observations than variables, which seems to come from an error in the formatting of the error message (note that this was not happening in 2.15.3): > nobs <- 5; nvar <- 6; lsfit(matrix(runif(nobs*nvar), ncol=nvar), runif(nobs), i

Re: [Rd] Empty package skeleton

2013-04-14 Thread Renaud Gaujoux
... and my suggestion for an easy way to skip defined variables comes from the case of fresh non-vanilla sessions that willingly inherit user-defined variables from .Rprofile. 2013/4/14 Dirk Eddelbuettel > > On 14 April 2013 at 14:10, Renaud Gaujoux wrote: > | Hi, > | > | I kno

[Rd] Empty package skeleton

2013-04-14 Thread Renaud Gaujoux
Hi, I know this has been reported/asked before ( http://tolstoy.newcastle.edu.au/R/e15/devel/11/10/0831.html) but it would still be just nice to have a fix for the not user-friendly fact that one cannot create a completely empty package skeleton (see previous post for a suggested patch). In the s

[Rd] loadNamespace tries to load an optional dependency from a required dependency

2013-04-07 Thread Renaud Gaujoux
Hi, I get an error from loadNamespace in the following situation (on R-2.15.3, R-devel 2013-03-26 r62409, and fresh R-3.0.0): - package A has an optional (suggests) dependency to package C, which is tested at load time in .onLoad, via require(). - package B depends on package A, which is loaded w

Re: [Rd] source, sys.source and error line numbers

2013-03-26 Thread Renaud Gaujoux
TRUE or the error location won't be known. > > I'll fix the difference you noticed after 3.0.0 is released; I think it is > not serious enough to slip in at this point. > > Duncan Murdoch > > > >> Hadley >> >> On Tue, Mar 19, 2013 at 4:03 AM, R

Re: [Rd] removing union class

2013-03-19 Thread Renaud Gaujoux
All good then. Thanks. Renaud 2013/3/19 Martin Maechler > >>>>> "RG" == Renaud Gaujoux > >>>>> on Sun, 17 Mar 2013 10:38:44 +0200 writes: > > RG> Late report is better than never isn't it? :) > >>

[Rd] source, sys.source and error line numbers

2013-03-19 Thread Renaud Gaujoux
Hi, is there a way to retrieve the line number of where en error occurred when sourcing a file in a tryCatch statement? Is it stored somewhere accessible? It is not found in the error object. Consider the following code/output and note the difference in the traceback between source (has line numb

Re: [Rd] removing union class

2013-03-17 Thread Renaud Gaujoux
Late report is better than never isn't it? :) > > Well,... you forgot to show the error (and the traceback) : > Apologies, I usually include them (and sessionInfo ...). > > > Note that this problem is somewhat dependent on the use of the > > infamous "matrix" class {not properly de

[Rd] removing union class

2013-03-13 Thread Renaud Gaujoux
Hi, I get the following error when trying to remove a union class: > setClassUnion('a', c('matrix', 'numeric')) > removeClass('a') > sessionInfo() R version 2.15.3 (2013-03-01) Platform: i686-pc-linux-gnu (32-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8

Re: [Rd] Call function only when running via R CMD check?

2012-12-17 Thread Renaud Gaujoux
Hi Henrik (and list), I am interested in a similar feature, and would be happy to see the suggestions you got off-line :) Have you come up with a robust solution, which would work in a variety of situations (in examples, tests, \Sexpr calls, etc..)? Thank you. Bests, Renaud -- Renaud

Re: [Rd] Extracting srcref for S4 methods

2012-07-05 Thread Renaud Gaujoux
tandardGeneric('myfun')) setMethod('myfun', 'numeric', function(x, ...){ 'myfun,numeric' }) ") source(f, keep.source=TRUE) # there are srcref data for functions str(f) # no srcref data str(attr(myfun, 'srcref')) str(attr(selectMethod(myfun, 'numer

[Rd] Extracting srcref for S4 methods

2012-07-05 Thread Renaud Gaujoux
;- function(){} setGeneric('myfun', function(x, ...) standardGeneric('myfun')) setMethod('myfun', 'numeric', function(x, ...){ 'myfun,numeric' }) ") source(f, keep.source=TRUE) # there are srcref data for functions str(f) # no srcref data str(myfun) st

[Rd] [Suggestion] Installation of CRAN packages that depend on Bioconductor packages

2012-06-28 Thread Renaud Gaujoux
N mirror. Thank you. Renaud -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] "Incompatible methods" for overloaded operator

2012-06-21 Thread Renaud Gaujoux
de of primitive function or are these pure C functions, which need to be searched for in R source code? Renaud -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Multiple sub-architecture: linking issue

2012-06-12 Thread Renaud Gaujoux
Dirk, who thinks this should have been on r-sig-debian all along Moved to r-sig-debian as suggested: https://stat.ethz.ch/pipermail/r-sig-debian/2012-June/001885.html __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-d

Re: [Rd] Multiple sub-architecture: linking issue

2012-06-11 Thread Renaud Gaujoux
On 11/06/2012 03:43, Simon Urbanek wrote: > On Jun 10, 2012, at 9:24 PM, Dirk Eddelbuettel wrote: > >> On 8 June 2012 at 12:27, Renaud Gaujoux wrote: >> | PS: Dirk do you want me to post this on the Rcpp list for record? >> >> Yes, that generally is where Rcpp quest

Re: [Rd] Multiple sub-architecture: linking issue

2012-06-08 Thread Renaud Gaujoux
possible if some of the files provided by this package were missing? I can try look around for this exact package. -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa On 08/06/2012 16:22, Simon Urbanek wrote: Make sure you have installed multilib gcc and the ia32 dev

[Rd] Multiple sub-architecture: linking issue

2012-06-08 Thread Renaud Gaujoux
++.a when searching for -lstdc++ /usr/bin/ld: cannot find -lstdc++ collect2: ld returned 1 exit status There is definitely some conflict or missing libraries going on... Any help is appreciated. Thank you. PS: Dirk do you want me to post this on the Rcpp list for record? -- Renaud Gaujoux

[Rd] Multiple sub-architecture: problem installing RCurl

2012-06-08 Thread Renaud Gaujoux
x27; * removing '/home/renaud/bin/R/2.15/lib64/R/library/RCurl' * restoring previous '/home/renaud/bin/R/2.15/lib64/R/library/RCurl' -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa [[alternative HTML version deleted]] _

Re: [Rd] url, readLines, source behind a proxy

2012-05-10 Thread Renaud Gaujoux
Thanks Henrik for the work around. It worked perfectly and save me lots of check time. Renaud -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa On 24/04/2012 17:57, Henrik Bengtsson wrote: Looking at the source code (src/library/tools/R/check.R and src/library

Re: [Rd] url, readLines, source behind a proxy

2012-04-24 Thread Renaud Gaujoux
On 23/04/2012 17:39, Prof Brian Ripley wrote: On 18/04/2012 16:04, Joshua Ulrich wrote: Hi Renaud, On Wed, Apr 18, 2012 at 12:22 AM, Renaud Gaujoux wrote: Hi Henrik, Could anybody behind a proxy check if the issue can be reproduced? My proxy is in fact provided by cntml, which acts as

Re: [Rd] url, readLines, source behind a proxy

2012-04-17 Thread Renaud Gaujoux
actual university proxy, not natively supported by my system (Ubuntu). Anybody in this case? Thanks. Renaud On Tue, 17 Apr 2012, Henrik Bengtsson wrote: > On Tue, Apr 17, 2012 at 1:01 AM, Renaud Gaujoux > wrote: > > Hi, > > > > when I run R CMD check with flag --as-cr

[Rd] url, readLines, source behind a proxy

2012-04-17 Thread Renaud Gaujoux
ed to work behind a proxy (correct?). Does anybody else have this problem? I was wondering if there is a way around, as I would like to be able to use --as-cran for my checks. Thank you. Renaud -- Renaud Gaujoux Computational Biology - University of Cape Town So

[Rd] Default subset and concatenation operators for namedList

2012-01-24 Thread Renaud Gaujoux
#x27;A', list(a=1,b=2,c=3)) str(a) # subset converts to standard list str(a[1:2]) str(a[2:3]) # concatenation converts to standard list str(c(a, list(d=4, e=5))) -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] R package BibTex entries: looking for a more general solution

2011-12-19 Thread Renaud Gaujoux
a fix for this now. Renaud -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa On 19/12/2011 15:56, Michael Friendly wrote: On 12/19/2011 2:02 AM, Renaud Gaujoux wrote: Hi, I actually adapted and integrated this feature into Achim's -- nice -- function (p

Re: [Rd] R package BibTex entries: looking for a more general solution

2011-12-18 Thread Renaud Gaujoux
n) citation. Romain, I think I will submit a patch for this. Hope this helps. Renaud -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Identify \Sexpr call?

2011-11-05 Thread Renaud Gaujoux
More or less in the same vein as Henrik's post, is it possible to detect that a function is being called in an \Sexpr when generating an Rd file? Thank you -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa __ R-de

Re: [Rd] R CMD check and error in an \Sexpr in an Rd file

2011-11-04 Thread Renaud Gaujoux
his is the result of tools:::Rd_expr_PR(1234):", tools:::Rd_expr_PR(1234), sep="")} \rdVerb{paste("This is the result of tools:::Rd_expr_PR(1234):", tools:::Rd_expr_PR(1234), sep="\n")} But backslashes must be escaped twice: \rdVerb{"\begin{section

Re: [Rd] R CMD check and error in an \Sexpr in an Rd file

2011-11-03 Thread Renaud Gaujoux
On 03/11/2011 16:33, Georgi Boshnakov wrote: Dear Renalud,, Would a 'results=tex' (html, text) be possible? or 'results=source' that could be combined with \if{format}{text}? This may well be a clean approach. After my previous email, I looked again at the definition of thr \AsIs macro. Its

Re: [Rd] R CMD check and error in an \Sexpr in an Rd file

2011-11-03 Thread Renaud Gaujoux
On 03/11/2011 16:28, Duncan Murdoch wrote: On 03/11/2011 10:21 AM, Renaud Gaujoux wrote: Thank you Georgi. With the fix \long the output is indeed consistent with the documentation. I think my use of cat() worked by luck as its output should not have been rendered. Would a 'result

Re: [Rd] R CMD check and error in an \Sexpr in an Rd file

2011-11-03 Thread Renaud Gaujoux
ith \if{format}{text}? This would allow to generate custom Latex, or HTML code, but it might also be is hazardous... Renaud -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa On 03/11/2011 15:50, Georgi Boshnakov wrote: Dear Duncan and Renauld, The error caused by t

Re: [Rd] R CMD check and error in an \Sexpr in an Rd file

2011-11-03 Thread Renaud Gaujoux
Although I use Latex quite a lot, I am not literate in Latex macro languages (e.g. the definition of AsIs). Is there (I am sure there is) a reason why a plain verbatim environment is not used in this case? On 03/11/2011 14:19, Duncan Murdoch wrote: On 11-11-03 7:58 AM, Renaud Gaujoux wrote

Re: [Rd] R CMD check and error in an \Sexpr in an Rd file

2011-11-03 Thread Renaud Gaujoux
Georgi, I tried with paste() instead of cat(), but I then get the following in my PDF manual: [1] "line\nnext line" i.e. what would be printed in the R console, which is not what I want. I would like to get something like this in the Latex code: \begin{verbatim} line next line \end{verbatim}

Re: [Rd] R CMD check and error in an \Sexpr in an Rd file

2011-11-01 Thread Renaud Gaujoux
} \title{Error and verbatim in Sexpr} \description{ Testing Sexpr in Rd files %\Sexpr[results=verbatim, stage=render]{stop("error in sexpr")} \Sexpr[results=verbatim, stage=render]{cat("line\nnext line")} %\Sexpr[results=verbatim, stage=render]{cat("line\nnext lin

Re: [Rd] R CMD check and error in an \Sexpr in an Rd file

2011-10-31 Thread Renaud Gaujoux
Thank you very much Duncan, Uwe and Peter. Sorry if I missed the announcement, I follow more r-devel than r-help, which I find a bit hard to quickly read. Will try now on the 2.14.0. Renaud On 31/10/2011 14:28, Prof Brian Ripley wrote: On Mon, 31 Oct 2011, Renaud Gaujoux wrote: I do not

Re: [Rd] R CMD check and error in an \Sexpr in an Rd file

2011-10-31 Thread Renaud Gaujoux
I do not see it on main CRAN home page. Do you mean http://cran.r-project.org/src/base-prerelease/R-latest.tar.gz ? On 31/10/2011 14:19, Uwe Ligges wrote: On 31.10.2011 13:13, Renaud Gaujoux wrote: Thank you Duncan. I tried with: * using R version 2.14.0 RC (2011-10-24 r57417) * using

Re: [Rd] R CMD check and error in an \Sexpr in an Rd file

2011-10-31 Thread Renaud Gaujoux
R-rc_2011-10-27_r57452.tar.gz. Renaud On 28/10/2011 17:25, Duncan Murdoch wrote: On 28/10/2011 10:53 AM, Duncan Murdoch wrote: On 28/10/2011 10:49 AM, Renaud Gaujoux wrote: > Hi, > > another Rd related issue I encountered is that if an error occurs in an > \Sexpr in an Rd f

[Rd] R CMD check and error in an \Sexpr in an Rd file

2011-10-28 Thread Renaud Gaujoux
ecking step. Not sure why it does not break before. Thank you. Renaud PS: I am on R version 2.13.2 (2011-09-30) - x86_64-pc-linux-gnu (64-bit) -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa __ R-devel@r-project.org

[Rd] Output multiline verbatim in Rd files with \Sexpr in PDF manual

2011-10-28 Thread Renaud Gaujoux
) but these are always somehow escaped when generating the Latex file. Is there a way to go around these issues? Maybe I am not using the correct way. Thank you. Renaud -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa __

Re: [Rd] Error message library()

2011-10-28 Thread Renaud Gaujoux
t Deepayan did not tell anybody about it ;) ) The help page ?completion in the utils package explains how to enable it: utils::rc.settings(ipck=TRUE) It simply worked on my Ubuntu box -- and directly went in my .Rprofile :) Hope this helps. Renaud -- Renaud Gaujoux Computational Biology - Universi

Re: [Rd] getNativeSymbolInfo("user_unif_rand") returns different results on windows and linux

2011-08-23 Thread Renaud Gaujoux
s") [1] "NativeSymbol" $package NULL attr(,"class") [1] "NativeSymbolInfo" On 23/08/2011 17:58, Martin Morgan wrote: > Hi Renaud -- did you miss this > > https://stat.ethz.ch/pipermail/r-devel/2011-August/061812.html > > ? Martin > > On 08/23/2011

[Rd] getNativeSymbolInfo("user_unif_rand") returns different results on windows and linux

2011-08-23 Thread Renaud Gaujoux
Hi, sorry to bump this post but I did not get any reply on this puzzling issue, which looks important though. While investigating the issue it came out that the value returned by getNativeSymbolInfo('user_unif_rand') (on Windows XP) seems to depend on whether it has already been called on th

[Rd] getNativeSymbolInfo("user_unif_rand") returns different results on windows and linux

2011-08-17 Thread Renaud Gaujoux
Hi, When loading a package that provides the user-supplied RNG hook user_unif_rand, calling getNativeSymbolInfo("user_unif_rand") returns informations about the loaded symbol. I am using this to identify which package currently provides the RNG hook. The results are the same on windows and lin

Re: [Rd] R cmd check and multicore foreach loop

2011-08-17 Thread Renaud Gaujoux
Uhm... maybe this is the issue. The issue seems to specially occur when I am building the vignette, which performs some parallel computations on a reduced example, therefore faster than in a normal usage of the package. The two processes (on my dual core) output some logging information using c

Re: [Rd] R cmd check and multicore foreach loop

2011-08-17 Thread Renaud Gaujoux
operation wedges. I'm told > that doSMP really only works well with Revolution R, but per above, I > will try to put together a working self-contained example to show how. > > > On Wed, Aug 17, 2011 at 4:39 AM, Renaud Gaujoux <mailto:ren...@cbio.uct.ac.za>> wrote: >

Re: [Rd] R cmd check and multicore foreach loop

2011-08-17 Thread Renaud Gaujoux
things at the Bioconductor developer > day and pretty much everyone confirmed that doWHATEVER seems to have > issues, where as multicore itself... doesn't. > > Just my $0.02, > > --t > > > On Wed, Aug 17, 2011 at 1:45 AM, Renaud Gaujoux > mailto:ren...@mancala.

[Rd] R cmd check and multicore foreach loop

2011-08-17 Thread Renaud Gaujoux
Hi, in R 2.12.1, R CMD check hangs when building a vignette that uses a foreach loop with the doMC parallel backend. This does not happen in R 2.13.1, nor if I use doSEQ instead of doMC. All versions of multicore, doMC and foreach are the same on both my R installations. Has anybody encounte

Re: [Rd] [R-sig-hpc] doMC - compiler - concatenate an expression vector into a single expression?

2011-06-29 Thread Renaud Gaujoux
lines of: '%dopar2%'<- function(obj, ex) { ex<- as.call(list(as.name('{'), quote({ a<- i; message("Custom ", a) }), substitute(ex))) do.call('%dopar%', list(obj, ex), envir=parent.frame()) }

[Rd] doMC - compiler - concatenate an expression vector into a single expression?

2011-06-28 Thread Renaud Gaujoux
, a) }, { print(i) i * 2 }) [[3]] expression({ a <- i message("Custom ", a) }, { print(i) i * 2 }) -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa ### UNIVERSITY OF CAPE TOWN This e-mail is subject to the UCT ICT policies and

Re: [Rd] Class not found when search in .onLoad

2011-06-27 Thread Renaud Gaujoux
All is clear now. Thank you for this clarification. Cheers, Renaud On 27/06/2011 15:38, Simon Urbanek wrote: On Jun 27, 2011, at 8:43 AM, Renaud Gaujoux wrote: On 27/06/2011 14:27, Simon Urbanek wrote: On Jun 27, 2011, at 3:17 AM, Renaud Gaujoux wrote: On 24/06/2011 22:04, John Chambers

Re: [Rd] Class not found when search in .onLoad

2011-06-27 Thread Renaud Gaujoux
On 27/06/2011 14:27, Simon Urbanek wrote: On Jun 27, 2011, at 3:17 AM, Renaud Gaujoux wrote: On 24/06/2011 22:04, John Chambers wrote: Strictly speaking, that is not meaningful. A class (like any R object) is uniquely referenced by a name *and an environment*. The name of a package can be

Re: [Rd] Class not found when search in .onLoad

2011-06-27 Thread Renaud Gaujoux
On 24/06/2011 22:04, John Chambers wrote: Strictly speaking, that is not meaningful. A class (like any R object) is uniquely referenced by a name *and an environment*. The name of a package can be used to construct the environment, but your "character slot" won't identify a class reliably

Re: [Rd] Class not found when search in .onLoad

2011-06-24 Thread Renaud Gaujoux
("extends(classB, classA): ", methods::extends(classB, classA)) } .onLoad <- function(libname, pkgname=NULL){ cat("\n## .onLoad ##\n") check.classes(asNamespace(pkgname)) } .onAttach <- function(libname, pkgname){ cat("\n## .onAttach ##\n") check.classes(asN

[Rd] Class not found when search in .onLoad

2011-06-23 Thread Renaud Gaujoux
Hi, I am facing with a strange behaviour of isClass and extends when these are called in .onLoad in both R 2.12.1 and R 2.13.0. This is preventing my package from doing some object initializations at a proper place (i.e. in .onLoad). Suppose one defines two S4 classes in a package, and that

[Rd] Why does slot<- duplicate its argument?

2011-06-17 Thread Renaud Gaujoux
Hi, is there a reason why `slot<-` should duplicate its argument? I am under R 2.12.1. Thank you, Renaud For example: setClass('A', representation(data='matrix')) a <- new('A') x <- matrix(1,2,3) tracemem(x) slot(a, 'data') <- x ### UNIVERSITY OF CAPE TOWN This e-mail is subject to the

[Rd] Extending type list: names and inherited methods issue

2011-03-04 Thread Renaud Gaujoux
ONE=CLC_MEASUREMENT=en_ZA.utf8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa ### UNIVERSITY OF CAPE TOWN This e-mail is subject to th

Re: [Rd] Missing argument vs. empty argument

2011-01-25 Thread Renaud Gaujoux
My purpose is indeed to write a '[' method. I will go for the `[.data.frame` solution then. Thank you. On 25/01/2011 12:53, Prof Brian Ripley wrote: On Tue, 25 Jan 2011, Renaud Gaujoux wrote: Hi, is there an easy, robust, and/or recommended way to distinguish a missing argume

[Rd] Missing argument vs. empty argument

2011-01-25 Thread Renaud Gaujoux
Hi, is there an easy, robust, and/or recommended way to distinguish a missing argument from an empty argument as in: foo <- function(i, j){ print(missing(j)) print(nargs()) } foo(i) # TRUE, 1 foo(i,) # TRUE, 2 I know I can work around with nargs, the list of arguments and the names

[Rd] library: loading of required packages and argument 'lib.loc'

2010-10-05 Thread Renaud Gaujoux
Hi, is there a reason why when calling the argument 'lib.loc' of library() is not used when trying to load the required packages? 0. Package A depends on package B 1. Install packages A and B in a subdirectory 'lib' of the current directory 2. Call: library(A, lib.loc='./lib') This will give

Re: [Rd] Non identical numerical results from R code vs C/C++ code?

2010-09-10 Thread Renaud Gaujoux
ul -Original Message- From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r- project.org] On Behalf Of Renaud Gaujoux Sent: September 10, 2010 6:47 AM To: r-devel@r-project.org Subject: [Rd] Non identical numerical results from R code vs C/C++ code? Hi, suppose you

Re: [Rd] Non identical numerical results from R code vs C/C++ code?

2010-09-10 Thread Renaud Gaujoux
AM, Renaud Gaujoux wrote: Hi, suppose you have two versions of the same algorithm: one in pure R, the other one in C/C++ called via .Call(). Assuming there is no bug in the implementations (i.e. they both do the same thing), is there any well known reason why the C/C++ implementation could

Re: [Rd] Non identical numerical results from R code vs C/C++ code?

2010-09-10 Thread Renaud Gaujoux
Thank you Duncan for your reply. Currently I am using 'double' for the computations. What type should I use for extended real in my intermediate computations? The result will still be 'double' anyway right? On 10/09/2010 13:00, Duncan Murdoch wrote: On 10/09/2010 6:4

[Rd] Non identical numerical results from R code vs C/C++ code?

2010-09-10 Thread Renaud Gaujoux
and speed. The result is theoretically the same. Thank you, Renaud -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa ### UNIVERSITY OF CAPE TOWN This e-mail is subject to the UCT ICT policies and e-mail disclaimer published on our website at http://www.uct.ac

Re: [Rd] Defining a method that behaves like '$'?

2010-07-12 Thread Renaud Gaujoux
'a$builtin.member'. I will try to work out a solution from all the suggestions I got from the list. Thanks again to all. Renaud. -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa On 10/07/2010 17:29, Marc Schwartz wrote: On Jul 10, 2010, at 7:24 AM, Barr

Re: [Rd] Defining a method that behaves like '$'?

2010-07-09 Thread Renaud Gaujoux
would be for a...@slot1[['toto']] - a$tata would be for a...@slot2[['tata']] But apparently it might not be possible. -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa On 09/07/2010 14:58, Marc Schwartz wrote: You were, in effect, trying to

Re: [Rd] Defining a method that behaves like '$'?

2010-07-09 Thread Renaud Gaujoux
Does there exist any symbol that would be suitable for the job? Thanks -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa On 09/07/2010 14:29, Duncan Murdoch wrote: On 09/07/2010 8:18 AM, Renaud Gaujoux wrote: Hi, is there a way to define a method say '$$'

[Rd] Defining a method that behaves like '$'?

2010-07-09 Thread Renaud Gaujoux
Hi, is there a way to define a method say '$$' that would behave like '$' and allow calls like 'a$$name'? Thanks. Renaud -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa ### UNIVERSITY OF CAPE TOWN This e-mail is subject to t

Re: [Rd] Estimate actual memory usage, not cumulative allocated

2010-02-07 Thread Renaud Gaujoux
new object each > time you do an assignment which is why looping is slow; i.e. you're > not actually updating you're creating a new version of the original. > > cheers, > Sean > > > On Sun, Feb 7, 2010 at 2:47 PM, Renaud Gaujoux <mailto:geto...@gmail.com>> wrote

[Rd] Estimate actual memory usage, not cumulative allocated

2010-02-07 Thread Renaud Gaujoux
Hi, I'd like to know how estimate the memory actually used by some function call. The function essentially contains a for loop, which stops after a variable number of iterations, depending on the input data. I used Rprof with memory.profiling=TRUE, but the memory results seem to increase with the

  1   2   >