Re: [Rd] help with rchk warnings on Rf_eval(Rf_lang2(...))

2020-03-24 Thread Romain Francois
> Le 23 mars 2020 à 22:55, Dirk Eddelbuettel a écrit : > > On 23 March 2020 at 17:07, Ben Bolker wrote: > | Or is there a way I can use Shield() since this an Rcpp-based project > | anyway? > > Yes you can, and I would recommend it. > > Example from Rcpp itself, file Environment.h: > >

Re: [Rd] What is the best way to loop over an ALTREP vector?

2019-09-24 Thread Romain Francois
Thanks for these comments. I should alter the blog post or write some follow up. This was a weekend blog post that only benefited from a short time of research research. I’m glad people find it useful, but I’m sure a detailed documentation of the features from the authors would be more

Re: [Rd] Use of C++ in Packages

2019-03-30 Thread Romain Francois
tl;dr: we need better C++ tools and documentation. We collectively know more now with the rise of tools like rchk and improved documentation such as Tomas’s post. That’s a start, but it appears that there still is a lot of knowledge that would deserve to be promoted to actual documentation of

Re: [Rd] R_ext/Altrep.h should be more C++-friendly

2018-10-10 Thread Romain Francois
Thank you, I updated my example package so that it works with both. https://github.com/romainfrancois/altrepisode/blob/96af0548a9ecc08701d119ea427e16940a82882b/src/altrepisode.h We

Re: [Rd] R_ext/Altrep.h should be more C++-friendly

2018-10-09 Thread Romain Francois
I successfully use this workaround in this package: https://github.com/romainfrancois/altrepisode (which is just my way to get familiar with altrep, nothing serious) > Le 9 oct. 2018 à 17:00, Gabe Becker a écrit : > > Michael, > > Thanks for reaching out. This was brought up by Romaine

Re: [Rd] Linking to the BH package introduces CRAN warnings

2014-11-05 Thread Romain Francois
Envoyé de mon iPhone Le 5 nov. 2014 à 13:43, Dirk Eddelbuettel e...@debian.org a écrit : On 5 November 2014 at 00:55, kaveh wrote: | Dear all, | | | the simple code in below, when send to the | win-builder returns the following (and no other) | warning: | | | * checking

Re: [Rd] Looking for new maintainer of orphans R2HTML SemiPar cghseg hexbin lgtdl monreg muhaz operators pamr

2014-09-07 Thread Romain Francois
I'll pick up operators. Le 7 sept. 2014 à 18:03, Uwe Ligges lig...@statistik.tu-dortmund.de a écrit : On 05.09.2014 20:25, Greg Snow wrote: Uwe, Have all of these packages found new maintainers? if not, which ones are still looking to be adopted? Thanks for asking, the ones still

Re: [Rd] using C code to create data frame but always return as list

2014-06-24 Thread Romain Francois
Hi, Can you give us what str on the returned object gives you? I think you need : SET_OBJECT(and, 1) ; at the end. Romain Le 24 juin 2014 à 08:57, Yu Gong armg...@yahoo.com a écrit : there is my code, expect return value is a data frame but R say it is list: SEXP

Re: [Rd] Is it possible to shrink an R object in place?

2014-04-11 Thread Romain Francois
Hello, I’ve been using shrinking in https://github.com/hadley/dplyr/blob/master/inst/include/tools/ShrinkableVector.h This defines a ShrinkableVector of some R type (INTSXP, ...) given the maximum number of elements it will hold. Then, I reset with SETLENGTH when needed. The constructor

Re: [Rd] CXX_STD and configure.ac in packages

2014-03-31 Thread Romain Francois
Hi, My advice would be to use SystemRequirements: C++11 As unordered_map is definitely a part of C++11, assuming this version of the standard gives it to you. Your package may not compile on platforms where a C++11 compiler is not available, but perhaps if this becomes a pattern, then such

Re: [Rd] [RFC] A case for freezing CRAN

2014-03-19 Thread Romain Francois
Weighting in. FWIW, I find the proposal conceptually quite interesting. For package developers, it does not have to be a frustration to have to wait a new version of R to release their code. Anticipated frustration was my initial reaction. Thinking about this more, I think this could be

Re: [Rd] getting environment from top promise

2014-02-14 Thread Romain Francois
Le 14 févr. 2014 à 16:40, luke-tier...@uiowa.edu a écrit : On Tue, 11 Feb 2014, Romain Francois wrote: Hello, We have something very similar to your while loop in dplyr. https://github.com/hadley/dplyr/blob/02a609310184d003c2ae9e0c013bfa69fa4d257a/inst/include/tools/DataDots.h#L15

Re: [Rd] getting environment from top promise

2014-02-11 Thread Romain Francois
Hello, We have something very similar to your while loop in dplyr. https://github.com/hadley/dplyr/blob/02a609310184d003c2ae9e0c013bfa69fa4d257a/inst/include/tools/DataDots.h#L15 because we need to know exactly in which environment a promise is supposed to be evaluated, even though we might

[Rd] LinkingTo self

2014-02-03 Thread Romain Francois
Hello, Shipping header files for a package in inst/include and let other packages use it with LinkingTo is popular. Unfortunately for the package itself, we still need to use something like : PKG_CPPFLAGS+=-I../inst/include/ in the Makevars and Makevars.win files. Could this become

Re: [Rd] Strategies for keeping autogenerated .Rd files out of a Git tree

2013-12-13 Thread Romain Francois
Pushing back to github is not so difficult. See e.g http://blog.r-enthusiasts.com/2013/12/04/automated-blogging.html You can manage branches easily in travis. You could for example decide to do something different if you are on the master branch ... Romain Le 13 déc. 2013 à 12:03, Kirill

Re: [Rd] Linking to native routines in other packages

2013-12-06 Thread Romain Francois
package maintainer to negociate that when they release a package that depends on Rcpp. Perhaps that's alright. Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [Rd] Linking to native routines in other packages

2013-11-16 Thread Romain Francois
Le 16/11/2013 11:02, Romain Francois a écrit : Hello, I'm currently working on making Rcpp use the feature described here more: http://cran.r-project.org/doc/manuals/R-exts.html#Linking-to-native-routines-in-other-packages To give more context, Rcpp has for a long time built what we called

[Rd] serialization for external pointers

2013-11-16 Thread Romain Francois
bindingIsActive(fred, .GlobalEnv) [1] FALSE Is this possible ? Is there any other hook to handle serialization, unserialization of external pointers ? Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 __ R-devel@r-project.org

Re: [Rd] serialization for external pointers

2013-11-16 Thread Romain Francois
Le 16/11/2013 14:30, Romain Francois a écrit : Hello, Are there any recipe to handle serialization / deserialization of external pointers. I'm thinking about something similar in spirit to the way we handle finalization of external pointers. Currently, if we create an external pointer, save

Re: [Rd] Dynamic list creation (SEXP in C) returns error unimplemented type (29) in 'duplicate'

2013-11-07 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 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Dynamic list creation (SEXP in C) returns error unimplemented type (29) in 'duplicate'

2013-11-07 Thread Romain Francois
/11/7 Romain Francois rom...@r-enthusiasts.com: Hello, Any particular reason you're not using Rcpp? You would have access to nice abstraction instead of these MACROS all over the place. The cost of these abstractions is close to 0. Looping around and SET_LENGTH is going to be quite expensive. I

Re: [Rd] Dynamic list creation (SEXP in C) returns error unimplemented type (29) in 'duplicate'

2013-11-07 Thread Romain Francois
Le 07/11/2013 14:43, Romain Francois a écrit : Le 07/11/2013 14:30, George Vega Yon a écrit : Romain, Thanks for your quick response. I've already received that suggestion, but, besides of haven't ever used C++, I wanted to understand first what am I doing wrong. For that type of code

Re: [Rd] R 3.1.0 and C++11

2013-11-04 Thread Romain Francois
be taking pull requests? Yes. Definitely. I will carefully review them. Can give you write access too. I'm getting a good feel of what C++11 brings while developping Rcpp11. But I think it makes a lot of sense to write such an article with other people as well. Romain -- Romain Francois

Re: [Rd] C++ debugging help needed

2013-10-02 Thread Romain Francois
have a call out to igraph's Shape::~Shape instead of rgl's Shape::~Shape, or is this just bad info being given to me by gdb? - If I really do have calls to the wrong destructor in there, how do I avoid this? Duncan Murdoch -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30

Re: [Rd] C++ debugging help needed

2013-10-02 Thread Romain Francois
#include string #include Color.h #include Ray.h #include Point.h class Shape [] So the clash is due to two packages simulatenously failing to make use of namespaces. And at that point the linker appears to pick in search (link ?) order. Dirk -- Romain Francois Professional R

Re: [Rd] C++ debugging help needed

2013-10-02 Thread Romain Francois
result in the right call without much effort. No, this is an implicit destructor call. I'm deleting an object whose class descends from Shape. Duncan Murdoch -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 __ R-devel@r-project.org

Re: [Rd] Using long long types in C++

2013-09-20 Thread Romain Francois
Le 20 sept. 2013 à 02:31, Patrick Welche pr...@cam.ac.uk a écrit : On Fri, Sep 20, 2013 at 12:51:52AM +0200, rom...@r-enthusiasts.com wrote: In Rcpp we'd like to do something useful for types such as long long and unsigned long long. ... But apparently this is still not enough and on some

Re: [Rd] Using long long types in C++

2013-09-20 Thread Romain Francois
Karl, Brian gave some insights already. I'm also reluctant to use int64_t because there does not seem to be a standard version of what the type is. Eg on OSX, int64_t is a typedef to long long. IIRC there are cases where it is a typedef to long ... At least with long an long long they are

Re: [Rd] Calling an array in a struct in C to R

2013-06-20 Thread Romain Francois
my C code using Call in R? Another, not preferred, options is to pre-allocate the array/vector in R on a fixed (large-enough) size? Or do I miss something here? Regards. -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 R Graph Gallery: http://gallery.r-enthusiasts.com blog

Re: [Rd] invalid operands of types ‘SEXPREC*’ and ‘R_len_t’ to binary ‘operator/’ with Rcpp.

2013-05-14 Thread Romain Francois
Please use the appropriate mailing list (Rcpp-devel) for Rcpp questions. Romain Le 14 mai 2013 à 06:42, Xiao He praguewaterme...@gmail.com a écrit : Dear R-Developers, I just started learning how to use Rcpp. Earlier while using it, I encountered an error as shown below:

Re: [Rd] Problem using raw vectors with inline cfunction

2013-02-01 Thread Romain Francois
a pointer on my array of bytes ? Thanks. Karl -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 R Graph Gallery: http://gallery.r-enthusiasts.com blog:http://romainfrancois.blog.free.fr |- http://bit.ly/RE6sYH : OOP with Rcpp modules `- http://bit.ly/Thw7IK : Rcpp

Re: [Rd] Interfacing a C++ class

2011-06-06 Thread Romain Francois
. Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr http://romain-francois.com |- http://bit.ly/hdKhCy : Rcpp article in JSS |- http://bit.ly/elZJRJ : Montpellier Comedie Club - Avril 2011 `- http://bit.ly/fhqbRC : Rcpp workshop in Chicago

Re: [Rd] assignInNamespace and new bindings

2011-05-31 Thread Romain Francois
Le 31/05/11 12:01, Prof Brian Ripley a écrit : On Tue, 31 May 2011, Prof Brian Ripley wrote: On Tue, 31 May 2011, Romain Francois wrote: Hello, assignInNamespace refuses to assign an object to a name that is not already used in the namespace. That's intentional, and as documented

Re: [Rd] serialization of external pointers

2011-05-26 Thread Romain Francois
Le 26/05/11 17:04, Simon Urbanek a écrit : On May 26, 2011, at 10:40 AM, Romain Francois wrote: Hello, I'm looking for examples of how to handle serialization of external pointers. We use external pointers intensively in Rcpp for modules and one popular request is to have persistence

Re: [Rd] Recursively parsing srcrefs

2011-05-13 Thread Romain Francois
-- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr http://romain-francois.com |- http://bit.ly/hdKhCy : Rcpp article in JSS |- http://bit.ly/elZJRJ : Montpellier Comedie Club - Avril 2011 `- http://bit.ly/fhqbRC : Rcpp workshop in Chicago on April 28th

Re: [Rd] Create and access several instances of a C++ class from R

2011-05-07 Thread Romain Francois
for package ‘Foo’ __ 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://romain-francois.com |- http://bit.ly/hdKhCy

[Rd] as.environment.list provides inconsistent results under torture

2011-01-11 Thread Romain Francois
= */R_NilValue, /* parent = */R_EmptyEnv), rho)); } (BTW, this was detected in a long Rcpp-devel thread. See http://comments.gmane.org/gmane.comp.lang.r.rcpp/1336) Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http

[Rd] embed Sweave driver in .Rnw file

2010-12-14 Thread Romain Francois
that be added to Sweave ? Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://bit.ly/fT2rZM : highlight 0.2-5 |- http://bit.ly/gpCSpH : Evolution of Rcpp code size `- http://bit.ly/hovakS : RcppGSL initial release

Re: [Rd] embed Sweave driver in .Rnw file

2010-12-14 Thread Romain Francois
Le 14/12/10 13:21, Friedrich Leisch a écrit : On Tue, 14 Dec 2010 12:40:04 +0100, Romain Francois (RF) wrote: Hello, Sweave lets you use alternative drivers through the driver argument, and several packages take advantage of that and define custom Sweave driver for various

[Rd] Enough (was: Terminology clarification (Re: GPL and R Community Policies (Rcpp))

2010-12-04 Thread Romain Francois
in Rcpp (except in copyright notices)? Are you telling me that you will continue to use my name and update the associated status as you see fit, whether or not I approve or consent to those changes? Please answer yes or no. Thanks, Dominick -- Romain Francois Professional R Enthusiast +33(0

[Rd] faster base::sequence

2010-11-28 Thread Romain Francois
0.119 system.time( for( i in 1:1) sequence_c(1:10) ) utilisateur système écoulé 0.019 0.000 0.019 I would write a proper patch if someone from R-core is willing to push it. Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http

Re: [Rd] faster base::sequence

2010-11-28 Thread Romain Francois
comfortable with .Internal, etc ... Do you mean that I should also use something else instead of int and int*. Is there some future proof typedef or macro for the type associated with INTSXP ? On Sun, 28 Nov 2010, Romain Francois wrote: Hello, Based on yesterday's R-help thread (help

Re: [Rd] faster base::sequence

2010-11-28 Thread Romain Francois
Le 28/11/10 11:30, Prof Brian Ripley a écrit : On Sun, 28 Nov 2010, Romain Francois wrote: Le 28/11/10 10:30, Prof Brian Ripley a écrit : Is sequence used enough to warrant this? As the help page says Note that ‘sequence - function(nvec) unlist(lapply(nvec, seq_len))’ and it mainly exists

Re: [Rd] How to call R from C

2010-11-22 Thread Romain Francois
Function rnorm(rnorm) ; // call it return rnorm(10, _[sd] = 10) ; ' , plugin = Rcpp ) fx() Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://bit.ly/9VOd3l : ZAT! 2010 |- http://bit.ly/c6DzuX : Impressionnism with R

Re: [Rd] R5 reference classes: how to initialize exactly?

2010-11-17 Thread Romain Francois
(.) But then how do I define a reference class in a package that should be available after the package is loaded via 'library(my_pkg)' as there is no 'MyRefObj' at startup yet? Do I have to call the script where the definition lives? Thanks for any comments, Janko -- Romain Francois Professional

Re: [Rd] Reference classes: accessor functions via 'getRefClass(...)$accessors(...)'

2010-11-17 Thread Romain Francois
/iris.txt ) foo$x - iris foo$x write.table( subset( iris, Petal.Length 2), file = /tmp/iris.txt ) foo$x Does that help ? Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://bit.ly/9VOd3l : ZAT! 2010 |- http://bit.ly/c6DzuX

Re: [Rd] SEXP and slots

2010-11-16 Thread Romain Francois
Le 15/11/10 21:15, Romain Francois a écrit : Hello, Since people have whisperred about Rcpp, I'd like to play too. On 11/15/2010 07:45 AM, Patrick Leyshock wrote: Very helpful, thank you. A couple other questions, please: 1. I've got a function written in C, named my_c_function. In my R

Re: [Rd] SEXP and slots

2010-11-15 Thread Romain Francois
Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: M1-B861 Telephone: 206 667-2793 -- Computational Biology Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: M1-B861 Telephone: 206 667-2793 -- Romain

Re: [Rd] Possible bug or annoyance with library.dynam.unload()

2010-09-22 Thread Romain Francois
, or that library.dynam.unload() should be modified to handle the relative paths. Am I missing something ? What should I do ? Thanks, Karl -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://bit.ly/cCmbgg : Rcpp 0.8.6 |- http://bit.ly/bzoWrs

[Rd] list2env( list() )

2010-09-15 Thread Romain Francois
)).)); envir = CAR(args); args = CDR(args); if (TYPEOF(envir) == NILSXP) { Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://bit.ly/cCmbgg : Rcpp 0.8.6 |- http://bit.ly/bzoWrs : Rcpp svn revision 2000 `- http://bit.ly/b8VNE2 : Rcpp

Re: [Rd] C or Java code generation

2010-08-20 Thread Romain Francois
package, there is no need for a Makefile. $ R CMD RInside_0.2.3.tar.gz or from R: install.packages( RInside ) We usually encourage people to use the Rcpp-devel mailing list for questions about RInside : http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel Romain -- Romain

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

2010-07-09 Thread Romain Francois
) dans a$$ But you can define custom methods for $. setClass( Foo, representation( n = integer ) ) setMethod( $, Foo, function(x, name ){ function( ) rnorm( x...@n ) } ) foo - new( Foo, n = 10L ) foo$bla( ) Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http

[Rd] nchar( NA )

2010-06-18 Thread Romain Francois
Hello, Is this expected ? nchar( c( , NA ) ) [1] 0 2 Should not the second one be NA ? Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://bit.ly/98Uf7u : Rcpp 0.8.1 |- http://bit.ly/c6YnCi : graph gallery collage `- http

Re: [Rd] nchar( NA )

2010-06-18 Thread Romain Francois
behavior. Oops. My scan of the help page was too quick. I did not see it. Sorry for the noise. Sarah On Fri, Jun 18, 2010 at 4:52 PM, Romain Francois rom...@r-enthusiasts.com wrote: Hello, Is this expected ? nchar( c( , NA ) ) [1] 0 2 Should not the second one be NA ? Romain -- Romain

[Rd] using C++ finalizers for external pointers

2010-06-16 Thread Romain Francois
finalizer (with R_RegisterFinalizer) using another external pointer to some class be appropriate ? Romain [1] : http://article.gmane.org/gmane.comp.lang.r.rcpp/433 -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://bit.ly/98Uf7u : Rcpp

Re: [Rd] require( foo (= 2.1) )

2010-05-31 Thread Romain Francois
Le 31/05/10 10:41, Barry Rowlingson a écrit : On Sun, May 30, 2010 at 5:50 PM, Romain Francois rom...@r-enthusiasts.com wrote: Hi, Sure. I could and I would provide a patch. Since this is more of a nice to have, I wanted to first find out whether others would find it useful, and also

Re: [Rd] require( foo (= 2.1) )

2010-05-30 Thread Romain Francois
by a patch that could be applied to the R sources? Best wishes Wolfgang Huber EMBL http://www.embl.de/research/units/genome_biology/huber On 28/05/10 19:25, Romain Francois wrote: Hello, I often find myself writing code like : if( require( foo ) compareVersion( packageDescription( foo

[Rd] S4 dispatch for .DollarNames (utils)

2010-05-29 Thread Romain Francois
: x$fTAB x$ What do I miss ? I've uploaded foo here : http://addictedtor.free.fr/misc/rcpp/foo_1.0.tar.gz Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://bit.ly/9CQ66r : RMetrics 2010 |- http://bit.ly/cork4b : highlight 0.1-8

Re: [Rd] S4 dispatch for .DollarNames (utils)

2010-05-29 Thread Romain Francois
better idea ? Romain Le 29/05/10 13:21, Romain Francois a écrit : Hello, I'm trying to make .DollarNames generic and implement a method for it in a package. .DollarNames is the function that is now called to get completion possibilities. My R code looks like this: setGeneric( .DollarNames

Re: [Rd] S4 dispatch for .DollarNames (utils)

2010-05-29 Thread Romain Francois
Le 29/05/10 20:23, Deepayan Sarkar a écrit : On Sat, May 29, 2010 at 4:21 AM, Romain Francois rom...@r-enthusiasts.com wrote: Hello, I'm trying to make .DollarNames generic and implement a method for it in a package. .DollarNames is the function that is now called to get completion

Re: [Rd] S4 dispatch for .DollarNames (utils)

2010-05-29 Thread Romain Francois
with bar, running 2.11.0 from the command line. John On 5/29/10 12:37 PM, Romain Francois wrote: Le 29/05/10 20:23, Deepayan Sarkar a écrit : On Sat, May 29, 2010 at 4:21 AM, Romain Francois rom...@r-enthusiasts.com wrote: Hello, I'm trying to make .DollarNames generic and implement

[Rd] require( foo (= 2.1) )

2010-05-28 Thread Romain Francois
not making a package. Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://bit.ly/9CQ66r : RMetrics 2010 |- http://bit.ly/cork4b : highlight 0.1-8 `- http://bit.ly/bklUXt : RcppArmadillo 0.2.1

Re: [Rd] R 2.10 and help

2010-05-27 Thread Romain Francois
tools:::httpd -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://bit.ly/cork4b : highlight 0.1-8 |- http://bit.ly/bklUXt : RcppArmadillo 0.2.1 `- http://bit.ly/936ck2 : Rcpp 0.8.0 __ R

Re: [Rd] Use of R and Rscript in configure/Makevars in packages

2010-05-20 Thread Romain Francois
is that configure.win is called once, and then src/Makevars.win is called for each architecture.) BDR -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://bit.ly/bklUXt : RcppArmadillo 0.2.1 |- http://bit.ly/936ck2 : Rcpp 0.8.0 `- http

Re: [Rd] Use of R and Rscript in configure/Makevars in packages

2010-05-20 Thread Romain Francois
Le 20/05/10 09:40, Prof Brian Ripley a écrit : On Thu, 20 May 2010, Romain Francois wrote: Hello, Thank you for these clear guidelines. Given these subtleties, would it make sense to have a configure.R that would win over configure and configure.win, and have R invoking it correctly

[Rd] print.data.frame curiosity

2010-05-06 Thread Romain Francois
in format.data.frame is responsible for the mismatch: x - do.call(data.frame, rval) Romain -- 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 |- http

Re: [Rd] RInside child threads

2010-05-01 Thread Romain Francois
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.free.fr |- http://bit.ly/9aKDM9 : embed images

Re: [Rd] RInside child threads

2010-05-01 Thread Romain Francois
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.free.fr |- http://bit.ly/9aKDM9 : embed images

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

2010-05-01 Thread Romain Francois
quite independently of what R is doing? Thanks, 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 |- http://tr.im/OIXN : raster images and RImageJ |- http://tr.im/OcQe : Rcpp 0.7.7

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

2010-04-27 Thread Romain Francois
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 |- http

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 Francois Professional R

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

2010-04-21 Thread Romain Francois
, as before. Comments/pointers much appreciated. Matthew __ 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

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] 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

[Rd] inject html code into Rd file

2010-04-02 Thread Romain Francois
and are replaced with html entities : lt; and gt; 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/OcQe : Rcpp 0.7.7 `- http://tr.im

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]{ bhello/b } } } when

Re: [Rd] Trouble in using rJava

2010-03-30 Thread Romain Francois
, 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 : Rcpp 0.7.7 `- http

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
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 and RImageJ |- http://tr.im/OcQe : Rcpp 0.7.7

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
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 and RImageJ |- http://tr.im/OcQe : Rcpp

[Rd] duplicate STRSXP : shallow copy ?

2010-03-07 Thread Romain Francois
. Is this intended ? 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

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

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
! 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 and RImageJ |- http://tr.im/OcQe : Rcpp 0.7.7 `- http://tr.im/O1wO : highlight 0.1-5 __ R-devel@r

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

2010-03-03 Thread Romain Francois
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 30 30 http

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

2010-02-20 Thread Romain Francois
() ; 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 images and RImageJ |- http://tr.im/OcQe : Rcpp 0.7.7 `- http://tr.im/O1wO : highlight 0.1-5

Re: [Rd] Portability of a C function

2010-02-14 Thread Romain Francois
){ 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/NrTG : Rcpp 0.7.5

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

2010-02-14 Thread Romain Francois
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(something) {function body} # and appropriate exporting to replace S3method(print, foo) , right? Or I misunderstand something? -- Romain

[Rd] LinkingTo and C++

2010-02-11 Thread Romain Francois
(++) functions and not classes ... What am I missing ? Should/can linkingto be extended in a way that accomodates c++ Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/NrTG : Rcpp 0.7.5 |- http://tr.im/MPYc : RProtoBuf

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 { public

Re: [Rd] LinkingTo and C++

2010-02-11 Thread Romain Francois
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've put dumb packages to illustrate this emails here ; http://addictedtor.free.fr/misc/linkingto Package

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 helped my confusion

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

2010-01-22 Thread Romain Francois
./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 Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http

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

2010-01-18 Thread Romain Francois
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 : External pointers

[Rd] how to call a function from C

2010-01-14 Thread Romain Francois
) ; -- 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 Rcpp `- http://tr.im/JFqa : R Journal, Volume 1/2, December 2009 __ R

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

2010-01-14 Thread Romain Francois
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.free.fr |- http://tr.im/KfKn : Rcpp 0.7.2 |- http://tr.im/JOlc : External pointers with Rcpp `- http://tr.im/JFqa

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

2010-01-14 Thread Romain Francois
. Thanks, Dominick On Thu, Jan 14, 2010 at 7:16 AM, Romain Francois romain.franc...@dbmail.com mailto:romain.franc...@dbmail.com wrote: On 01/14/2010 12:42 PM, Laurent Gautier wrote: Hi, In Rcpp, we now have a Function class to encapsulate functions

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

Re: [Rd] Is nested namespace supported?

2010-01-09 Thread Romain Francois
= 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.im/JOlc : External pointers with Rcpp |- http://tr.im/JFqa : R Journal, Volume 1/2, December 2009 `- http://tr.im/IW9B

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

2010-01-03 Thread Romain Francois
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://tr.im/IW9B : C++ exceptions at the R level |- http://tr.im/IlMh : CPP package: exposing C++ objects `- http

[Rd] R_PreserveObject, R_ReleaseObject : reference counting needed ?

2010-01-02 Thread Romain Francois
/rcpp-devel/ [2] http://r-forge.r-project.org/plugins/scmsvn/viewcvs.php/pkg/src/RObject.cpp?rev=255root=rcppview=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://tr.im/IlMh : CPP

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

2010-01-02 Thread Romain Francois
-project.org/plugins/scmsvn/viewcvs.php/pkg/src/RObject.cpp?rev=255root=rcppview=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://tr.im/IlMh : CPP package: exposing C++ objects `- http

  1   2   3   >