Displaying 20 results from an estimated 600 matches similar to: "can't get names of R_env"
2001 Sep 27
1
Passing an R matrix to a C program
Hello,
I'm starting to write a C function that gets
a list and a matrix from R. I'm using .Call
because I've undertood that this is recommended
to handle lists (am I wrong?). My problem is that I
can pass the matrix as a vector, but not as a 2D array.
For example, in the following simple C program:
#include <R.h>
#include <Rdefines.h>
SEXP printListElement(SEXP list,
2003 Jan 17
1
Arguments of R- and C-side of internal functions
Dear R experts,
I looked at the body of, say, `optim' function and found
the call to the `.Internal', C optim function. It looks
like this:
.Internal(optim(par, fn1, gr1, method, con, lower, upper))
On the other hand, the C prototype of optim is:
SEXP do_optim(SEXP call, SEXP op, SEXP args, SEXP rho);
So, I guess that all the list of parameters passing in R are assigned
to
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
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
2009 Oct 01
2
creating environments in package's C code
Dear developers,
is it possible to create environments in C code of packages?
Simply using
SEXP env;
PROTECT (env = allocSExp(ENVSXP));
and assigning the enclosing environment with SET_ENCLOS seems to be
insufficient.
Best wishes,
Martin
--
Dr. Martin Becker
Statistics and Econometrics
Saarland University
Campus C3 1, Room 206
66123 Saarbruecken
Germany
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
2006 Jun 03
3
More on bug 7924
Hi,
Again, sorry for the length of this post. Once I get my new office I
will get a website set up on my work machine and will simply post a
link to the log since I doubt many people are truly interested in
these logs.
To further analyze what is happening, I added my own routine in
main.c called DEBUG_SET_NAMED and then redefined the SET_NAMED macro
to use it and then rebuilt R.
I
2009 Jun 25
1
R data inspection under gdb?
Hi, everyone. I'm trying to debug an R-module, written in C, and I'm using
gdb for this.
How can I print "standard" R objects from within C code?
BTW, I'm familiar with the advice to use R_PV given in Writing R Extensions,
but it's not working for me. E.g., I get
(gdb) p R_PV(x)
$1 = void
and yet
(gdb) p *x
$2 = {sxpinfo = {type = 16, obj = 0, named = 0, gp = 0,
2003 Jul 09
2
.Internal(optim)
> hi all,
> I am using optim. I am getting the following error message:
>
> Error in optim(par = start.vals[, h], fn = post.func.pois, gr = post.grad.
> pois, :
> L-BFGS-B needs finite values of fn
>
> If I look at optim typing '> optim' it seems that the error comes from
> inside .Internal(optim), so I wonder how can I see the code for .Internal(
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
2013 Aug 18
1
How does R_UnboundValue and removing variables work?
Reading "R Internals" made me believe that R_UnboundValue was a placeholder
that would be skipped over in variable lookup. viz. the section of R
Internals "Hash tables" says "items are not actually deleted but have their
value set to R_UnboundValue.", which seems to align with what I read in
envir.c.
So, I reasoned, if I have a function that returns R_UnboundValue,
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
2008 Nov 19
1
How to look within .Internal ?
In the optim() function there is a syntax :
res <- .Internal(optim(par, fn1, gr1, method, con, lower,
Here how can I see the inside-codes of ".Internal" function ?
Regards,
--
View this message in context: http://www.nabble.com/How-to-look-within-.Internal---tp20581897p20581897.html
Sent from the R help mailing list archive at Nabble.com.
2005 Apr 20
2
how to get code of a .Internal() function?
Hello,
I'm working with the function optim() from stats
package,
and inside this function is called the function
.Internal(optim(....)) and I want to get the code of
this function which would help me to understand why
the Nelder-Mead algorithm doesn't converge with my
data.
I'm working under Windows XP.
Could you reply to this adress because I don't belong
to the mailing list
2003 May 09
4
getAttr problem
Hi all,
It seems that getAttr doesn't return "names" attribute properly as in
getAttrib(x, R_NamesSymbol));
If you look at section 4.7.4 in "Writing R Extensions", the second example of
SEXP out(SEXP, SEXP) returns NULL for the names attribute of the
outer product.
This is true for R 1.7.0 on both Win2000 with mingw and Redhat 9.0 with gcc.
Is there something I am
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
2001 Dec 07
2
Memory problem
Dear all,
I have written a little R program to convert images. See below. Within the
loop over j (the filenames) memory consumption grows constantly. rm( ... )
inside the loop did not help. Memory does not grow if I remove the writeBin
statements between the two #-------- marks. But obviously this is not
solution I want...
Thanks for any advice.
Manfred Baumstark
P.S. As I'm new to R:
2004 Dec 28
2
Configuration of memory usage
Hi, all;
I know there has been a lot of discussions on memory usage in R.
However, I have some odd situation here. Basically, I have a rare
opportunity to run R in a system with 64GB memory without any limit on
memory usage for any person or process. However, I encountered the memory
problem error message like this:
Error: cannot allocate vector of size 594075 Kb
I got this error message while
2006 Mar 27
1
Safe to UNPROTECT() when object is assigned to a list?
Hi,
I'm troubleshooting some native code on Windows that very occationally
(and semi-randomly) crashes R. Already looked at "everything", I just
want to double check that it is safe to UNPROTECT() allocated
variables as soon as they are assigned to, say, a PROTECTed list.
>From (R v2.3.0) Section 5.7.1 "Handling the effects of garbage
collection" in "Writing R
2018 Apr 13
1
DNS backend SAMBA_INTERNAL name resolution through VPN
Hi,
My problem is about DNS names resolution in case there are two DNS servers
separated by a VPN and one DNS domain name.
Context: two Samba AD DC on each side of the VPN, one forest, one domain,
one site, two subnets.
Note that this target configuration is not yet operational since I'm trying
to make the DSN names resolution work first through the VPN.
The DNS servers are Samba internal