Displaying 20 results from an estimated 3000 matches similar to: "function-like macros undefined"
2019 Dec 15
4
source definition for R_NilValue/return from TYPEOF(R_NilValue)
Hello,
for reasons I want to know the return value of TYPEOF(R_NilValue), I
expect it to be NILSXP, but I can't find this documented anywhere.
Ideally, I'd like to see the source definition of R_NilValue, but after
fair bit of searching I cannot find an obviously location for this.
Would someone please point me in the right direction?
thanks
--
CRICOS provider code 00123M
2002 Oct 14
1
R 1.6.0 Solaris crash with xmalloc: out of virtual memory
[some de-capitalization of *SXP done manually by mailing
list maintainer ; the originally was caught as potential spam. MM]
I have a little R program that crashes with the message
xmalloc: out of virtual memory
The code has a repeat{} loop that watches the sizes of some files.
When there's an increase it updates things by reading the last 65
lines of each file, doing some
1998 Jun 04
1
aov
R developers,
Last week I asked several questions which I think I can now answer
myself in large part.
>
> Q 1) Is aov supposed to avoid qr decomposition and matrix inversion?
> In S it is claimed to be faster than lm() for large datasets. Is
> that due to avoidance of qr()?
> (My main goal is to get the Error strata working.)
My use of matrix
2008 Mar 31
1
(PR#11054) "Writing R Extensions": bad example with CAR
Dear Prof Ripley,
Prof Brian Ripley wrote:
> But it is not taken 'verbatim from src/main/print.c' (at least not in
> that version of R), and the code is not run with USE_RINTERNALS defined
> when write-barrier checking is enabled.
>
> The example has been updated to match the current code in 2.7.0 alpha.
I just assumed that it is copied verbatim without checking because
2003 Dec 16
1
Memory issues in "aggregate" (PR#5829)
Full_Name: Ed Borasky
Version: 1.8.1
OS: Windows XP Professional
Submission from: (NULL) (208.252.96.195)
R 1.8.1 seems to be running into a memory allocation problem in the "aggregate"
function. I have a rather large dataset (14 columns by 223,000 rows -- almost 40
megabytes) and a script that performs some processing on it. The system is a 768
MB Pentium 4. Here's the console
2008 Mar 31
1
(PR#11054) "Writing R Extensions": bad example with CAR /
But it is not taken 'verbatim from src/main/print.c' (at least not in that
version of R), and the code is not run with USE_RINTERNALS defined when
write-barrier checking is enabled.
The example has been updated to match the current code in 2.7.0 alpha.
On Sun, 30 Mar 2008, sanders at fs.tum.de wrote:
> Full_Name: Simon Anders
> Version: 2.6.2
> OS: Ubuntu Linux
>
2011 Aug 13
1
Latent flaw in SEXPREC definition
There seems to be a latent flaw in the definition of struct SEXPREC
in Rinternals.h, which likely doesn't cause problems now, but could
if the relative sizes of data types changes.
The SEXPREC structure contains a union that includes a primsxp,
symsxp, etc, but not a vecsxp. However, in allocVector in memory.c,
zero-length vectors are allocated using allocSExpNonCons, which
appears to
2010 Aug 23
1
Speed improvement to PROTECT, UNPROTECT, etc.
As I mentioned in my previous message about speeding up evalList, I've
been looking at ways to speed up the R interpreter. One sees in the
code many, many calls of PROTECT, UNPROTECT, and related functions, so
that seems like an obvious target for optimization. Indeed, I've
found that one can speed up the interpreter by about 10% by just
changing these.
The functions are actually macros
2017 Mar 29
2
Transferring ownership of R-managed buffer
http://www.keittlab.org/
On Wed, Mar 29, 2017 at 1:04 PM, Herv? Pag?s <hpages at fredhutch.org> wrote:
> Hi Tim,
>
> On 03/29/2017 08:24 AM, Tim Keitt wrote:
>
>> I have a use case where I would like to create an SEXP around an existing
>> buffer that is managed by R, thus avoiding a copy operation.
>>
>
> What to you mean exactly by "an existing
2002 Feb 25
1
Interfacing pre-existing C++ library from R
Hello,
I'm trying to link a large in-house C++ library into R. So far, I've managed to to most of what I want, but I have one remaining question and a suggestion.
The suggestion first: I've found it useful to put
#ifdef __cplusplus
extern "C" {
#endif
and
#ifdef __cplusplus
}
#endif
around the function prototypes in Rinternals.h (in
2016 Aug 05
2
Extra copies of objects in environments when using $ operator?
My understanding is that R will not make copies of lists if there is
only one reference to the object. However, I've encountered a case
where R does make copies, even though (I think) there should be only
one reference to the object. I hope that someone could shed some light
on why this is happening.
I'll start with a simple example. Below, x is a list with one element,
and changing that
2006 Nov 15
1
Feature request: put NewEnvironment and R_NewhashedEnv into API
Hi,
I would like to be able to create new environments from package C
code. AFAICT, this isn't allowed since both NewEnvironment and
R_NewHashedEnv are declared in Defn.R.
If exposing this isn't controvertial, I would submit a patch.
However, I'm not sure where the declarations should go (Rdefines.h?)
and whether they need to change to Rf_*.
+ seth
2009 Sep 03
1
Running an expression 1MN times using embedded R
Hello,
I'm evaluating this expression
expression({ for(x in 1:5){ .Call('rh_status','x') }})
a million times from a program with R embedded in it. I have attached
reproducible code that crashes with
Program received signal SIGSEGV, Segmentation fault.
0x00002b499ca40a6e in R_gc_internal (size_needed=0) at memory.c:1309
1309 FORWARD_NODE(R_PPStack[i]);
Current language:
2016 Aug 05
0
Extra copies of objects in environments when using $ operator?
On Fri, 5 Aug 2016, Winston Chang wrote:
> My understanding is that R will not make copies of lists if there is
> only one reference to the object. However, I've encountered a case
> where R does make copies, even though (I think) there should be only
> one reference to the object. I hope that someone could shed some light
> on why this is happening.
>
> I'll start
2006 Feb 16
3
Rf_errorcall - translate to Pascal
Hello!
I (try to) convert the external R header files to Pascal (Delphi). At
one place I stumbled over a macro that uses a method that is not
declared in a LGPL header file:
In Rinternals.h:
#define error_return(msg) { Rf_error(msg); return R_NilValue; }
#define errorcall_return(cl,msg){ Rf_errorcall(cl, msg); return R_NilValue; }
~~~~~~~~
2020 Sep 06
8
some questions about R internal SEXP types
Hello,
I am writing an R/Go interoperability tool[1] that work similarly to
Rcpp; the tool takes packages written in Go and performs the necessary
Go type analysis to wrap the Go code with C and R shims that allow the
Go code to then be called from R. The system is largely complete (with
the exception of having a clean approach to handling generalised
attributes in the easy case[2] - the less
2005 Jan 03
2
Memory problem ... Again
Happy new year to all;
A few days ago, I posted similar problem. At that time, I found out that our
R program had been 32-bit compiled, not 64-bit compiled. So the R program
has been re-installed in 64-bit and run the same job, reading in 150
Affymetrix U133A v2 CEL files and perform dChip processing. However, the
memory problem happened again. Since the amount of physical memory is 64GB,
I think
2017 Mar 29
3
Transferring ownership of R-managed buffer
I have a use case where I would like to create an SEXP around an existing
buffer that is managed by R, thus avoiding a copy operation. If I have
something like:
void *p = (void*) RAW(PROTECT(Rf_allocVector(RAWSXP, n)));
... additional maniupulation ...
SEXP x = somefunc(SXPTYPE, n, p); // ????
Is there a "placement" constructor available? (I have arranged for the
corresponding
2008 Feb 19
1
level of mutability for the type of a SEXP
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 considered immutable, or it can it
change after the SEXP has been created and used for a while ?".
2020 Jun 29
1
Possible ABI change in R 4.0.1
Hi all,
it seems that from R 4.0.1 EXTPTR_PTR can be either a macro or a
function, depending on whether USE_RINTERNALS is requested.
Jeroen helped me find that this was in 78592:
https://github.com/wch/r-source/commit/c634fec5214e73747b44d7c0e6f047fefe44667d
This is a problem, because binary packages that are built on R 4.0.1
or R 4.0.2 will potentially not load on R 4.0.0, if they use the