Displaying 20 results from an estimated 7000 matches similar to: "match.arg confusion (PR#921)"
2002 Apr 09
0
match.arg confusion (PR#921)
>>>>> "PD" == p dalgaard <p.dalgaard@biostat.ku.dk> writes:
PD> [sys.function fails sometimes (sorry, our mail system
PD> decide to throw away the original mail)]
PD> Yes, I bumped into something similar recently. The
PD> problem is that we only actually store the call in the
PD> context structure, not the function, so
2001 Apr 25
0
Managed to confuse match.arg (PR#921)
This one may not strictly be a bug, and it was certainly my
fault, but it took me a while to track it down and it is rather
strange:
funOne <- function(x)
{
funTwo <- 1:10
funTwo(x)
}
funTwo <- function(v) 2*v
funOne(5) # answer is 10 as expected
# now a different definition for funTwo with a match.arg
funTwo <- function(v, foo=c("small", "large"))
{
foo
2002 Mar 22
2
rare bad bug in sys.function() {or match.arg()} (PR#1409)
I found this tracing a bug when experimenting with a new sort()
function using match.arg().
It was triggered because mosaicplot.default(.) has an argument
called `sort' and calls itself the sort() function in which I
was using match.arg()...
Here is (input for) a small clean example :
#### bad match.arg() // sys.function() bug :
#### MM, 22.3.2002
callme <- function(a = 1, mm =
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
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.
2001 Jan 12
0
match.call problem (PR#813)
Previously reported by Martin as a plot.formula issue, but I believe
it boils down to this:
> f <- function(x,...)match.call(expand.dots=FALSE)
> g <- function(x,y=2,...)f(x,y=y,...)
> g(1)
f(x = x, ... = list(y = y, ...))
> g(1,b=2)
f(x = x, ... = list(y = y, b = 2))
> g(1,y=2)
f(x = x, ... = list(y = y, ...))
Notice that ... appears if all actual arguments to g are
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
1997 Dec 21
0
R-beta: New version available
A new version is available from
ftp.stat.auckland.ac.nz:/pub/R/R-0.61.tgz
and soon from CRAN mirrors everywhere.
As usual, there is at least one unfixed bug in the release, but this
time, we hope that we have set things up so that future bugfixes can
be released more or less immediately.
Merry Christmas!
The R core team.
**********************************************************************
1997 Dec 21
0
R-beta: New version available
A new version is available from
ftp.stat.auckland.ac.nz:/pub/R/R-0.61.tgz
and soon from CRAN mirrors everywhere.
As usual, there is at least one unfixed bug in the release, but this
time, we hope that we have set things up so that future bugfixes can
be released more or less immediately.
Merry Christmas!
The R core team.
**********************************************************************
2004 Mar 25
0
Delay of 1.9.0
As you may have noticed, cran.us.r-project.org has been down for a
while due to a security incident. This is the same machine that
carries the R source repository. The R sources appear to be
uncompromised, but we have had to move developer logins and everything
to another machine, with various configuration issues to sort out.
The upshot is that there is currently no way of doing the automatic
2000 Feb 28
2
Cleaning up in the bugs repository
In order not to have more items in the BUGS list than necessary, I've
gone through the list of open bugs and removed some of them for
reasons given below:
(Note that nothing really dies on R-bugs it just moves into trashcan,
wishlist, or Something-fixed, so if you complain loudly enough they
can be picked up again.)
*Graphics*
Remove three reports on panel.first() (2 + 1 answer with a
2004 Oct 08
2
R-2.0.0 findVar and findFun question
Dear all,
when working on a project with embedded R, I found out that R-2.0.0 causes
a problem where older versions worked OK.
Rf_findVar(...) causes the following error when used to find a generic function
(such as print):
fun = Rf_findVar(...);
R_tryEval(fun, ...);
Error in function (object, ...) : Invalid generic function in usemethod
Alternatively, using Rf_findFun(...) seems OK in this
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
2016 Mar 27
0
sys.function(0)
> On 27 Mar 2016, at 22:05 , Mick Jordan <mick.jordan at oracle.com> wrote:
>
> As I understand
> https://stat.ethz.ch/R-manual/R-devel/library/base/html/sys.parent.html
> sys.function(n) returns the function associated with stack frame n.
> Since frame 0 is defined as .GlobalEnv which is not associated with a
> function, I would expect this to always return NULL.
2016 Mar 27
1
sys.function(0)
On 3/27/16 2:46 PM, peter dalgaard wrote:
>> On 27 Mar 2016, at 22:05 , Mick Jordan <mick.jordan at oracle.com> wrote:
>>
>> As I understand
>> https://stat.ethz.ch/R-manual/R-devel/library/base/html/sys.parent.html
>> sys.function(n) returns the function associated with stack frame n.
>> Since frame 0 is defined as .GlobalEnv which is not associated with
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);
1998 Jan 06
0
match.arg()
$ R -norestore
R : Copyright 1997, Robert Gentleman and Ross Ihaka
Version 0.61.0 Alpha (December 21, 1997)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type "license()" for details.
Type "demo()" for some demos, "help()" for on-line help, or
"help.start()" for a HTML browser
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