[Rd] hello World problem

2006-01-12 Thread Romain Francois
od 1.7 is released : http://www-math.univ-fcomte.fr/mixmod/index.php +---+ | Romain FRANCOIS - http://f

[Rd] generate Rd file from R file

2006-01-24 Thread Romain Francois
d Rd Romain -- visit the R Graph Gallery : http://addictedtor.free.fr/graphiques mixmod 1.7 is released : http://www-math.univ-fcomte.fr/mixmod/index.php +-------+ | Romain FRANCOIS - http://francoisromain.free.fr | | Doctorant

[Rd] What about a bib file

2006-01-30 Thread Romain Francois
you think ? Romain -- visit the R Graph Gallery : http://addictedtor.free.fr/graphiques mixmod 1.7 is released : http://www-math.univ-fcomte.fr/mixmod/index.php +---+ | Romain FRANCOIS - http://francoisromain.free.fr | |

[Rd] javascript device for R

2006-02-04 Thread Romain Francois
x.php +---+ | Romain FRANCOIS - http://francoisromain.free.fr | | Doctorant INRIA Futurs / EDF | +---+ __ R-devel@r-project.org mailing list

Re: [Rd] NAMESPACE Q: does import as exist?

2006-02-08 Thread Romain Francois
ng the lines of what I was thinking. > >An unpleasant work around would be to create a translation package >that does something along the lines of Duncan M.'s suggestion, >importing, renaming, exporting. > > What about : bar <- pack::foo

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 Franco

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

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: > > Shie

[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 co

Re: [Rd] nchar( NA )

2010-06-18 Thread Romain Francois
ected 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 wrote: Hello, Is this expected ? nchar( c( "", NA ) ) [1] 0 2 Should not the second one be NA ? Romain -- Romain Franco

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

2010-07-09 Thread Romain Francois
ans parse(text = "a$$name") : '$' inattendu(e) dans "a$$" But you can define custom methods for $. setClass( "Foo", representation( n = "integer" ) ) setMethod( "$", "Foo", function(x, name ){ function( ) rnorm( x...@n

Re: [Rd] C or Java code generation

2010-08-20 Thread Romain Francois
lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://bit.ly/bzoWrs : Rcpp svn revision 2000 |- http://bit.ly/b8VNE2 : Rcpp at LondonR, oct 5th `- http://bit.ly/aAyra4 : hi

[Rd] list2env( list() )

2010-09-15 Thread Romain Francois
(x)).")); 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 `- ht

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

2010-09-22 Thread Romain Francois
quot;, ".Rcheck/Foo") >> > Error in library.dynam.unload("Foo", ".Rcheck/Foo") : >> > shared library 'Foo' was not loaded >> > >> > # using an absolute path works >> > >library.dynam.unload("Foo", &quo

Re: [Rd] SEXP and slots

2010-11-15 Thread Romain Francois
oal in mind, and this is too much information... Martin > > Thanks, Patrick > > [[alternative HTML version deleted]] > > __ > R-devel r-project.org <mailto:R-devel r-project.org> mailing

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_fun

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

2010-11-17 Thread Romain Francois
S4: setClass("Blabla", .) x<- new("Blabla") R5: MyRefObj<- setRefClass("Blabla", .) x<- MyRefObj$new(.) 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 ther

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

2010-11-17 Thread Romain Francois
issing( value ) ){ read.table( file ) } else{ write.table( value, file = file ) } } ) ) foo <- Foo$new( file="/tmp/iris.txt" ) foo$x <- iris foo$x write.table( subset( iris, Petal.Length < 2), file = "/

Re: [Rd] How to call R from C

2010-11-22 Thread Romain Francois
:Function class. require(inline) fx <- cxxfunction( , ' // grab the function Function rnorm("rnorm") ; // call it return rnorm(10, _["sd"] = 10) ; ' , plugin = "Rcpp" ) fx() Romain -- Romain Francois Professional

[Rd] faster base::sequence

2010-11-28 Thread Romain Francois
0) sequence(1:10) ) utilisateur système écoulé 0.119 0.000 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

Re: [Rd] faster base::sequence

2010-11-28 Thread Romain Francois
'm not really 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, Ba

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 exi

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

2010-12-04 Thread Romain Francois
ecause I was being > forced to compete with my own work, not a pleasant place to be. > > Are you telling me that you refuse to stop using my name > in Rcpp (except in copyright notices)? > > Are you telling me that you will continue to use my name and > update the associate

[Rd] embed Sweave driver in .Rnw file

2010-12-14 Thread Romain Francois
: > Sweave( "somefile.Rnw" ) the highlight driver is used instead of the default driver. Could something like 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 : highligh

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

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

2011-01-11 Thread Romain Francois
*envir = */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://rom

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

2011-05-07 Thread Romain Francois
instantiated from ‘T Rcpp::as(SEXPREC*) [with T = double*]’ /Library/Frameworks/R.framework/Versions/2.13/Resources/library/Rcpp/include/Rcpp/module/Module_generated_CppMethod.h:122: instantiated from ‘SEXPREC* Rcpp::CppMethod1::operator()(Class*, SEXPREC**) [with Class = Foo, U0 = double*]’ Fo

Re: [Rd] Recursively parsing srcrefs

2011-05-12 Thread Romain Francois
} That last display looks like a bug indeed. I'll take a look. The key seems to be a leading newline: parse(text = "\nx") parse(text = "x") Hadley -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr http://romain-

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

Re: [Rd] Interfacing a C++ class

2011-06-06 Thread Romain Francois
# create an instance f <- new( FOO, 2.0, 3.0 ) # call an R method f$reset() # call a C++ method f$move( 2.0, 2.0 ) # call an R method f$bla() Hope this helps. Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr http://romain-francois.com |-

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

2013-06-20 Thread Romain Francois
do I get the information in the float array 'a.array' in R? Is it even possible or should I rewrite 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 P

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

2013-09-19 Thread Romain Francois
Le 20 sept. 2013 à 02:31, Patrick Welche 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 versions o

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

2013-09-19 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 g

Re: [Rd] C++ debugging help needed

2013-10-02 Thread Romain Francois
- 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 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] C++ debugging help needed

2013-10-02 Thread Romain Francois
it otherwise uses an igraph namespace: /** Shape.h */ #ifndef SHAPE_H #define SHAPE_H #include #include "Color.h" #include "Ray.h" #include "Point.h" class Shape [] So the clash is due to two packages simulatenously failing

Re: [Rd] C++ debugging help needed

2013-10-02 Thread Romain Francois
lder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=/com.ibm.xlcpp8a.doc/language/ref/unnamed_namespaces.htm - If I really do have calls to the wrong destructor in there, how do I avoid this? Are you invoking the destructor explicitly? An object should know it's type, whi

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

2013-11-04 Thread Romain Francois
Romain, will you 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. R

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

2013-11-07 Thread Romain Francois
-- Gabriel Becker Graduate Student Statistics Department University of California, Davis -- Gabriel Becker Graduate Student Statistics Department University of California, Davis __ 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
e loop which will lead to disastrous performance. Romain Thanks again! George Vega Yon +56 9 7 647 2552 http://ggvega.cl 2013/11/7 Romain Francois : Hello, Any particular reason you're not using Rcpp? You would have access to nice abstraction instead of these MACROS all over th

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 c

[Rd] Linking to native routines in other packages

2013-11-16 Thread Romain Francois
p from another package, we are retrieving the function https://github.com/RcppCore/Rcpp/blob/master/src/Rcpp_init.cpp where the functions are registered with the RCPP_REGISTER macro. This way of using it moves all the logic to the package exposing its functions. I find this nicer to us

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 c

[Rd] serialization for external pointers

2013-11-16 Thread Romain Francois
sActive("fred", .GlobalEnv) [1] TRUE > > q("yes") get get romain@naxos /tmp $ R [..] > fred [1] 1 > bindingIsActive("fred", .GlobalEnv) [1] FALSE Is this possible ? Is there any other hook to handle seriali

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,

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

2013-12-06 Thread Romain Francois
ve to ask every 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://

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 Mü

[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 automat

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 co

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

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 changed

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

2014-03-30 Thread Romain Francois
Hi, My advice would be to use SystemRequirements: C++11 As 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 compilers will

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 prote

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 a écrit : > there is my code, expect return value is a data frame but R say it is list: > > SEXP Julia_R_MD_NA_DataFrame(jl_valu

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 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 looking to be adaopt

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

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

2013-02-01 Thread Romain Francois
r(raw)," printed in the traceback is responsible for the observed behavior. If it is expected behavior, how can I get 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:

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 a écrit : > Dear R-Developers, > > I just started learning how to use Rcpp. Earlier while using it, I > encountered an error as shown below: > > file74d8254b96d4.cpp: In function ‘

Re: [Rd] proposed changes to RSiteSearch

2009-05-07 Thread Romain Francois
ge, together with any attachme...{{dropped:12}} __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Romain Francois Independent R Consultant +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] proposed changes to RSiteSearch

2009-05-07 Thread Romain Francois
n't want to do it. I guess it would search gmane. MarkMail is also pretty good, as is http://tolstoy.newcastle.edu.au/R/ All these are much better than Namazu for searching the R-help list. Sorry I didn't make it clear: I meant something like the gmaneSearcg() that Roma

Re: [Rd] proposed changes to RSiteSearch

2009-05-08 Thread Romain Francois
inning (separate package) on the theory that it would be easier for me to make changes than if it were part of utils, but I don't know how this works. So, if someone can make a decision about how to proceed, I'll do what I can, as soon as I can. Jon -- Romain Francois Independen

Re: [Rd] proposed changes to RSiteSearch

2009-05-08 Thread Romain Francois
x27;bar', 1000 ) > rx <- "<(.*?)>(.*?)" > system.time( out <- strapply( txt, rx, c , perl = T ) ) user system elapsed 2.923 0.005 3.063 > system.time( out2 <- sapply( paste('\\', 1:3, sep=''), function(x){ + gsub(rx, x, txt, perl=T

Re: [Rd] proposed changes to RSiteSearch

2009-05-08 Thread Romain Francois
lippe Grosjean ) ) ) ) ) ( ( ( ( (Numerical Ecology of Aquatic Systems ) ) ) ) ) Mons-Hainaut University, Belgium ( ( ( ( ( ...... Romain Francois wrote: Jonathan Baron wrote: After reading all this, I favor doing one of two things: 1. Put all the search st

Re: [Rd] proposed changes to RSiteSearch

2009-05-08 Thread Romain Francois
, Belgium ( ( ( ( ( ...... Romain Francois wrote: strapply in package gsubfn brings elegance here: Don't! If you write functions to be used in a package to be included somehow in the base or recommended packages, then, your package should only depends on... base (preferably), or recomm

[Rd] package level connection API

2009-05-19 Thread Romain Francois
http://tolstoy.newcastle.edu.au/R/e2/devel/06/10/0565.html [2] http://wiki.r-project.org/rwiki/doku.php?id=developers:r_connections_api -- Romain Francois Independent R Consultant +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr __ R-devel@r-projec

Re: [Rd] [R] step by step debugger in R?

2009-05-23 Thread Romain Francois
[moving this to r-devel] Robert Gentleman wrote: Hi, Romain Francois wrote: Duncan Murdoch wrote: On 5/22/2009 10:59 AM, Michael wrote: Really I think if there is a Visual Studio strength debugger, our collective time spent in developing R code will be greatly reduced

Re: [Rd] [R] step by step debugger in R?

2009-05-24 Thread Romain Francois
Robert Gentleman wrote: Hi, I stripped the cc's as I believe that all read this list. Romain Francois wrote: [moving this to r-devel] Robert Gentleman wrote: Hi, Romain Francois wrote: Duncan Murdoch wrote: On 5/22/2009 10:59 AM, Michael

Re: [Rd] Can a function know what other function called it?

2009-05-24 Thread Romain Francois
ing from a particular line of a file with whatever code you like; this could be used in writing a nice source-level debugger. yes Duncan Murdoch best wishes Robert -- Romain Francois Independent R Consultant +33(0) 6 28 91 30 30 http://romainfrancois.bl

Re: [Rd] [R] step by step debugger in R?

2009-05-25 Thread Romain Francois
150 obs. of 5 variables: $ Sepal.Length: num 5.1 4.9 4.7 4.6 5 5.4 4.6 5 4.4 4.9 ... $ Sepal.Width : num 3.5 3 3.2 3.1 3.6 3.9 3.4 3.4 2.9 3.1 ... $ Petal.Length: num 1.4 1.4 1.3 1.5 1.4 1.7 1.4 1.5 1.4 1.5 ... $ Petal.Width : num 0.2 0.2 0.2 0.2 0.2 0.4 0.3 0.2 0.2 0.1 ... $ Species :

Re: [Rd] [R] step by step debugger in R?

2009-05-25 Thread Romain Francois
Simon Urbanek wrote: On May 25, 2009, at 4:54 PM, Romain Francois wrote: Simon Urbanek wrote: [snip] I need to read more about embedding R (as in section 8 of WRE). I know you can supply your own implementation of the REPL, but I am not sure this includes the one that goes on once

Re: [Rd] Can a function know what other function called it?

2009-05-26 Thread Romain Francois
Duncan Murdoch wrote: On 5/24/2009 10:23 AM, Romain Francois wrote: Duncan Murdoch wrote: On 23/05/2009 4:55 PM, Robert Gentleman wrote: Kynn Jones wrote: [snip] and you have a breakpoint in bar, you could not (easily) distinguish which of the two calls to bar was active. There is no

Re: [Rd] internal and external debugging [was: [R] step by step debugger in R?]

2009-05-28 Thread Romain Francois
eral) front-ends using these tools. best wishes Robert Romain [1] : http://www.r-project.org/soc09/ideas.html#p5 [2] : https://stat.ethz.ch/pipermail/r-devel/2009-April/053128.html [3] : http://cran.r-project.org/web/packages/debug/index.html [4]

[Rd] calling handlers within R_tryEval

2009-06-16 Thread Romain Francois
alue, R_GlobalEnv, R_BaseEnv, R_NilValue, R_NilValue); so I guess what I am trying to do is add "cend" and/or "handlerstack" to this context. Is this possible ? Are there examples of packages doing this ? Romain -- Romain Francois Independent R Consultant +

Re: [Rd] calling handlers within R_tryEval

2009-06-16 Thread Romain Francois
list yet to get done. luke On Tue, 16 Jun 2009, Romain Francois wrote: Hello, When using R_tryEval (from JRI in my case), is there a way to setup error recovery strategy and more generally calling handlers. From my reading of context.c, R_tryEval calls R_ToplevelExec which creates a context

[Rd] R_parseVector and syntax error [was: error messages while parsing with rniParse]

2009-06-18 Thread Romain Francois
t of the public api. Would it be possible to add yet another entry point to the parser that would basically wrap R_parseVector so that it would have an extra char* argument that would bring back the error message if there is an error? Romain Simon Urbanek wrote: On Jun 15, 2009, at 12:05 ,

Re: [Rd] R_parseVector and syntax error [was: error messages while parsing with rniParse]

2009-06-18 Thread Romain Francois
Duncan Murdoch wrote: Simon Urbanek wrote: On Jun 18, 2009, at 17:02 , Duncan Murdoch wrote: Romain Francois wrote: Hello, [I'm redirecting this here from stats-rosuda-devel] When parsing R code through R_parseVector and the code generates an error (syntax error), is there a w

Re: [Rd] R_parseVector and syntax error [was: error messages while parsing with rniParse]

2009-06-19 Thread Romain Francois
Duncan Murdoch wrote: Romain Francois wrote: Duncan Murdoch wrote: Simon Urbanek wrote: On Jun 18, 2009, at 17:02 , Duncan Murdoch wrote: Romain Francois wrote: Hello, [I'm redirecting this here from stats-rosuda-devel] When parsing R code through R_parseV

Re: [Rd] Robust, platform independent method to check for python

2009-06-27 Thread Romain Francois
Windows, though... Has anybody faced this problem before? Best regards, Carlos J. Gil Bellosta http://www.datanalytics.com -- Romain Francois Independent R Consultant +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr __ R-devel@r-project.org

[Rd] active bindings and ls.str

2009-06-29 Thread Romain Francois
ts this instead: > ls.str() xx : Although a better behaviour would be to show the binding function. Romain -- Romain Francois Independent R Consultant +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr Index: src/library/utils/R/str.R =

Re: [Rd] active bindings and ls.str

2009-06-30 Thread Romain Francois
On 06/30/2009 10:35 AM, Thomas Friedrichsmeier wrote: > On Monday 29 June 2009, Romain Francois wrote: > >> I'm attaching a patch that prints this instead: >> > ls.str() >> >> xx : >> >> Although a better behaviour would be to show the b

Re: [Rd] active bindings and ls.str

2009-06-30 Thread Romain Francois
On 06/30/2009 11:41 AM, Thomas Friedrichsmeier wrote: > Hi, > > On Tuesday 30 June 2009, Romain Francois wrote: > >> Not sure your trick is full-proof. What happens when the variable you >> copy is already an active binding ? >> > > see promises, bel

[Rd] progress bar

2009-06-30 Thread Romain Francois
s from the top-level). Romain -- Romain Francois Independent R Consultant +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] package post install instructions

2009-07-02 Thread Romain Francois
Hello, I've looked in tools:::.install_packages for some sort of hook that would let packages developers point to further instructions after a package is installed. For example, some packages need to setup environment variables, ... Is there something I have missed ? Romain -- R

Re: [Rd] package post install instructions

2009-07-03 Thread Romain Francois
A somewhat related question. Can one install a hook to be called when __any__ package is loaded. Something like this : setHook(packageEvent(".*", "onLoad"), function(...) grDevices::ps.options(horizontal=FALSE)) Romain On 07/02/2009 09:38 AM, Romain Francois w

Re: [Rd] Using svSocket with data.table

2009-07-25 Thread Romain Francois
those packages are great, I didn't find anything that worked in exactly this way i.e. i) R to R ii) CLI non-blocking and iii) no need to startup R in a special way Regards, Matthew -- Romain Francois Independent R Consultant +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://t

Re: [Rd] Wishlist: Navigate to "Index" page of help when no topic (PR#13872)

2009-08-04 Thread Romain Francois
E) or options(htmlhelp =3D FALSE) to revert. Again, what I've been trying to achieve. When a user loads a new library and doesn't yet know any function names, I think help(package =3D "newLibrary") or ?newLibrary:: should perform the above action whenever possible instea

[Rd] exec subdirectory of a package

2009-08-05 Thread Romain Francois
path( system.file( "exec", script, package = package ) ) if( !file.exists( scriptfile ) ){ stop( sprintf( "file not found: '%s' ", scriptfile ) ) } trail <- if( length(args) > 2 ) paste( tail( args, -2 ), sep = " " ) else "&

[Rd] options( "menu" )

2009-08-07 Thread Romain Francois
ect.list(choices, multiple=multiple, title=title) return(match(res, choices, nomatch = 0L)) } options( menu = default.menu ) ... or maybe this should be done at the select.list level Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free

Re: [Rd] exec subdirectory of a package

2009-08-07 Thread Romain Francois
Anyone ? I guess I'll have to make a package that ships the execute script Romain On 08/05/2009 11:32 AM, Romain Francois wrote: Hello, WRE contains the following information about the "exec" subdirectory of a package : "Subdirectory exec could contain additional exe

[Rd] more special completions

2009-08-21 Thread Romain Francois
used would be the .jnew function from rJava, where the first argument is a java class, associated with something that can complete java class names. Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/w33B : Completio

Re: [Rd] more special completions

2009-08-21 Thread Romain Francois
On 08/21/2009 06:59 PM, Deepayan Sarkar wrote: On 8/21/09, Romain Francois wrote: Hi, Would it be possible to add the capability for functions to register how they would like to complete themselves. Currently, there is the .addFunctionInfo, but it allows only functions to register a

[Rd] How to ship R scripts with R packages ?

2009-09-02 Thread Romain Francois
.. not so pretty. Meanwhile, "Writing R extensions" talks about the exec directory, but it is not clear if I can use it this way or how. Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/xHLs : R capable version

Re: [Rd] How to ship R scripts with R packages ?

2009-09-02 Thread Romain Francois
On 09/02/2009 01:13 PM, Duncan Murdoch wrote: Romain Francois wrote: Hello, (This is a remix of this previous thread: https://stat.ethz.ch/pipermail/r-devel/2009-August/054264.html , but with a concrete example) I am developing some packages that contain scripts (for Rscript) and would like

Re: [Rd] How to ship R scripts with R packages ?

2009-09-03 Thread Romain Francois
On 09/02/2009 01:13 PM, Duncan Murdoch wrote: Romain Francois wrote: Hello, (This is a remix of this previous thread: https://stat.ethz.ch/pipermail/r-devel/2009-August/054264.html , but with a concrete example) I am developing some packages that contain scripts (for Rscript) and would like

Re: [Rd] How to ship R scripts with R packages ?

2009-09-03 Thread Romain Francois
On 09/03/2009 02:46 PM, Duncan Murdoch wrote: On 03/09/2009 7:47 AM, Romain Francois wrote: On 09/02/2009 01:13 PM, Duncan Murdoch wrote: Romain Francois wrote: Hello, (This is a remix of this previous thread: https://stat.ethz.ch/pipermail/r-devel/2009-August/054264.html , but with a

[Rd] Rscript and default packages

2009-09-03 Thread Romain Francois
-- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/xMdt : update on the ant package |- http://tr.im/xHLs : R capable version of ant `- http://tr.im/xHiZ : Tip: get java home from R with rJava

Re: [Rd] Rscript and default packages

2009-09-03 Thread Romain Francois
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 the script is invoked with Rscript. I know about the --default-packages argument, but I was wondering

Re: [Rd] Load a package without installing it

2009-09-04 Thread Romain Francois
ce the definition of an S4 class and continue to manage objects created before the resourcing Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/xMdt : update on the ant package |- http://tr.im/xHLs : R capable version of

  1   2   3   >