Re: [Rd] Rscript and default packages

2009-09-04 Thread Romain Francois
On 09/04/2009 04:20 PM, Simon Urbanek wrote: On Sep 3, 2009, at 13:52 , Romain Francois wrote: On 09/03/2009 05:23 PM, Duncan Murdoch wrote: On 03/09/2009 9:53 AM, Romain Francois wrote: Hi, Is is possible to embed inside an R script, the name of the default packages to be loaded when

Re: [Rd] Viewing pdfs from inst/doc

2009-09-04 Thread Romain Francois
;- function( file = system.file( "doc", vignette, package = package ), vignette, package, topic = vignette ){ structure( pdf = file, topic = topic, class = "vignette" ) } Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.bl

[Rd] returned value of R_tryEval

2009-09-05 Thread Romain Francois
and not look at the returned value. Could this be expanded so that, when an error occurs, something more useful than NULL is returned, such as the call stack for example. Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im

[Rd] R CMD INSTALL --clean

2009-09-07 Thread Romain Francois
line( link( "javadoc" , "../javadoc/index.html" ), "API documentation" ), "\n" ) ooindex[ bottom ] <- txt # write back cat( ooindex, file = ooindex.file, sep = "\n" ) } -- Romain

Re: [Rd] Non-GPL packages for R

2009-09-11 Thread Romain Francois
alent packages are kept |> separate from uncertain or restricted licensed ones. |> |> We welcome comments and suggestions on both the concept and the |> technicalities. |> |> John Nash& Ravi Varadhan -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http

Re: [Rd] I want to get a reference to this time series object

2009-09-16 Thread Romain Francois
)); PROTECT(c=R_tryEval(e,R_GlobalEnv,NULL)); PROTECT(e=lang3(install("["),install("SWX.RET"),c)); PROTECT(portData=R_tryEval(e,R_GlobalEnv,NULL)); PROTECT(e=lang2(install("print"),portData)); R_tryEval(e,R_GlobalEnv,NULL); UNPROTECT(3);

Re: [Rd] I want to get a reference to this time series object

2009-09-16 Thread Romain Francois
uot;)]' ) ) user system elapsed 0.001 0.000 0.001 Do you want it to be faster than this ? Is there a better way to do what I'm doing other than parsing? > Regards Abhijit On Wed, SSep 16, 2009 at 12:48 PM, Romain Francois mailto:romain.franc...@dbmail.com>>

Re: [Rd] Display image in tcl/tk information window: path to file ?

2009-09-17 Thread Romain Francois
correct location of the file on my hard drive. How can I make this portable ? I currently have the image stored in the inst directory. "R CMD INSTALL --build" moves it to the top directory in the zip file. I have no idea how to tell R (or tcl) where to look for the file. Any help is

[Rd] cannot build R-devel (>= r49747)

2009-09-21 Thread Romain Francois
se since it looks like a parser issue. I can build revision 49746. This is a fedora 11 : $ uname -a Linux santorini 2.6.29.6-217.2.16.fc11.i686.PAE #1 SMP Mon Aug 24 17:16:21 EDT 2009 i686 i686 i386 GNU/Linux I'm not sure what I can do to help fixing this. Can someone else with a fe

Re: [Rd] cannot build R-devel (>= r49747)

2009-09-22 Thread Romain Francois
On 09/22/2009 09:17 AM, Peter Dalgaard wrote: Romain Francois wrote: Hello, I've tried several times yesterday to build R-devel and I consistently get this error when I "make" : mkdir -p -- ../../../library/base/R make[3]: Leaving directory `/tmp/R-devel/src/library/

Re: [Rd] cannot build R-devel (>= r49747)

2009-09-22 Thread Romain Francois
On 09/22/2009 11:25 AM, Peter Dalgaard wrote: Romain Francois wrote: However, this might be relevant about my setting, I have the "R_KEEP_PKG_SOURCE" environment variable set to "yes". And if I set it to "no" it builds correctly. AHA! Yes, that makes sen

Re: [Rd] cannot build R-devel (>= r49747)

2009-09-22 Thread Romain Francois
On 09/22/2009 11:41 AM, Duncan Murdoch wrote: On 22/09/2009 5:30 AM, Romain Francois wrote: On 09/22/2009 11:25 AM, Peter Dalgaard wrote: Romain Francois wrote: However, this might be relevant about my setting, I have the "R_KEEP_PKG_SOURCE" environment variable set to "yes

Re: [Rd] cannot build R-devel (>= r49747)

2009-09-22 Thread Romain Francois
the stack pointer -- and in the new code the ParseState.SrcFile ended up getting released more than once. Duncan Murdoch On 9/22/2009 5:50 AM, Romain Francois wrote: On 09/22/2009 11:41 AM, Duncan Murdoch wrote: On 22/09/2009 5:30 AM, Romain Francois wrote: On 09/22/2009 11:25 AM, Peter

Re: [Rd] R v2.10.0: Doc clarification for cross references and where are we heading?

2009-09-23 Thread Romain Francois
ation of c++ code, ... Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/ztCu : RGG #158:161: examples of package IDPmisc |- http://tr.im/yw8E : New R package : sos `- http://tr.im/y8y0 : search the graph gall

Re: [Rd] R v2.10.0: Doc clarification for cross references and where are we heading?

2009-09-24 Thread Romain Francois
I did not see results = documented in ?Rd2HTML, what is allowed ? Is \Sexpr ignored when rendering other formats (tex, ...) ? or is there a way (similar to #ifdef) to only provide some content to some renderers ? Romain -- Romain Francois Professional R Enthusiast +33(0) 6 2

Re: [Rd] R v2.10.0: Doc clarification for cross references and where are we heading?

2009-09-24 Thread Romain Francois
On 09/24/2009 12:04 PM, Duncan Murdoch wrote: > > On 24/09/2009 5:42 AM, Romain Francois wrote: >> On 09/24/2009 11:28 AM, Duncan Murdoch wrote: >>> On 23/09/2009 11:21 PM, Gabor Grothendieck wrote: >>>> On Wed, Sep 23, 2009 at 10:54 PM, Duncan Murdoch >>&

[Rd] build time dependency

2009-09-25 Thread Romain Francois
Depends works, but then the installed package does not depend on it and therefore loads it for nothing. Maybe I can remove roxygen from the Depends as part of the ./configure[.win] ... Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr

Re: [Rd] build time dependency

2009-09-28 Thread Romain Francois
On 09/27/2009 08:27 PM, Uwe Ligges wrote: Romain Francois wrote: Hello, Is there such thing as a build time dependency between packages : package B needs package A so that it can build, but once built it lives without it. Do you mean at a) "R CMD build" time or at b) "R CM

Re: [Rd] build time dependency

2009-09-28 Thread Romain Francois
On 09/28/2009 04:39 PM, Uwe Ligges wrote: Romain Francois wrote: On 09/27/2009 08:27 PM, Uwe Ligges wrote: Romain Francois wrote: Hello, Is there such thing as a build time dependency between packages : package B needs package A so that it can build, but once built it lives without it

Re: [Rd] build time dependency

2009-09-29 Thread Romain Francois
On 09/29/2009 04:36 AM, Seth Falcon wrote: On Mon, Sep 28, 2009 at 11:25 AM, Romain Francois wrote: Hi Uwe, I think you are supposed to do this kind of sequence: R CMD roxygen yourRoxygenablePackage R CMD build yourRoxygenablePackage_roxygen ... but I don't like this because wha

Re: [Rd] How do I access class slots from C?

2009-09-29 Thread Romain Francois
: Cannot find function "setWeights" // How do I set the weights? It's a standard numeric vector. I'm confused on access class slots from C. // Not much is writted on this in the R extensions manual. PROTECT(e=lang3(install("setWeights"),portSpec,portWeights))

Re: [Rd] How do I access class slots from C?

2009-09-30 Thread Romain Francois
Budget weights to ans throw std::runtime_error("R cannot evaluate '" + txt + "'"); RcppVector V(ans); // convert SEXP variable to an RcppMatrix R.parseEval("names(vec)", ans); // assign columns nam

Re: [Rd] How do I access class slots from C?

2009-09-30 Thread Romain Francois
much easier to code, document and test ... but eventually you should do what __you__ find easier/better Romain Regards Abhijit On Wed, Sep 30, 2009 at 12:07 PM, Romain Francois mailto:romain.franc...@dbmail.com>> wrote: On 09/30/2009 08:51 AM, Abhijit Bera wrote: Hi

Re: [Rd] How do I access class slots from C?

2009-09-30 Thread Romain Francois
B, converting it to a timeseries object then creating a returns object out of it. I plan to embed R into an application, which is why I'm taking this route of using C. Regards Abhijit On Wed, Sep 30, 2009 at 12:07 PM, Romain Francois mailto:romain.franc.

Re: [Rd] Rd.sty question: LaTeX expert needed

2009-10-01 Thread Romain Francois
ke it illegal to nest \preformatted within other macros, but that seems to be an unfortunate limitation. Any help would be appreciated. Duncan Murdoch -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/ztCu : RGG #158:161: exampl

[Rd] environment( seq.int ) is NULL

2009-10-02 Thread Romain Francois
things, but I don't understand the order in which things are loaded in the zzz.R of base ... Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/ztCu : RGG #158:161: examples of package IDPmisc |- http://tr.im/yw8E : N

[Rd] as.matrix.data.frame( Date ) -> character

2009-10-10 Thread Romain Francois
Residual Standard Error: 0.9712 Replacing this line in loess : x <- as.matrix(x) by this : x <- tryCatch( do.call( cbind, lapply( x, as.double ) ), error = function(e){ stop( "predictors must all be numeric" ) } ) does the trick for me. Romain -- Romain Francois Profe

[Rd] isFALSE

2009-10-10 Thread Romain Francois
Hello, Just wondering why there is "isTRUE" and not "isFALSE". Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/BcPw : celebrating R commit #5 |- http://tr.im/ztCu : RGG #158:161: examples of pac

[Rd] help( ., package = variable ) -> error

2009-10-11 Thread Romain Francois
package <- spackage } } makes these three calls work: > help( write.table, package = "utils" ) > help( write.table, package = utils ) > help( write.table, package = pack ) ... unless utils is a variable -- Romain Francois Professional R Enthusiast +33(0) 6 2

Re: [Rd] unexpected behaviour of isSymmetric() (PR#14000)

2009-10-12 Thread Romain Francois
the dimnames > isSymmetric( structure( y, dimnames = NULL ) ) [1] TRUE # pass the ... along this path : isSymmetric > all.equal > all.equal.numeric > isSymmetric( y, check.attributes = F ) [1] TRUE # set the dimnames equal > dimnames( y ) <- rep( list( names(x) ), 2 ) > is

[Rd] for loop over S4

2009-10-13 Thread Romain Francois
st method for java object references returns a list that is filled by iterating over the object if it implements the Iterable interface. The drawback here is that one has to first fully retrieve the list, by iterating in java, and then process it in R, by iterating again in R. Romain --

Re: [Rd] for loop over S4

2009-10-13 Thread Romain Francois
or" ) ) > v$add( new( J("java/lang/Double" ), 10.2 ) ) [1] TRUE > v$add( new( J("java/awt/Point"), 10L, 10L ) ) [1] TRUE > for( i in v){ + print( i$getClass()$getName() ) + } [1] "java.lang.Double" [1] "java.awt.Point" While I'm on this,

Re: [Rd] for loop over S4

2009-10-13 Thread Romain Francois
Oops, forgot to add the R code. On 10/13/2009 03:42 PM, Romain Francois wrote: Hello, Here is a more complete patch implementing an iterating scheme inspired from the java Iterable/Iterator design. Nothing is changed for non S4 objects. The patch contains 4 generic functions : is.iterable

Re: [Rd] to connect R from ejb

2009-10-19 Thread Romain Francois
On 10/19/2009 10:57 AM, pragathichi wrote: How to call R from ejb, can i use Rserve? yes -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/BcPw : celebrating R commit #5 |- http://tr.im/ztCu : RGG #158:161: examples of

Re: [Rd] to connect R from ejb

2009-10-20 Thread Romain Francois
, what did not work, and so on. On 10/20/2009 05:22 AM, pragathichi wrote: how to add Reengine and Rserveengine jar files in ejb? I am using eclipse, plz suggest. Romain Francois-2 wrote: On 10/19/2009 10:57 AM, pragathichi wrote: How to call R from ejb, can i use Rserve? yes -- Romain

[Rd] recover and "called from" information

2009-10-27 Thread Romain Francois
) { w <- get( "which", sys.frame(nc- 2L ), inherits = FALSE ) if( typeof( w ) == "integer" && length(w) == 1L ){ return( calls[[w]] ) } }

[Rd] getConnection, R_outpstream_st

2009-11-07 Thread Romain Francois
other way to get the Rconnection that is associated with a number. Many thanks. Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/BcPw : celebrating R commit #5 |- http://tr.im/ztCu : RGG #158:161: examples of packag

Re: [Rd] getConnection, R_outpstream_st

2009-11-08 Thread Romain Francois
.com/apis/protocolbuffers/docs/reference/cpp/google.protobuf.message.html#Message.SerializeToOstream.details On 11/07/2009 11:24 AM, Romain Francois wrote: Hello, I'm trying to use the limited connections api defined in Rinternals.h. I have code that looks like this (inspired from do_serializeToConn) : SEXP

[Rd] \\signature macro generated by promptMethods

2009-11-09 Thread Romain Francois
hods.Rd" ) ) \name{foo-methods} \docType{methods} \alias{foo-methods} \alias{foo,track-method} \title{ ~~ Methods for Function foo ~~} \description{ ~~ Methods for function \code{foo} ~~ } \section{Methods}{ \describe{ \item{\code{\signature(x = "track")}}{ ~~describe this method he

Re: [Rd] Suggestion: Add links to NEWS and CHANGES on help.start() page

2009-11-13 Thread Romain Francois
ges=spdep) similar to library(help=MASS) Or have I overlooked something, and a function for this already exists? ?news -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/EAD5 : LondonR slides |- http://tr.im/BcPw : celebrating R

Re: [Rd] R_tryEval for OCaml-R.

2009-11-14 Thread Romain Francois
ome/edd/src/debian/R/R-2.10.0/tests/Embedding/tryEval.c e...@ron:~$ you can always try Google Code Search as in http://www.google.com/codesearch?q=R_tryEval&hl=en&btnG=Search+Code Hth, Dirk -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.

Re: [Rd] combine UserDefinedDatabase and regular environments

2009-11-19 Thread Romain Francois
On 11/19/2009 06:14 PM, Michael Lawrence wrote: On Thu, Nov 5, 2009 at 9:58 AM, Romain Francois mailto:romain.franc...@dbmail.com>> wrote: Hello, Is it possible to have the effect of UserDefinedDatabase outside of "attached" environments ? Can I disguise an en

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

2009-11-20 Thread Romain Francois
vectors easier, but could we also have something like: length.POSIXlt <- function(x) { length(x$sec) } in datetime.R, to avoid breaking functions (like the str.POSIXt method) which use length() in this way? [You need "wishlist" in the title for this sort of stuff.] I'd be wa

Re: [Rd] Including local dynamic libraries

2009-11-20 Thread Romain Francois
lem by adding the appropriate libraries to /user/local/lib64 . However, since I do not have root permissions I am not able to make this addition. How can I have R recognize c++ libraries from my local path? Thanks so much in advance for your help. -- Romain Francois Professional R Enthusiast +33(0

[Rd] include body in the call to httpd

2009-11-30 Thread Romain Francois
function). I'm attaching a small patch that adds a "body" argument to httpd and sets it to either NULL when there is no body or the body, as a raw vector. Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http:/

Re: [Rd] Bug in R evaluating a huge instruction (PR#14096)

2009-12-01 Thread Romain Francois
R bug, but I can't point out the problem in your code (or confirm that it really is an R bug) without an undamaged copy of the code. Duncan Murdoch -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/FtUu : ne

Re: [Rd] combine UserDefinedDatabase and regular environments

2009-12-02 Thread Romain Francois
On 12/03/2009 12:17 AM, Michael Lawrence wrote: On Thu, Nov 19, 2009 at 10:54 AM, Romain Francois mailto:romain.franc...@dbmail.com>> wrote: On 11/19/2009 06:14 PM, Michael Lawrence wrote: On Thu, Nov 5, 2009 at 9:58 AM, Romain Francois mailto:romain.franc...@dbma

Re: [Rd] Bug in R evaluating a huge instruction (PR#14096)

2009-12-03 Thread Romain Francois
ng problems, so it's not readable. Could you put the code online somewhere where we could download it in its original form? I doubt if this is an R bug, but I can't point out the problem in your code (or confirm that it really is an R bug) without an undamaged copy of the code. Duncan Mur

Re: [Rd] raster support in graphics devices

2009-12-04 Thread Romain Francois
of Auckland Private Bag 92019 Auckland New Zealand 64 9 3737599 x85392 p...@stat.auckland.ac.nz http://www.stat.auckland.ac.nz/~paul/<http://www.stat.auckland.ac.nz/%7Epaul/> <http://www.stat.auckland.ac.nz/%7Epaul/> -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30

Re: [Rd] raster support in graphics devices

2009-12-05 Thread Romain Francois
A recent question on the topic can be found here: http://tolstoy.newcastle.edu.au/R/e8/help/09/11/5902.html Best, Tobias On Fri, Dec 4, 2009 at 11:01 AM, Romain Francois wrote: On 12/04/2009 03:19 PM, Gabor Grothendieck wrote: Thanks. I am looking for the data to be just as if I had read

Re: [Rd] raster support in graphics devices

2009-12-06 Thread Romain Francois
On 12/06/2009 01:20 AM, Simon Urbanek wrote: On Dec 5, 2009, at 4:11 PM, Romain Francois wrote: I agree too, I was just trying to put on the balance the amount of work that would require graphics supporting connections. Who's willing to do it ? The issue is not the will nor complexi

Re: [Rd] raster support in graphics devices

2009-12-06 Thread Romain Francois
On 12/06/2009 02:24 PM, Romain Francois wrote: On 12/06/2009 01:20 AM, Simon Urbanek wrote: On Dec 5, 2009, at 4:11 PM, Romain Francois wrote: I agree too, I was just trying to put on the balance the amount of work that would require graphics supporting connections. Who's willing to

Re: [Rd] raster support in graphics devices

2009-12-06 Thread Romain Francois
On 12/06/2009 02:49 PM, Simon Urbanek wrote: On Dec 6, 2009, at 8:24 AM, Romain Francois wrote: On 12/06/2009 01:20 AM, Simon Urbanek wrote: On Dec 5, 2009, at 4:11 PM, Romain Francois wrote: I agree too, I was just trying to put on the balance the amount of work that would require

[Rd] S4 dispatch and S3 "connection" objects

2009-12-14 Thread Romain Francois
e" > class( f ) [1] "file" "connection" Am I supposed to do : setOldClass( c("file", "connection" ) ) setOldClass( c("url", "connection" ) ) and so on for each potential S3 class, or is there another way. Romain -- Rom

[Rd] split.data.frame

2009-12-15 Thread Romain Francois
df, y ) $`1` x y 1 1 1 2 2 1 3 3 1 4 4 1 5 5 1 $`2` x y 6 6 2 7 7 2 8 8 2 9 9 2 10 10 2 > split( df, x > 3 ) $`FALSE` x y 1 1 1 2 2 1 3 3 1 $`TRUE` x y 4 4 1 5 5 1 6 6 2 7 7 2 8 8 2 9 9 2 10 10 2 Romain -- Romain Francois Professional R Enthusiast +33(

Re: [Rd] silly SVN question

2009-12-15 Thread Romain Francois
opment branch of R, but so far I have been unable to figure out an analogous way to track the development branch of the recommended packages. (I'm assuming they actually live somewhere on the same SVN server, which might not be true ...) Any ideas (including pointing out the obvious, or the obvious-in-

Re: [Rd] split.data.frame

2009-12-15 Thread Romain Francois
On 12/16/2009 12:14 AM, Peter Dalgaard wrote: Romain Francois wrote: Hello, I very much enjoy "with" and "subset" semantics for data frames and was wondering if we could have something similar with split, basically by evaluating the second argument "with" the d

Re: [Rd] S4 dispatch and S3 "connection" objects

2009-12-15 Thread Romain Francois
rence wrote: On Mon, Dec 14, 2009 at 11:36 PM, Romain Francois< romain.franc...@dbmail.com> wrote: Hello, I'm trying to get S4 dispatch on S3 "connection" objects. So I do : setOldClass( "connection" ) and then : setGeneric( "bling", function(

Re: [Rd] Redirect standard output (PR#14148)

2009-12-16 Thread Romain Francois
This bug did not exist on Windows XP, but appeared on Windows 7 when the same program is run. Then send this to microsoft. -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/HlX9 : new package : bibtex |- http://tr.im/Gq7i : ohl

[Rd] R_PreserveObject, R_ReleaseObject : reference counting needed ?

2010-01-02 Thread Romain Francois
rmail/rcpp-devel/ [2] http://r-forge.r-project.org/plugins/scmsvn/viewcvs.php/pkg/src/RObject.cpp?rev=255&root=rcpp&view=markup -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/IW9B : C++ exceptions at the R level |- http

Re: [Rd] R_PreserveObject, R_ReleaseObject : reference counting needed ?

2010-01-02 Thread Romain Francois
ect.org/pipermail/rcpp-devel/ [2] http://r-forge.r-project.org/plugins/scmsvn/viewcvs.php/pkg/src/RObject.cpp?rev=255&root=rcpp&view=markup -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/IW9B : C++ exceptions at the R leve

Re: [Rd] R_PreserveObject, R_ReleaseObject : reference counting needed ?

2010-01-02 Thread Romain Francois
On 01/02/2010 06:01 PM, Simon Urbanek wrote: On Jan 2, 2010, at 5:07 AM, Romain Francois wrote: Hello, We are currently making lots of changes to Rcpp (see the open Rcpp mailing list if interested [1] in the details). We are now using [2] R_PreserveObject and R_ReleaseObject to manage

Re: [Rd] R-devel Digest, Vol 83, Issue 2

2010-01-02 Thread Romain Francois
s, and just protect/preserve the list as a whole. Duncan Murdoch -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/IW9B : C++ exceptions at the R level |- http://tr.im/IlMh : CPP package: exposing C++ objects `- http://tr.im/HlX9 : new p

Re: [Rd] R_PreserveObject, R_ReleaseObject : reference counting needed ?

2010-01-02 Thread Romain Francois
ot; to deal with symbols (SYMSXP), "Language" for calls (LANGSXP) and the template XPTr for external pointers. The rest (vectors, functions, ...) will follow. I'd suggest using the Rcpp mailing list for a follow up. https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rc

Re: [Rd] R-devel Digest, Vol 83, Issue 2

2010-01-02 Thread Romain Francois
hile( CAR(x) != object && CADR(x) != R_NilValue ){ y = x ; x = CDR(x) ; } if( CAR(x) == object ) SETCDR(y, CDR(x) ) ; } return list ; } Romain -- Romain Francois Professional R Enthusiast

Re: [Rd] R-devel Digest, Vol 83, Issue 2

2010-01-02 Thread Romain Francois
On 01/02/2010 11:41 PM, Romain Francois wrote: On 01/02/2010 11:12 PM, Duncan Murdoch wrote: On 02/01/2010 3:16 PM, Laurent Gautier wrote: On 1/2/10 8:53 PM, Duncan Murdoch wrote: Simon Urbanek wrote: On Jan 2, 2010, at 12:17 PM, Laurent Gautier wrote: On 1/2/10 5:56 PM, Duncan Murdoch

Re: [Rd] iterative list rm [Was: R-devel Digest, Vol 83, Issue 2]

2010-01-02 Thread Romain Francois
On 01/03/2010 02:04 AM, Simon Urbanek wrote: On Jan 2, 2010, at 5:41 PM, Romain Francois wrote: On 01/02/2010 11:12 PM, Duncan Murdoch wrote: On 02/01/2010 3:16 PM, Laurent Gautier wrote: On 1/2/10 8:53 PM, Duncan Murdoch wrote: Simon Urbanek wrote: On Jan 2, 2010, at 12:17 PM, Laurent

Re: [Rd] R object protection [Was: R-devel Digest, Vol 83, Issue 2]

2010-01-03 Thread Romain Francois
> as.vector(x) [1] 1 3 4 6 7 8 9 10 11 12 13 14 15 17 18 19 20 no magic however since C++ reflection capabilities are very limited, well some magic based on the brew package. Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http:/

Re: [Rd] PROTECT and OCaml GC.

2010-01-09 Thread Romain Francois
the commutation context somewhere in the evaluation mechanism of R itself. The API doesn't support that, I guess. -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/JOlc : External pointers with Rcpp |- http://tr.im/JFqa : R

Re: [Rd] Is nested namespace supported?

2010-01-09 Thread Romain Francois
o::bar::" > parse( text = "foo:::bar:::foobar" ) Error in parse(text = "foo:::bar:::foobar") : unexpected ':::' in "foo:::bar:::" Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr

[Rd] how to call a function from C

2010-01-14 Thread Romain Francois
Function rnorm = stats.get( "rnorm" ) return rnorm( 10, 0.0 ) ; -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/KfKn : Rcpp 0.7.2 |- http://tr.im/JOlc : External pointers with

Re: [Rd] how to call a function from C

2010-01-14 Thread Romain Francois
;do_try_eval". The behavior looks very similar, the above snippet in rpy2 would write like: from rpy2.robjects.packages import importr stats = importr('stats') stats.rnorm(10, 0.0) nice -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.

Re: [Rd] how to call a function from C

2010-01-14 Thread Romain Francois
s I am thinking about reoganizing that package to minimize confusion with the fork. Thanks, Dominick On Thu, Jan 14, 2010 at 7:16 AM, Romain Francois mailto:romain.franc...@dbmail.com>> wrote: On 01/14/2010 12:42 PM, Laurent Gautier wrote: Hi, In Rcpp, we n

Re: [Rd] how to call a function from C

2010-01-14 Thread Romain Francois
On 01/14/2010 02:27 PM, Laurent Gautier wrote: On 1/14/10 1:16 PM, Romain Francois wrote: On 01/14/2010 12:42 PM, Laurent Gautier wrote: Hi, In Rcpp, we now have a "Function" class to encapsulate functions (they cover all three kinds, but this may change). Just a note on that

[Rd] compiler specific flags : -std=c++0x

2010-01-18 Thread Romain Francois
do test that the compiler is indeed GCC >= 4.3 as part of our configure script and we only add the flag in that case. Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/KfKn : Rcpp 0.7.2 |- http://tr.im/JOlc : Extern

Re: [Rd] R CMD check error with the GNU Scientific Library

2010-01-22 Thread Romain Francois
Makevars they have "PKG_CFLAGS = -I./gsl". I have copied this approach, but wonder if using the standard "R CMD build myPackage" "R CMD check myPackage" needs modifying in some way? All hints or ideas welcome. Thanks David -- Romain Francois Professional R E

[Rd] LinkingTo and C++

2010-02-11 Thread Romain Francois
ve been looking at http://cran.r-project.org/doc/manuals/R-exts.html#Registering-native-routines but it seems only applicable to c(++) functions and not classes ... What am I missing ? Should/can linkingto be extended in a way that accomodates c++ Romain -- Romain Francois Professio

Re: [Rd] LinkingTo and C++

2010-02-11 Thread Romain Francois
On 02/11/2010 10:08 AM, Romain Francois wrote: Hello, I've been trying to make LinkingTo work when the package linked to has c++ code. I've put dumb packages to illustrate this emails here ; http://addictedtor.free.fr/misc/linkingto Package A defines this C++ class: class A {

Re: [Rd] LinkingTo and C++

2010-02-11 Thread Romain Francois
ally using the LinkingTo: facilities for the functions so it's essentially just helping you to find the header file. Cheers, Simon On Feb 11, 2010, at 4:08 AM, Romain Francois wrote: Hello, I've been trying to make LinkingTo work when the package linked to has c++ code. I'v

Re: [Rd] LinkingTo and C++

2010-02-11 Thread Romain Francois
On 02/11/2010 07:40 PM, Simon Urbanek wrote: On Feb 11, 2010, at 12:24 PM, Romain Francois wrote: Thanks. On 02/11/2010 05:55 PM, Simon Urbanek wrote: Romain, I think your'e confusing two entirely different concepts here: Yes. The name "LinkingTo" probably help

Re: [Rd] Portability of a C function

2010-02-14 Thread Romain Francois
-- void f2(x,y,z){ double result; result = f1(x,y); } Thanks Christophe -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/O1wO : highlight 0.1-5 |- http://tr.im/O1qJ : Rcpp 0.7.6 `- http://tr.im/N

Re: [Rd] How S3method() is implemented and called? And when to use it?

2010-02-14 Thread Romain Francois
method' in specified packages and libraries: you could try '??S3method' I don't understand why S3method is necessary. My understanding is that we can always use print.foo(} # and appropriate exporting to replace S3method(print, foo) , right? Or I misunderstand somethi

Re: [Rd] how to create a SEXP which could be accessed in embedded R

2010-02-20 Thread Romain Francois
g namespace Rcpp; Environment global = Environment::global_env() ; CharacterVector x(2) ; x[0] = "foo" ; x[1] = "bar" ; global["x"] = x ; -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/OIXN : raster image

Re: [Rd] Mentor for GSOC '10: Symbolic Regression in R

2010-03-03 Thread Romain Francois
yrfr I am looking for a mentor to guide me through the summer on the project under the Google Summer Of Code program (GSOC 2010) with relevant experience in Symbolic Regression or Genetic Programming in general. Chillu -- Romain Francois Professional R Enthusiast +33(0) 6 28 91

Re: [Rd] for help on building a R package with several R function and a bunch of c, c++

2010-03-07 Thread Romain Francois
ear to you, and b) what made you think you needed to repost _the identical question_ here | Thank you in advance! You're welcome. Dirk -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/OIXN : raster images

[Rd] duplicate STRSXP : shallow copy ?

2010-03-07 Thread Romain Francois
? If not, I can track it down to the DUPLICATE_ATOMIC_VECTOR in duplicate.c and submit a patch. Also, CHARSXP don't seem to be actually duplicated : case CHARSXP: return s; Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blo

Re: [Rd] duplicate STRSXP : shallow copy ?

2010-03-07 Thread Romain Francois
Hello, I understand now that this is very intended after reading: http://cran.r-project.org/doc/manuals/R-ints.html#The-CHARSXP-cache So we are not supposed to modify a CHARSXP character by character. Sorry for the noise. Romain On 03/07/2010 10:48 AM, Romain Francois wrote: Hello, As

Re: [Rd] for help on building a R package with several R function and a bunch of c, c++

2010-03-07 Thread Romain Francois
ce between my first name and last name..  All I tried are on my own PC at home , I will tryon other  PC in my office.  Do you have suggestion?. Thanks,  Alex --- On Sun, 3/7/10, Romain Francois wrote: From: Romain Francois Subject: Re: [Rd] for help on building a R package with seve

Re: [Rd] for help on building a R package with several R function and a bunch of c, c++

2010-03-08 Thread Romain Francois
e.skeleton adds a useDynLib directive to the NAMESPACE so you should be fine. Thank you so much! > Alex --- On Mon, 3/8/10, Romain Francois wrote: From: Romain Francois Subject: Re: [Rd] for help on building a R package with several R function and a bunch of c, c++ To: alex46...@yahoo.

Re: [Rd] Trouble in using rJava

2010-03-30 Thread Romain Francois
2.8.1, 2.9.0, 2.9.1, 2.9.2, 2.10.0. Can you try to use the current version of R and see if this fix your vague problem. Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/OIXN : raster images and RImageJ |- http://tr.im/OcQe

[Rd] inject html code into Rd file

2010-04-02 Thread Romain Francois
t hello, i.e. characters < and > are replaced with html entities : < and > Is there a way to turn this off ? Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/OIXN : raster images and RImageJ |- http://tr.im/O

Re: [Rd] inject html code into Rd file

2010-04-02 Thread Romain Francois
Le 02/04/10 13:07, Duncan Murdoch a écrit : On 02/04/2010 6:17 AM, Romain Francois wrote: Hello, I'm trying to inject html code into an Rd file. For example : \name{test} \alias{test} \title{test} \description{ \if{html}{ \Sexpr[stage=render,results=text,echo=FALSE]{ "hello" }

Re: [Rd] inject html code into Rd file

2010-04-03 Thread Romain Francois
Le 03/04/10 02:04, Duncan Murdoch a écrit : On 02/04/2010 8:06 AM, Duncan Murdoch wrote: On 02/04/2010 7:13 AM, Romain Francois wrote: Le 02/04/10 13:07, Duncan Murdoch a écrit : On 02/04/2010 6:17 AM, Romain Francois wrote: Hello, I'm trying to inject html code into an Rd file

Re: [Rd] suggestion how to use memcpy in duplicate.c

2010-04-21 Thread Romain Francois
_ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://bit.ly/9aKDM9 : embed images in Rd documents |- http://tr.im/OIXN : raster images and RImageJ |

Re: [Rd] suggestion how to use memcpy in duplicate.c

2010-04-21 Thread Romain Francois
Le 21/04/10 21:39, Simon Urbanek a écrit : On Apr 21, 2010, at 3:32 PM, Romain Francois wrote: Le 21/04/10 17:54, Matthew Dowle a écrit : From copyVector in duplicate.c : void copyVector(SEXP s, SEXP t) { int i, ns, nt; nt = LENGTH(t); ns = LENGTH(s); switch (TYPEOF

Re: [Rd] RUnit bug?

2010-04-22 Thread Romain Francois
(with names that end with '~') then runTestSuite gets confused and tries to run functions from the temp files as well. How do you define 'testsuite.math'. The default value of the testFileRegexp argument in defineTestSuite should rule these files out. Romain -- Romain Fra

Re: [Rd] Resolving functions using R's namespace mechanism can double runtime

2010-04-27 Thread Romain Francois
can understand why use of this mechanism is not free in an interpreted environment like R, but the cost seems rather high. Dominick -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://bit.ly/9aKDM9 : embed images in Rd documents |- h

Re: [Rd] RInside & child threads

2010-05-01 Thread Romain Francois
that this initialization need to be made after the RInside constructor is called. I did that, but it still does not work. Can you please let me know how do we accomplish this task? Thanks very much, Jai -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog

Re: [Rd] RInside & child threads

2010-05-01 Thread Romain Francois
that this initialization need to be made after the RInside constructor is called. I did that, but it still does not work. Can you please let me know how do we accomplish this task? Thanks very much, Jai -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog

Re: [Rd] Memory allocation in C/C++ vs R?

2010-05-01 Thread Romain Francois
In both of these cases the R-provided functions are not used (to my knowledge), yet I have not seen any problems. How is the memory that R manages and garbage collects kept separate from the memory that is allocated on the C++ side quite independently of what R is doing? Th

<    1   2   3   >