Re: [Rd] Warnings created during R_eval or R_tryEval not shown before R ending or R error.

2023-04-29 Thread Laurent Gautier
Thanks Ivan. I did not know about ` .Internal(printDeferredWarnings())`. It does provide a solution for what I need. Best, Laurent Le mer. 26 avr. 2023 à 06:23, Ivan Krylov a écrit : > В Sun, 23 Apr 2023 13:33:16 -0400 > Laurent Gautier пишет: > > > When tracing what happens du

[Rd] Warnings created during R_eval or R_tryEval not shown before R ending or R error.

2023-04-23 Thread Laurent Gautier
Hi, I have an embedded R, with the evaluation of expressions happening over time during the lifespan of the process. I tried either `R_eval()` and `R_tryEval()` for the evaluation. The issue I have is that the processing of warnings does not happen until the process exits and/or R is shut down. E

Re: [Rd] Inconsistent behavior for the C AP's R_ParseVector() ?

2019-12-14 Thread Laurent Gautier
occur - any R API > call that does allocation (and parsing obviously does) can cause errors. > Note that this is true for pretty much all R API functions. > > Cheers, > Simon > > > > > On Dec 14, 2019, at 11:25 AM, Laurent Gautier > wrote: > > > > Le l

Re: [Rd] Inconsistent behavior for the C AP's R_ParseVector() ?

2019-12-14 Thread Laurent Gautier
Le lun. 9 déc. 2019 à 09:57, Tomas Kalibera a écrit : > On 12/9/19 2:54 PM, Laurent Gautier wrote: > > > > Le lun. 9 déc. 2019 à 05:43, Tomas Kalibera a > écrit : > >> On 12/7/19 10:32 PM, Laurent Gautier wrote: >> >> Thanks for the quick response Tomas. &

Re: [Rd] Inconsistent behavior for the C AP's R_ParseVector() ?

2019-12-09 Thread Laurent Gautier
Le lun. 9 déc. 2019 à 05:43, Tomas Kalibera a écrit : > On 12/7/19 10:32 PM, Laurent Gautier wrote: > > Thanks for the quick response Tomas. > > The same error is indeed happening when trying to have a zero-length > variable name in an environment. The surprising bit is

Re: [Rd] Inconsistent behavior for the C AP's R_ParseVector() ?

2019-12-07 Thread Laurent Gautier
t; I don't think the problem you observed could be related to the memory > leak. The leak is on the heap, not stack. > > Zero-length names of elements in a list are allowed. They are not the > same thing as zero-length variables in an environment. If you try to > convert &qu

Re: [Rd] Inconsistent behavior for the C AP's R_ParseVector() ?

2019-11-30 Thread Laurent Gautier
ero-length variable name ``` Should the parser be made to accept as valid what is otherwise possible when using `[[<` ? Best, Laurent Le sam. 30 nov. 2019 à 17:33, Laurent Gautier a écrit : > I found the following code comment in `src/main/gram.c`: > > ``` > > /* Mem

Re: [Rd] Inconsistent behavior for the C AP's R_ParseVector() ?

2019-11-30 Thread Laurent Gautier
be related to be issue ? Le sam. 30 nov. 2019 à 14:04, Laurent Gautier a écrit : > Hi, > > The behavior of > ``` > SEXP R_ParseVector(SEXP, int, ParseStatus *, SEXP); > ``` > defined in `src/include/R_ext/Parse.h` appears to be inconsistent > depending on the string to

[Rd] Inconsistent behavior for the C AP's R_ParseVector() ?

2019-11-30 Thread Laurent Gautier
Hi, The behavior of ``` SEXP R_ParseVector(SEXP, int, ParseStatus *, SEXP); ``` defined in `src/include/R_ext/Parse.h` appears to be inconsistent depending on the string to be parsed. Trying to parse a string such as `"list(''=1+"` sets the `ParseStatus` to incomplete parsing error but trying to

Re: [Rd] Error: package or namespace load failed for ‘utils

2019-09-21 Thread Laurent Gautier
écrit : > >>>>> Laurent Gautier > >>>>> on Sun, 15 Sep 2019 15:01:09 -0400 writes: > > > In case a search engine leads someone with the same issue > > here, I am documenting the point I reached: > > > I can reproduce the issue with

Re: [Rd] Error: package or namespace load failed for ‘utils

2019-09-15 Thread Laurent Gautier
In case a search engine leads someone with the same issue here, I am documenting the point I reached: I can reproduce the issue with a small example when forcing R to not load any package at startup time (using an Renviron file): ``` package <- "utils" lib.loc <- "" ns <- loadNamespace(package, li

Re: [Rd] Error: package or namespace load failed for ‘utils

2019-09-08 Thread Laurent Gautier
ods*will reduce >> the start-up time by a factor of up to two. But it can also be used to >> customize R, e.g. for class use. Rscript also checks the environment >> variable R_SCRIPT_DEFAULT_PACKAGES; if set, this takes precedence over >> R_DEFAULT_PACKAGES. >> Bill Dunlap

Re: [Rd] Error: package or namespace load failed for ‘utils

2019-09-08 Thread Laurent Gautier
ed to > customize R, e.g. for class use. Rscript also checks the environment > variable R_SCRIPT_DEFAULT_PACKAGES; if set, this takes precedence over > R_DEFAULT_PACKAGES. > Bill Dunlap > TIBCO Software > wdunlap tibco.com > > > On Sun, Sep 8, 2019 at 8:42 AM Laur

[Rd] Error: package or namespace load failed for ‘utils

2019-09-08 Thread Laurent Gautier
Hi, When starting an embedded R I encounter the following issue under certain conditions: ``` Error: package or namespace load failed for ‘utils’ in if (.identC(class1, class2) || .identC(class2, "ANY")) TRUE else {: missing value where TRUE/FALSE needed ``` (more such errors for grDevices, grap

Re: [Rd] [External] Missing function Rf_findFun3

2019-09-08 Thread Laurent Gautier
I am not using the C API from a package but with an embedded R. Why have it declared in the include/ if it cannot be accessed then? Best, Laurent On Sun, Sep 8, 2019, 8:27 AM Tierney, Luke wrote: > On Sat, 7 Sep 2019, Laurent Gautier wrote: > > > Hi, > > > > > >

[Rd] Missing function Rf_findFun3

2019-09-07 Thread Laurent Gautier
Hi, The function `Rf_findFun3` is declared in `$(R CMD CONFIG HOME)/lib/R/include/Rinternals.h` but appears to be missing from R's shared library (R.so). Is this an oversight? Best, Laurent [[alternative HTML version deleted]] __ R-devel@r-

Re: [Rd] Warning when calling formals() for `[`.

2018-10-07 Thread Laurent Gautier
ULL > >> get("[") > > .Primitive("[") > >> get("+") > > function (e1, e2) .Primitive("+") > > > > The other index operators, "[[", "[<-", "[[<-" are similar > &g

Re: [Rd] Warning when calling formals() for `[`.

2018-10-06 Thread Laurent Gautier
; NULL > Warning message: > In formals(fun) : argument is not a function > > > Hope this helps, > > Rui Barradas > > > Às 18:26 de 06/10/2018, Laurent Gautier escreveu: > > Hi, > > > > A short code example showing the warning might the only thing needed &g

[Rd] Warning when calling formals() for `[`.

2018-10-06 Thread Laurent Gautier
Hi, A short code example showing the warning might the only thing needed here: ``` > formals(args(`[`)) NULL *Warning message:In formals(fun) : argument is not a function* > is.function(`[`) [1] TRUE > is.primitive(`[`) [1] TRUE ``` Now with an other primitive: ``` > formals(args(`sum`)) $...

Re: [Rd] Definition of uintptr_t in Rinterface.h

2017-01-01 Thread Laurent Gautier
doing much to prevent it. 2017-01-01 19:42 GMT-05:00 Simon Urbanek : > > > On Jan 1, 2017, at 5:12 PM, Laurent Gautier wrote: > > > > > > > > 2017-01-01 8:28 GMT-05:00 Prof Brian Ripley : > > On 29/12/2016 15:55, Simon Urbanek wrote: > > The problem

Re: [Rd] Definition of uintptr_t in Rinterface.h

2017-01-01 Thread Laurent Gautier
u comply, there will not be a conflict. > > Also note that is only an issue if CSTACK_DEFNS is defined, not the > default and not mentioned here. > > > > > Thanks, >> Simon >> >> >> >> On Dec 26, 2016, at 11:25 PM, Laurent Gautier wrote: &

Re: [Rd] Definition of uintptr_t in Rinterface.h

2016-12-29 Thread Laurent Gautier
Thanks, > Simon > > > > > On Dec 26, 2016, at 11:25 PM, Laurent Gautier > wrote: > > > > Hi, > > > > I was recently pointed out that a definition in Rinterface.h can be > conflicting > > with a definition in stdint.h: > > > > /

[Rd] Definition of uintptr_t in Rinterface.h

2016-12-26 Thread Laurent Gautier
Hi, I was recently pointed out that a definition in Rinterface.h can be conflicting with a definition in stdint.h: /usr/include/R/Rinterface.h has: typedef unsigned long uintptr_t; /usr/include/stdint.h has: typedef unsigned int uintptr_t; (when 32bit platform complete definition is: #if __W

[Rd] C-API: Reporting syntax errors when calling R_ParseVector()

2015-08-29 Thread Laurent Gautier
Hi, The C-API is exposing the function R_ParseVector (defined in the header file `include/R_exts/Parse.h`), but it still appears impossible to retrieve errors about syntax errors. I found earlier reports of the issue, but could not find solutions: - 2007: https://bugs.r-project.org/bugzilla/show_

Re: [Rd] C-API: check whether R has been initialized ?

2015-05-04 Thread Laurent Gautier
On May 4, 2015 12:06 AM, "Simon Urbanek" wrote: > > Laurent, > > On May 3, 2015, at 8:07 PM, Laurent Gautier wrote: > > > rPython appears to provide an interface from R to Python by embedding > > Python and I'd think that it can safely assume that R has

Re: [Rd] C-API: check whether R has been initialized ?

2015-05-03 Thread Laurent Gautier
n the life of the process R was initialized. 2015-05-03 19:48 GMT-04:00 Duncan Murdoch : > On 03/05/2015 7:02 PM, Laurent Gautier wrote: > > Beside the possible argumentation that with an API elegance and > > convenience might sometimes be superior to necessity, the suggested > &g

Re: [Rd] C-API: check whether R has been initialized ?

2015-05-03 Thread Laurent Gautier
s: ``` $ R -q > library('rPython'); python.exec('import rpy2.robjects') R is already initialized ``` https://bitbucket.org/rpy2/rpy2/issue/278/r-in-python-via-rpy2-in-r-via-rpython#comment-17843761 2015-05-03 18:12 GMT-04:00 Duncan Murdoch : > On 03/05/2015 4:

[Rd] C-API: check whether R has been initialized ?

2015-05-03 Thread Laurent Gautier
Hi, There appear to be no way to check whether R has already been initialized. Could a function like "Rf_isinitialized" be added to the API ? Best, Laurent [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://

Re: [Rd] C-API: removing key-value pairs in an environment

2014-07-15 Thread Laurent Gautier
art of the C API, and you need to call back to R. Here is how Rcpp does it: https://github.com/RcppCore/Rcpp/blob/e2fcecad4533301d12e1ba19e94ab9f0fa3eb423/inst/include/Rcpp/Environment.h#L194 Best, Gabor On Tue, Jul 15, 2014 at 10:24 PM, Laurent Gautier wrote: Hi, I am trying to remove key-value p

[Rd] C-API: removing key-value pairs in an environment

2014-07-15 Thread Laurent Gautier
Hi, I am trying to remove key-value pairs from an environments (using C). While adding seems straightforward with `Rf_defineVar()`, I cannot find a function to remove objects from a given environment. Would anyone know if there is such a function ? Best, Laurent _

[Rd] RFC: R_data_class as part of the C-API

2013-04-26 Thread Laurent Gautier
Hi, In src/attrib.c, the comment for the function R_data_class is: ``` /* the S4-style class: for dispatch required to be a single string; for the new class() function; if(!singleString) , keeps S3-style multiple classes. Called from the methods package, so exposed. */ SEXP R_data_clas

Re: [Rd] Mirroring R on a DVCS

2013-03-24 Thread Laurent Gautier
> won't go upstream to the main SVN repository, and that's probably why > there aren't very many forks of the Github repo. > > -Winston > > > On Sat, Mar 16, 2013 at 1:44 PM, Laurent Gautier <mailto:lgaut...@gmail.com>> wrote: > > Thanks. I

Re: [Rd] Mirroring R on a DVCS

2013-03-16 Thread Laurent Gautier
Thanks. I missed it, I guess. I am surprised by the relatively low number of forks... L. On 2013-03-16 11:28, Peter Meilstrup wrote: > There is already a mirror on GitHub at https://github.com/wch/r-source . > > Peter > > On Mar 16, 2013, at 11:17, Laurent Gautier <mailto:

[Rd] Mirroring R on a DVCS

2013-03-16 Thread Laurent Gautier
Hi, I have been looking at mirroring the SVN R repository into a DVCS (Mercurial, Git, bzr, etc...). The idea would be to have that as an always up-to-date untouched master (a mirror) but having it in a DVCS would make forks easier to make and maintain, and possibly ease up the process of ha

Re: [Rd] Printing warning messages around R_tryEval

2013-03-07 Thread Laurent Gautier
We are having a similar issue with rpy2 and R-devel. I would also vote for having back a C-level solution to the problem. I cannot find an explicit explanation for the change in the SVN logs, and traced the change to rev 61771:

Re: [Rd] Bug: C-level and _set_rl_word_breaks

2013-02-03 Thread Laurent Gautier
On 2013-01-31 21:52, Laurent Gautier wrote: On 2013-01-31 21:09, Duncan Murdoch wrote: On 13-01-30 9:48 PM, Laurent Gautier wrote: Hi, I filed a bug report in the tracker (id #15169) a short while ago, along with a patch, but I came back to it to see that there is relatively little movement

Re: [Rd] Bug: C-level and _set_rl_word_breaks

2013-01-31 Thread Laurent Gautier
On 2013-01-31 21:09, Duncan Murdoch wrote: On 13-01-30 9:48 PM, Laurent Gautier wrote: Hi, I filed a bug report in the tracker (id #15169) a short while ago, along with a patch, but I came back to it to see that there is relatively little movement or participation on the tracker so I thought

[Rd] Bug: C-level and _set_rl_word_breaks

2013-01-30 Thread Laurent Gautier
Hi, I filed a bug report in the tracker (id #15169) a short while ago, along with a patch, but I came back to it to see that there is relatively little movement or participation on the tracker so I thought I'd pitch it here (patch attached). The function `set_rl_word_breaks` in src/unix/sys-std.

Re: [Rd] Bounty on Error Checking

2013-01-04 Thread Laurent Gautier
On 2013-01-04 12:00, r-devel-requ...@r-project.org wrote: Message: 16 Date: Thu, 3 Jan 2013 22:52:44 + From: Ben Bolker To: Subject: Re: [Rd] Bounty on Error Checking Message-ID: Content-Type: text/plain; charset="us-ascii" ivo welch anderson.ucla.edu> writes: > >Dear R developers---I

[Rd] documentation for legend(): possible missing info for pch.

2012-12-07 Thread Laurent Gautier
In the documentation for graphics::legend(), the entry for "pch" is: > pch: the plotting symbols appearing in the legend, either as vector of 1-character strings, or one (multi character) string. _Must_ be specified for symbol drawing. If I did not misread them, exampl

Re: [Rd] Spurious warning when calling data() ?

2012-10-23 Thread Laurent Gautier
On 2012-10-23 21:43, Duncan Murdoch wrote: On 23/10/2012 3:20 PM, Laurent Gautier wrote: Hi, When calling data, a warning seems to have been left behind > data(package="stats", verbose=FALSE) Warning message: In data(package = "stats", verbose = FALSE) : datase

[Rd] Spurious warning when calling data() ?

2012-10-23 Thread Laurent Gautier
Hi, When calling data, a warning seems to have been left behind data(package="stats", verbose=FALSE) Warning message: In data(package = "stats", verbose = FALSE) : datasets have been moved from package 'stats' to package 'datasets' (full version details further below). Best, Laurent ses

Re: [Rd] Package "datasets" not exporting anything on a recent R-2.15.1-patched

2012-08-27 Thread Laurent Gautier
On 2012-08-27 11:32, Uwe Ligges wrote: On 26.08.2012 20:01, Laurent Gautier wrote: On 2012-08-26 19:27, Prof Brian Ripley wrote: On 26/08/2012 18:20, Laurent Gautier wrote: On 2012-08-26 19:03, Prof Brian Ripley wrote: On 26/08/2012 17:25, Laurent Gautier wrote: Hi, I just stumbled on

Re: [Rd] Package "datasets" not exporting anything on a recent R-2.15.1-patched

2012-08-26 Thread Laurent Gautier
On 2012-08-26 19:27, Prof Brian Ripley wrote: On 26/08/2012 18:20, Laurent Gautier wrote: On 2012-08-26 19:03, Prof Brian Ripley wrote: On 26/08/2012 17:25, Laurent Gautier wrote: Hi, I just stumbled on the following apparent oddity: the package "datasets" does not appear

Re: [Rd] Package "datasets" not exporting anything on a recent R-2.15.1-patched

2012-08-26 Thread Laurent Gautier
On 2012-08-26 19:03, Prof Brian Ripley wrote: On 26/08/2012 17:25, Laurent Gautier wrote: Hi, I just stumbled on the following apparent oddity: the package "datasets" does not appear to export anything out of its namespace: > ns_datasets <- getNamespace('datasets

Re: [Rd] Package "datasets" not exporting anything on a recent R-2.15.1-patched

2012-08-26 Thread Laurent Gautier
On 2012-08-26 18:32, Dirk Eddelbuettel wrote: On 26 August 2012 at 18:25, Laurent Gautier wrote: | Hi, | | I just stumbled on the following apparent oddity: the package "datasets" | does not appear to export anything out of its namespace: | | > ns_datasets <- getNam

[Rd] Package "datasets" not exporting anything on a recent R-2.15.1-patched

2012-08-26 Thread Laurent Gautier
Hi, I just stumbled on the following apparent oddity: the package "datasets" does not appear to export anything out of its namespace: > ns_datasets <- getNamespace('datasets') > getNamespaceExports(ns_datasets) character(0) Not the case with other packages (example here with "utils"): > ns_ut

Re: [Rd] Rserve graphics output [Was: R-devel Digest, Vol 90, Issue 20]

2010-08-22 Thread Laurent Gautier
On 22/08/10 17:55, Simon Urbanek wrote: On Aug 22, 2010, at 3:32 AM, Laurent wrote: On 21/08/10 23:31, Simon Urbanek wrote: On Aug 21, 2010, at 8:46 AM, Laurent wrote: On 21/08/10 12:00, r-devel-requ...@r-project.org wrote: On Aug 20, 2010, at 1:59 PM, Matt Shotw

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

2010-01-14 Thread Laurent Gautier
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: there is probably no hurry to do so. rpy2 is a

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

2010-01-14 Thread Laurent Gautier
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: there is probably no hurry to do so. rpy2 is also having CLOSXP, BUILTINSXP, and SPECIALSXP represented as one function-like class and seems to be beha

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

2010-01-02 Thread Laurent Gautier
On 1/2/10 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 wrote

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

2010-01-02 Thread Laurent Gautier
On 1/2/10 8:28 PM, Simon Urbanek wrote: On Jan 2, 2010, at 12:17 PM, Laurent Gautier wrote: On 1/2/10 5:56 PM, Duncan Murdoch wrote: On 02/01/2010 11:36 AM, Laurent Gautier wrote: [Disclaimer: what is below reflects my understanding from reading the R source, others will correct where

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

2010-01-02 Thread Laurent Gautier
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 wrote: On 02/01/2010 11:36 AM, Laurent Gautier wrote: [Disclaimer: what is below reflects my understanding from reading the R source, others

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

2010-01-02 Thread Laurent Gautier
On 1/2/10 5:50 PM, Romain Francois wrote: Thanks. On 01/02/2010 05:36 PM, Laurent Gautier wrote: [Disclaimer: what is below reflects my understanding from reading the R source, others will correct where deemed necessary] On 1/2/10 12:00 PM, r-devel-requ...@r-project.org wrote: (...) In

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

2010-01-02 Thread Laurent Gautier
On 1/2/10 5:56 PM, Duncan Murdoch wrote: On 02/01/2010 11:36 AM, Laurent Gautier wrote: [Disclaimer: what is below reflects my understanding from reading the R source, others will correct where deemed necessary] On 1/2/10 12:00 PM, r-devel-requ...@r-project.org wrote: (...) I'd al

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

2010-01-02 Thread Laurent Gautier
[Disclaimer: what is below reflects my understanding from reading the R source, others will correct where deemed necessary] On 1/2/10 12:00 PM, r-devel-requ...@r-project.org wrote: Hello, We are currently making lots of changes to Rcpp (see the open Rcpp mailing list if interested [1] in the

Re: [Rd] raster support in graphics devices

2009-12-06 Thread Laurent Gautier
I can confirm. Last time I checked (that is recently), there was no way to do it at the C level (beside possibly extreme hacks trying to work around what R does not want to expose, or go for patched source trees and builds). What is the status of this patch (accepted ? rejected ? else ?) Thi

Re: [Rd] :Re: PROTECT and OCaml GC.

2009-11-30 Thread Laurent Gautier
Guillaume Yziquel wrote: Laurent Gautier a écrit : Anonymous R objects, that is without an associated symbol in R, can be passed to functions (and in that way makes a binding "take hold of R objects without using symbols"). For example, building R code made of anonymous obje

Re: [Rd] :Re: PROTECT and OCaml GC.

2009-11-30 Thread Laurent Gautier
Guillaume Yziquel wrote: Laurent Gautier a écrit : It does not have to be a functional language. To see it in use within a some-language-to-R bridge, you can check the source in JRI, rpy2. I can mostly speak for rpy2, and the way it is done there relies on both R and Python's GC. Creat

[Rd] :Re: PROTECT and OCaml GC.

2009-11-30 Thread Laurent Gautier
On Nov 28, 2009, at 7:50 PM, Guillaume Yziquel wrote: FWIW what I think you should be really looking at is R_PreserveObject/R_ReleaseObject. OK. Thanks. I would suggest looking at the many other R embeddings in other languages that already exist since I don't think you approach is very viable

Re: [Rd] Issue when calling deparse(substitute(x)) from C with "anonymous" R vectors ?

2009-11-19 Thread Laurent Gautier
imple answer is: don't do that. It is unclear what is a reasonable label to give in such a case: maybe simply 'x' and 'y'? On Thu, 19 Nov 2009, Laurent Gautier wrote: Dear list, When calling R from C, what appears like a spurious error can be triggered during the executi

[Rd] Issue when calling deparse(substitute(x)) from C with "anonymous" R vectors ?

2009-11-18 Thread Laurent Gautier
Dear list, When calling R from C, what appears like a spurious error can be triggered during the execution of chisq.test(x, y). This is happening when the following conditions are met: - x and y are "anonymous" C-level R vectors (they do not have a symbol), but they are protected from garbag

Re: [Rd] Suggestion: Dimension-sensitive attributes

2009-07-09 Thread Laurent Gautier
be fewer. * `dim<-`, but this may raise the same problem of coercing dimmeta of different classes. Disabling "dim<-" is, I think, choosing sanity for now. ...and I agree with the rest of your comments. Same for me (about your comments). This thread seems to be leading to som

Re: [Rd] Suggestion: Dimension-sensitive attributes

2009-07-09 Thread Laurent Gautier
case can already be modelled by a data.frame. L. Enrique -Original Message- From: Laurent Gautier [mailto:lgaut...@gmail.com] Sent: jueves, 09 de julio de 2009 14:15 Cc: Heinz Tuechler; Bengoechea Bartolomé Enrique (SIES 73); Tony Plate; Henrik Bengtsson; r-devel@r-project.org Subject:

Re: [Rd] Suggestion: Dimension-sensitive attributes

2009-07-09 Thread Laurent Gautier
Starting by working on an interface for such object(s) is probably the first step toward a unified solution, and this before about if and how R attributes are used. It would also help to ensure a smooth transition from the existing classes implementing a similar solution (first the interface i

Re: [Rd] In C, a fast way to slice a vector?

2009-05-12 Thread Laurent Gautier
r-devel-requ...@r-project.org wrote: Impressive stuff. Nice to see people giving some though to this. I will explore the packages you mentioned. Thank you Saptarshi Guha On Mon, May 11, 2009 at 12:37 AM, Patrick Aboyoun wrote: Saptarshi, I know of two alternatives you can use to do fast

Re: [Rd] Follow-up on the wish for a visibility flag with tryEval ?

2009-03-08 Thread Laurent Gautier
h wrote: On 07/03/2009 9:51 AM, Laurent Gautier wrote: Dear list, Did the wish for an official API for evaluating expressions while keeping an eye on the R_Visible flag (see: https://stat.ethz.ch/pipermail/r-devel/2007-April/045258.html ) lead to something ? I could not find a sign of it the c

[Rd] Follow-up on the wish for a visibility flag with tryEval ?

2009-03-07 Thread Laurent Gautier
Dear list, Did the wish for an official API for evaluating expressions while keeping an eye on the R_Visible flag (see: https://stat.ethz.ch/pipermail/r-devel/2007-April/045258.html ) lead to something ? I could not find a sign of it the current (R-2.8.1 and R-2.9-dev) R defines. Thanks, L

[Rd] Sending an interrupt signal to an embedded R

2009-01-09 Thread Laurent Gautier
Dear List, I am working on a Python-R interface in which an embedded R is used (rpy project on sourceforge). I would like to allow the interruption of R computation through signals, that is handle signals sent to the embedded R process while computing, but I am unsure regarding what is current

Re: [Rd] unrelated software install triggering an error from R's install script on Mac OS X 10.5

2008-12-01 Thread Laurent Gautier
Simon Urbanek wrote: On Dec 1, 2008, at 6:11 AM, Laurent Gautier wrote: Stefan Evert wrote: The steps needed to generate the error are: - install a binary distribution of R (default location) - add R to the PATH Did you actually add /Library/Frameworks/R.framework/Resources/bin/ to your

Re: [Rd] unrelated software install triggering an error from R's install script on Mac OS X 10.5

2008-11-30 Thread Laurent Gautier
Stefan Evert wrote: The steps needed to generate the error are: - install a binary distribution of R (default location) - add R to the PATH Did you actually add /Library/Frameworks/R.framework/Resources/bin/ to your PATH? You're not supposed to do that! What made you think so? Comi

[Rd] unrelated software install triggering an error from R's install script on Mac OS X 10.5

2008-11-29 Thread Laurent Gautier
Dear List, I am having a problem triggered by having R-2.8 (R version 2.8.0 Patched (2008-11-15 r46953)) installed on Mac OS X 10.5. The steps needed to generate the error are: - install a binary distribution of R (default location) - add R to the PATH - install the python module pycairo (h

[Rd] cairo device and pch="+"

2008-07-28 Thread Laurent Gautier
Dear list, I have spotted what could be a memory leak somewhere. The example below shows how to quickly use up RAM on a linux machine (the example is taylored for a 2Gb machine, change the size of the matrix m is needed). # --- m <- matrix(rnorm(130), nrow=6000, 6) X11(type="cairo") pairs(m) #

Re: [Rd] garbage collection, "preserved" variables, and different outcome depending on "--verbose" or not

2008-07-21 Thread Laurent Gautier
I just tried with R-devel (2.8.0 Under development (unstable) (2008-07-20 r46088), the problem does not appear with that version. Thanks, L. 2008/7/20 Laurent Gautier <[EMAIL PROTECTED]>: > 2008/7/20 Duncan Murdoch <[EMAIL PROTECTED]>: >> On 20/07/2008 10:02 AM,

Re: [Rd] garbage collection, "preserved" variables, and different outcome depending on "--verbose" or not

2008-07-20 Thread Laurent Gautier
2008/7/20 Duncan Murdoch <[EMAIL PROTECTED]>: > On 20/07/2008 10:02 AM, Laurent Gautier wrote: >> >> I tripped on that while crafting the example. >> >> The problem still exists when moving the "releases" in the middle, >> and removing the last &q

Re: [Rd] garbage collection, "preserved" variables, and different outcome depending on "--verbose" or not

2008-07-20 Thread Laurent Gautier
- make call "list(x)" * 3- return "x" to R */ SEXP x_R; int i; int n = INTEGER(n_R)[0]; /* Create a numerical vector "x_R" */ for (i=0; i: > On 20/07/2008 9:01 AM, Laurent Gautier wrote: >> >> Dear list, >> >> While trying

[Rd] garbage collection, "preserved" variables, and different outcome depending on "--verbose" or not

2008-07-20 Thread Laurent Gautier
Dear list, While trying to identify the root of a problem I am having with garbage collected variables, I have come across the following oddity: depending on whether --verbose is set or not, I obtain different results. I have made a small standalone example to demonstrate it. The example is very

Re: [Rd] Embedded R, last errormessage, and stack smashing

2008-07-16 Thread Laurent Gautier
2008/7/16 Jeffrey Horner <[EMAIL PROTECTED]>: > Laurent Gautier wrote on 07/16/2008 08:02 AM: >> >> The only way to overcome the problem I can find is to tweak the >> R_CStackLimit with: >> >> R_CStackLimit = (uintptr_t) -1; >> >> The question I a

Re: [Rd] Embedded R, last errormessage, and stack smashing

2008-07-16 Thread Laurent Gautier
very sure of how an appropriate value can be determined. I looked around, and the JRI (Java/R Interface) is just disabling stack checking for example. Thanks, Laurent 2008/6/30 Laurent Gautier <[EMAIL PROTECTED]>: > Dear list, > > I am having an embedded R, dying with >

[Rd] Embedded R, last errormessage, and stack smashing

2008-06-30 Thread Laurent Gautier
Dear list, I am having an embedded R, dying with *** stack smashing detected *** in one specific case. My code is such as I evaluate R expression with C code like res = R_tryEval(expr, env, &error); and in case of error, get the error message (usually sucessfully) with code like below: SEXP ge

Re: [Rd] Error in "getClass" when calling the function "show"

2008-06-10 Thread Laurent Gautier
2008/6/10 Prof Brian Ripley <[EMAIL PROTECTED]>: > On Tue, 10 Jun 2008, Laurent Gautier wrote: > >> 2008/6/10 Prof Brian Ripley <[EMAIL PROTECTED]>: >>> >>> showDefault has >>> >>> clDef <- getClass(class(object)) >>> >&g

Re: [Rd] Error in "getClass" when calling the function "show"

2008-06-10 Thread Laurent Gautier
re" object="traceable" > showMethods("print") Function "print": > getMethod("show", "ANY") Method Definition (Class "derivedDefaultMethod"): function (object) showDefault(object, FALSE) Signatures: object target

[Rd] Error in "getClass" when calling the function "show"

2008-06-09 Thread Laurent Gautier
Dear List, Calling "show" on an object of class "summary.lm" gives: Error in getClass(class(object)) : "summary.lm" is not a defined class Is this a miss on my end ? > x <- seq(1, 10) > show(x) [1] 1 2 3 4 5 6 7 8 9 10 > y <- runif(10) > fit <- lm(y ~ x) > show(fit) Call: lm(formula

Re: [Rd] Makevars or congiure for multi platforms

2008-06-08 Thread Laurent Gautier
2008/6/7 <[EMAIL PROTECTED]>: > > Message: 11 > Date: Sat, 7 Jun 2008 03:38:23 +0900 > From: "Tadashi Kadowaki" <[EMAIL PROTECTED]> > Subject: [Rd] Makevars or congiure for multi platforms > To: r-devel@r-project.org > Message-ID: ><[EMAIL PROTECTED]> > Content-Type: text/plain; charset=IS

[Rd] value returned by findFun when the name cannot be found.

2008-05-24 Thread Laurent Gautier
Dear list, I have been using "findVar" (defined in src/main/envir.c) happily and would like to use "findFun". However I have trouble when the name searched cannot be found: while "findVar" returns R_UnboundValue, "findFun" does not (the 4 last lines of "findFun" are copied below). error(_("c

Re: [Rd] Experimental R_has_slot() utility

2008-03-15 Thread Laurent Gautier
2008/3/16, Martin Maechler <[EMAIL PROTECTED]>: > >>>>> "LG" == Laurent Gautier <[EMAIL PROTECTED]> > >>>>> on Sat, 15 Mar 2008 16:24:26 +0800 writes: > > LG> Dear list, The utility "R_has_slot" ment

[Rd] Experimental R_has_slot() utility

2008-03-15 Thread Laurent Gautier
Dear list, The utility "R_has_slot" mentioned in the file NEWS ("Experimental R_has_slot() utility supplementing R_do_slot()") appears to be missing from a fresh checkout of the development branch. $ svn up At revision 44759. $ grep -i has_slot `find include -name '*.h'` $ grep -i _slot `find i

Re: [Rd] Subsetting vectors/arrays using factors can be seen as misleading

2008-03-14 Thread Laurent Gautier
)[x] as in > as.character.factor() -- that construction is widespread, perhaps so > widespread as to make it worthwhile making that an internal operation. > > > On Thu, 13 Mar 2008, Laurent Gautier wrote: > > > Dear list, > > > > Subsetting vectors/array

[Rd] Subsetting vectors/arrays using factors can be seen as misleading

2008-03-12 Thread Laurent Gautier
Dear list, Subsetting vectors/arrays using factors can be seen as misleading, and I was thinking that it could be discouraged (at least by issuing a warning). I could not find whether this was discussed earlier, but I can be pointed to a reference if I missed any. The "extract" operator "[" can t

Re: [Rd] extract function "[" and empty index

2008-03-09 Thread Laurent Gautier
Thanks, I was forgetting the recycling rule. L. 2008/3/9, Gabor Grothendieck <[EMAIL PROTECTED]>: > Use TRUE. > > > On Sun, Mar 9, 2008 at 5:05 AM, Laurent Gautier <[EMAIL PROTECTED]> wrote: > > Dear list, > > > > I am having a question regarding t

[Rd] extract function "[" and empty index

2008-03-09 Thread Laurent Gautier
Dear list, I am having a question regarding the extract function "[". The man page says that one usage with k-dimensional arrays is to specify k indices to "[", with an empty index indicating that all entries in that dimension are selected. The question is the following: is there an R object qua

Re: [Rd] level of mutability for the type of a SEXP

2008-02-23 Thread Laurent Gautier
2008/2/22, Prof Brian Ripley <[EMAIL PROTECTED]>: > On Tue, 19 Feb 2008, Laurent Gautier wrote: > > > Dear list, > > > > I am writing C code to interface with R, and I would like to know the > > level of mutability for the type of a SEXP. > > >

Re: [Rd] Calling R_PreserveObject from embedded R

2008-02-23 Thread Laurent Gautier
> Hello. This is my first post to the list, so first I'd like to thank > everybody for making and mantaining such a great product as R. > I'm writting a native binding to R from Dolphin Smalltalk. I've followed up > the examples of the documentation showing how to run R embedded, and I got > i

[Rd] level of mutability for the type of a SEXP

2008-02-19 Thread Laurent Gautier
Dear list, I am writing C code to interface with R, and I would like to know the level of mutability for the type of a SEXP. I see that there is a macro/function TYPEOF(), and that it can be used as an l-value, as well as a macro/function SET_TYPEOF(). My question is "should the type be consider

Re: [Rd] Strict-prototypes definitions in R includes

2008-01-28 Thread Laurent Gautier
e function is used for >variable sets of arguments (e.g, in GraphicsDevice.h). > - in others the omission is because it seemed safer to leave the >prototype out than to get it wrong (when passing functions, for >example). > - some code is taken from other projects and still h

[Rd] Strict-prototypes definitions in R includes

2008-01-27 Thread Laurent Gautier
Dear list, Whenever the flag "-Wstrict-prototypes" is set in gcc, compiling code that includes headers in lib/R/include generates often warnings (example with R-2.6.1: Rinternals.h:560: warning: function declaration isn't a prototype ). All such warnings I looked at were about functions wit