Displaying 20 results from an estimated 600 matches similar to: "Control statements with condition with greater than one should give error (not just warning) [PATCH]"
Control statements with condition with greater than one should give error (not just warning) [PATCH]
2017 Mar 03
0
Control statements with condition with greater than one should give error (not just warning) [PATCH]
>>>>> Henrik Bengtsson <henrik.bengtsson at gmail.com>
>>>>> on Fri, 3 Mar 2017 00:52:16 -0800 writes:
> I'd like to propose that the whenever the length of condition passed
> to an if or a while statement differs from one, an error is produced
> rather than just a warning as today:
>> x <- 1:2
>> if (x == 1)
Control statements with condition with greater than one should give error (not just warning) [PATCH]
2017 Mar 03
2
Control statements with condition with greater than one should give error (not just warning) [PATCH]
On Fri, Mar 3, 2017 at 9:22 AM, Martin Maechler
<maechler at stat.math.ethz.ch> wrote:
>>>>>> Henrik Bengtsson <henrik.bengtsson at gmail.com>
>>>>>> on Fri, 3 Mar 2017 00:52:16 -0800 writes:
>
> > I'd like to propose that the whenever the length of condition passed
> > to an if or a while statement differs from one, an
2008 Apr 24
1
Calling R functions with multiple arguments from C
Hi,
I'm writing a C function that has to call a R function with multiple
arguments. I've read the relevant section in Writing R Extensions, and
searched the R site, mailing lists as well as rseek. I managed to call
the function, but I'm now having trouble creating the argument list.
I tried to create a pairlist of the arguments and send it to the R
function. The R function however
2020 Jun 30
2
Build a R call at C level
Hi All,
I was reading the R extension manual section 5.11 ( Evaluating R expression
from C) and I tried to build a simple call to the sum function. Please see
below.
call_to_sum <- inline::cfunction(
language = "C",
sig = c(x = "SEXP"), body = "
SEXP e = PROTECT(lang2(install(\"sum\"), x));
SEXP ans = PROTECT(eval(e, R_GlobalEnv));
UNPROTECT(2);
return
2010 May 06
1
R on kdeedu-svn library problem
Hello,
I am new to this list. ?I am trying to compile the current svn version of
kdeedu on an amd64 linux machine ?which uses R and I get the following
compiler output.
-------------------------------------------
?79%] Building CXX object
cantor/src/backends/R/rserver/CMakeFiles/cantor_rserver.dir/rserver.o
$SOURCES/kdeedu/cantor/src/backends/R/rserver/rserver.cpp: In member
function
2014 Apr 03
1
question regarding lang2 command in C
Hi ,
I am asking too many questions , sorry for that . I am creating a data
frame in C itself , reading a table .
The data frame calling code looks like this
======================================
*PROTECT(dfm=lang2(install("data.frame"),df));*
*SEXP res = PROTECT(eval(dfm,R_GlobalEnv));*
UNPROTECT(2);
return res;
==================================
It works fine , now the problem
2020 Jun 30
3
Build a R call at C level
On 6/30/20 1:06 PM, Jan Gorecki wrote:
> It is quite known that R documentation on R C api could be improved...
Please see "5.11 Evaluating R expressions from C" from "Writing R
Extensions"
Best
Tomas
> Still R-package-devel mailing list should be preferred for this kind
> of questions.
> Not sure if that is the best way, but works.
>
> call_to_sum <-
2014 Jun 25
1
Need help on calling Head from C
Hi ,
I am trying to call head function from C . My doubt is with the parameter
n,how to pass it .
PROTECT(dfm=lang3(install("data.frame"),df,ScalarLogical(FALSE)));
SET_TAG(CDDR(dfm), install("stringsAsFactors")) ;
SEXP res = PROTECT(eval(dfm,R_GlobalEnv));
PROTECT(head=lang3(install("head"),res,ScalarInteger(1)));
head = PROTECT(eval(head,R_GlobalEnv));
I tried
2019 Jul 13
2
Mitigating Stalls Caused by Call Deparse on Error
When large calls cause errors R may stall for extended periods.? This
is particularly likely to happen with `do.call`, as in this example
with a 24 second stall:
??? x <- runif(1e7)
??? system.time(do.call(paste0, list(abs, x)))? # intentional error
??? ## Error in (function (..., collapse = NULL)? :
??? ##?? cannot coerce type 'builtin' to vector of type 'character'
??? ##
2008 Apr 29
2
Calling R from C - part way there but need a push!
Dear All,
I've read the manual on "Writing R Extensions" and in particular the
part on calling R from C. (Most of the manual is about calling C
from R, not the other way around.)
The good news is that I can now call _some_ R from C, specifically
the R functions which have C header files. However it isn't clear to
me how to call R functions that are written in R. I
2019 Jul 14
2
[External] Mitigating Stalls Caused by Call Deparse on Error
Luke, thanks for considering the issue.? I would like to
try to separate the problem into two parts, as I _think_
your comments address primarily part 2 below:
1. How can we avoid significant and possibly crippling
?? stalls on error with these non-standard calls.
2. What is the best way to view these non-standard calls.
I agree that issue 2. requires further thought and
discussion under a
2009 Aug 06
1
[R] Repeatable, But Time Varying R GUI Crash (PR#13880)
On 8/6/2009 4:11 PM, Marilyn & Rich Short wrote:
> Hello,
>
> I'm having a problem in R. The R GUI is crashing with a message to
> contact Microsoft for the solution. I've contacted Microsoft and they
> are of no help. Below is a distilled set of code that will cause the
> crash. As you will see, there are two do-loops within which is a "load"
>
2019 Jul 16
1
[External] Mitigating Stalls Caused by Call Deparse on Error
We also have a few other suggestions and wishes about backtrace
storage and display on the one hand, and display of constructed calls
on the other hand. Perhaps it would be better to open a different
wishlist item for traceback() to keep the discussions focused?
FWIW I think deparsing backtraces lazily is a great idea. Displaying 1
line per call by default in interactive sessions, while being
2008 Apr 05
2
Adding a Matrix Exponentiation Operator
Hi all
I recently started to write a matrix exponentiation operator for R (by
adding a new operator definition to names.c, and adding the following code
to arrays.c). It is not finished yet, but I would like to solicit some
comments, as there are a few areas of R's internals that I am still feeling
my way around.
Firstly:
1) Would there be interest in adding a new operator %^% that performs
2014 Oct 31
3
ScalarLogical and setAttrib
Is it expected that attributes set on a LGLSXP created by
ScalarLogical will apply to all future objects created by
ScalarLogical as well? For example: the 'test1' function below returns
FALSE and 'test2' returns FALSE with an attribute:
library(inline)
test1 <- cfunction(body = 'return ScalarLogical(0);')
test2 <- cfunction(body = '
SEXP success =
2013 Jul 13
2
missing PROTECT() in src/main/arithmetic.c
at lines 651 & 653 (integer_binary function):
if (code == DIVOP || code == POWOP)
ans = allocVector(REALSXP, n);
else
ans = allocVector(INTSXP, n);
There are calls to warningcall() later in the function, which can
trigger garbbage collection.
Looks like the typical scenario where it seemed pretty safe to not
PROTECT in the original version of the function but
2006 May 14
1
bindingIsLocked returns illogical logical
bindingIsLocked applied to a locked binding returns a 'logical' that
is niether true nor false.
Martin
> e <- new.env()
> e$x <- 1
> e$y <- 2
> lockBinding("x", e)
NULL
> bindingIsLocked("x", e)
[1] TRUE
> bindingIsLocked("x", e)==TRUE
[1] FALSE
> bindingIsLocked("x", e)==FALSE
[1] FALSE
>
2019 Jan 05
1
unsorted - suggestion for performance improvement and ALTREP support for POSIXct
I believe the performance of isUnsorted() in sort.c could be improved by
calling REAL() once (outside of the for loop), rather than calling it twice
inside the loop. As an aside, it is implemented in the faster way in
doSort() (sort.c line 401). The example below shows the performance
improvement for a vectors of double of moving REAL() outside the for loop.
# example as implemented in
2011 Nov 11
1
When collected warnings exceeds 50
Hi,
I've been tracking down a memory leak in an rApache application,
http://data.vanderbilt.edu/rapache/bbplot. The code was deployed in
2007 and has survived numerous upgrades of both R and rApache
(including upgrades and bugs in RMySQL). It's written in such a way so
that web crawlers will download every possible URL the app will
create. It's not a high-traffic app, but just about
2008 Mar 29
0
"Writing R Extensions": bad example with CAR / CDR as lvalues (PR#11054)
Full_Name: Simon Anders
Version: 2.6.2
OS: Ubuntu Linux
Submission from: (NULL) (86.22.75.91)
This is a rather minor "documentation bug", certainly not at all urgent.
The manual "Writing R extensions" explains in section 5.10 ("Evaluating R
expressions from C") how to use the eval function. Without going into much
details, an example is given how to build up a