similar to: substitute() bug by you ? [forwarded]

Displaying 20 results from an estimated 1000 matches similar to: "substitute() bug by you ? [forwarded]"

2006 Mar 29
1
Substitute() changed since R2.3.0 (2006-02-02 r37243)?
Hi, I've got the following two versions of R on WinXP: A) R Version 2.3.0 Under development (unstable) (2006-02-02 r37243) B) R Version 2.3.0 Under development (unstable) (2006-03-27 r37579) and a the following "test.R" script: foo <- function(path, ...) { print(path) } bar <- function(x, ...) foo(...) wow <- function(x, ...) capture.output(foo(...)) bar(1, path=2)
2010 Aug 21
1
Speed improvement to evalList
I've been inspired to look at the R source code by some strange timing results that I wrote about on my blog at radfordneal.wordpress.com (see the posts on "Speeding up parentheses..." and "Two surprising things...". I discovered that the strange speed advantage of curly brackets over parentheses is partially explained by an inefficiency in the evalList and
2009 Aug 20
2
Problem using findVar( ) in combination with R's lazy evaluation
Hi All, I have a few small questions about the usage of the C findVar( ) function when used in C code called with '.Call'. In my case I create an R function with an argument. This function calls some C code in which I use findVar( ) to retrieve the values from the argument. Ofcourse normally I would just give the values as argument to .Call, but in my project I need to use findVar for
2013 Oct 16
1
Parallel R expression evaluations
Hi all, I am using R-3.0.1 under Linux platform to embed R into my C++ code. I am facing an error while executing more than 1 R-expressions parallelly. I am executing round(X) and abs(X) parallelly on a set of 50 input rows which resulted in segmentation fault after getting the following errors. Error: unprotect_ptr: pointer not found Error: argument to 'findVar' is not an environment
2009 Nov 28
1
PROTECT and OCaml GC.
Hello. In the writing of my OCaml-R binding, I'm sort of confused when it comes to the use of the PROTECT and UNPROTECT macros. Basically, I have C stub functions that are in charge of calling R for everything. Here's a simple example: > CAMLprim value r_findvar (value symbol) { > /* The findVar function is defined in envir.c. It looks up a symbol > in an environment.
2014 Feb 11
1
getting environment from "top" promise
Hi all, It seems that there is a use case for obtaining the environment for the "top" promise. By "top", I mean following the promise chain up the call stack until hitting a non-promise. S4 data containers often mimic the API of base R data structures. This means writing S4 methods for functions that quote their arguments, like with() and subset(). The methods package
2008 Jul 18
0
Rcpp from C++
Hi Sri, I haven't really elaborated on it having other stuff to prepare first, but as far as I got you first assign data to a vector: #include <R.h> #include <Rinternals.h> #undef R_INTERFACE_PTRS #include <Rembedded.h> #include "Rcpp.hpp" #include <R_ext/Parse.h> #include <Rinternals.h> #include <Rdefines.h> //assigning a vector SEXP
2005 Aug 17
2
About R variable references
Hello Group, I could use an advice on how SEXP handles work. My aim is to implement a system where I initially set a few global variables that are used for communication between C and R code. Then I do some work with R code and periodically call a function of my own that will update the system state. Such a design is useful for many purposes (for GUIs to name one). I am not entirely sure that R
2003 Sep 29
0
Calling C fn crashes (PR#4281)
Full_Name: Ben K. Version: 1.7.1 OS: Win 2000 Submission from: (NULL) (208.243.20.222) This C code doesn't crash: void init(SEXP rho, int *o){ SEXP vars = findVar(install("vars"), rho); } It's called using: vars <-as.data.frame(NULL) vars$delta <-7 dyn.load("c_fns.dll") print(.C("init",.GlobalEnv,o=as.integer(3))$o) However, this
2001 Apr 14
1
Postscript font bugs (and a suggestion) (PR#914)
Documentation and other bugs with postscript(): 1. This code crashes R (it asks for a font that isn't there): postscript() plot(0:1,0:1) text(0.5,0.5,'crash',font=6) The bug appears to be in the FixupFont routine in plot.c; on line 236, it checks that the font number is in the range 1..32. Later this crashes PostScriptStringWidth in devPS.c, because only fonts numbered 1..5
2008 May 24
1
value returned by findFun when the name cannot be found.
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(_("could not find function
2006 May 10
2
Warning: use of NULL environment is deprecated (in R CMD check)
* checking S3 generic/method consistency ... WARNING Warning: use of NULL environment is deprecated Warning: use of NULL environment is deprecated See section 'Generic functions and methods' of the 'Writing R Extensions' manual. I don't get any other warnings or errors. Can anyone suggest what the problem might be? (R2.3.0, OS X) Thanks, Hadley
2006 Aug 22
2
Rgraphviz installation Problem
Dear Robert, Thanks for your time. I have downloaded Rgraphviz (windows binary) from www.bioconductor.org and put inside R2.3.0 library then i installed from the local zip its says package 'graph' couldnot be loaded. Am i doing the installation correctly? Still the new user. Can you guide me sir? JJ -- Lecturer J. Joshua Thomas KDU College Penang Campus Research Student, University
2006 Oct 02
1
a question regarding 'lrm'
Hi List, I don't understand why 'lrm' doesn't recognize the '~.' formula. I'm pretty sure it was working before. Please see below: I'm using R2.3.0, WinXP, Design 2.0-12 thanks, ...Tao > dat <- data.frame(y=factor(rep(1:2,each=50)), x1=rnorm(100), x2=rnorm(100), x3=rnorm(100)) > lrm(y~., data=dat, x=T, y=T) Error in terms.formula(formula, specials =
2006 Sep 18
2
Help for methods
Help for help says: The 'topic' argument may also be a function call, to ask for documentation on a corresponding method. See the section on method documentation. and The authors of formal ('S4') methods can provide documentation on specific methods, as well as overall documentation on the methods of a particular function. The
2006 Feb 13
1
MinGW and the ld bug
Hi. I noticed that Brian Ripley found and corrected a bug in MinGW's ld.exe, see http://www.murdoch-sutherland.com/Rtools/. Thanks for this. I wonder if this is the same bug that cause my problems. I have tiny toy package with C code that installs perfectly on R Version 2.2.1 beta (2005-12-18 r36792) [this version was mislabelled "beta" the first few hours on CRAN when the stable
2006 Nov 24
1
Rgraphviz -404 Page not found
Again i have problem in locating the package for clique-graphs I tried with BioConductor under Browse for packages, it doesn't work atall. Kindly guid me Thanks JJ On 8/23/06, Seth Falcon <sfalcon@fhcrc.org> wrote: > > "j.joshua thomas" <researchjj@gmail.com> writes: > > > Dear Robert, > > > > Thanks for your time. > > I have
2006 Apr 30
0
Package-check failure (i386) (PR#8822)
Full_Name: Dan Kelley Version: 2.3.0 OS: OSX Macintosh Submission from: (NULL) (142.68.207.218) R2.3.0 has a problem checking one of my self-authored Oce package (http://myweb.dal.ca/kelley/pub/sof/oce/index.php). The package builds fine on another machine running a R2.2.1. Both machines are macintoshes running the latest version of OSX. I am reporting this here not to get help - I realize
2008 Jan 16
1
Pb with defineVar() example in the "Writing R Extensions" manual
Hi, I'm wondering if this code from the "Writing R Extensions" manual is really safe: SEXP mkans(double x) { SEXP ans; PROTECT(ans = allocVector(REALSXP, 1)); REAL(ans)[0] = x; UNPROTECT(1); return ans; } double feval(double x, SEXP f, SEXP rho) { defineVar(install("x"), mkans(x), rho);
2014 Mar 05
1
[PATCH] Code coverage support proof of concept
Hello, I submit a patch for review that implements code coverage tracing in the R interpreter. It records the lines that are actually executed and their associated frequency for which srcref information is available. I perfectly understands that this patch will not make its way inside R as it is, that they are many concerns of stability, compatibility, maintenance and so on. I would like to have