Displaying 20 results from an estimated 924 matches for "sexps".
Did you mean:
sexp
2009 Sep 07
1
Usage of OCaml/R binding.
Hello.
I've been pulling together a Debian package out of Maxence Guesdon's
OCaml bindings for R. Will be available from my website as soon as I get
my router to obey me. Here's Maxence's bindings:
http://pauillac.inria.fr/~guesdon/ocaml-r.en.html
The purpose of this software is to access R from OCaml programs.
However, my issue is that after having pulled things to a Debian
2009 Sep 07
1
Usage of OCaml/R binding.
Hello.
I've been pulling together a Debian package out of Maxence Guesdon's
OCaml bindings for R. Will be available from my website as soon as I get
my router to obey me. Here's Maxence's bindings:
http://pauillac.inria.fr/~guesdon/ocaml-r.en.html
The purpose of this software is to access R from OCaml programs.
However, my issue is that after having pulled things to a Debian
2013 Aug 27
1
Error in simulation. NAN
Hi all,
im triyng to implement a bayesian model with R and c++.
I have a strange problem. I can't reproduce the error with a small
script and then i post the original one.
The problem is after the line
for(MCMC_iter2=0;MCMC_iter2<thin;MCMC_iter2++)
For the first 34 iterations all work fine, after, all the simulations
of mu_acc_P return an "nan". If i delete the line
2018 Oct 10
1
unlockEnvironment()?
R lets one lock an environment with both an R function,
base::lockEnvironment, and a C function, R_LockEnvironment, but, as far as
I can tell, no corresponding function to unlock an environment. Is this
omission on principle or just something that has not been done yet?
I ask because several packages, including the well-used R6 and rlang
packages, fiddle with some bits in with SET_ENVFLAGS and
2007 Nov 15
1
Nested SEXP functions
Hey All,
I was wondering if I could solicit a little advice. I have been
experiencing some quirkiness in my C code through .Call.
Unfortunately, my program is rather large, so I'm trying to create a
brief example. Yet before I do, I thought maybe a conceptual question
would be sufficient.
Basically, I'm writing up a multidimensional Gaussian likelihood (with
spatial covariances and
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
2020 Sep 11
4
Garbage collection of seemingly PROTECTed pairlist
I want to write an R function using R's C interface that takes a 2-column
matrix of increasing, non-overlapping integer intervals and returns a list
with those intervals plus some added intervals, such that there are no
gaps. For example, it should take the matrix rbind(c(5L, 6L), c(7L, 10L),
c(20L, 30L)) and return list(c(5L, 6L), c(7L, 10L), c(11L, 19L), c(20L,
30L)). Because the output is
2014 Jul 07
2
a question about optim.R and optim.c in R
Hi, I am learning R by reading R source code. Here is one question I have
about the optim function in R.
The context : In the optim.R, after all the prep steps, the main function
call call is made via :
.External2(C_optim, par, fn1, gr1, method, con, lower, upper).
So, it seems to me, to follow what is going on from here, that I should
read the optim function in \src\library\stats\src\optim.c
2010 Sep 08
0
Correction to vec-subset speed patch
I found a bug in one of the fourteen speed patches I posted, namely in
patch-vec-subset. I've fixed this (I now see one does need to
duplicate index vectors sometimes, though one can avoid it most of the
time). I also split this patch in two, since it really has two
different and independent parts. The patch-vec-subset patch now has
only some straightforward (locally-checkable) speedups for
2007 Jul 10
1
How to preserve data across function calls in a library package
Hi,
I am writing an R package with two functions in C++. So far
everything works.
Now, i would like to write a third function which would use a pointer
(it is a pointer to a class object) created by first function.
I tried placing this pointer outside of the function definitions
(i.e to make it global) but when called in the 3rd function i get
> *** caught bus error ***
address 0x0,
2007 Jul 10
1
How to preserve data across function calls in a library package
Hi,
I am writing an R package with two functions in C++. So far
everything works.
Now, i would like to write a third function which would use a pointer
(it is a pointer to a class object) created by first function.
I tried placing this pointer outside of the function definitions
(i.e to make it global) but when called in the 3rd function i get
> *** caught bus error ***
address 0x0,
2005 Aug 22
2
RFC: "loop connections"
I've just implemented a generalization of R's text connections, to
also support reading/writing raw binary data. There is very little
new code to speak of. For input connections, I wrote code to populate
the old text connection buffer from a raw vector, and provided a new
raw_read() method. For output connections, I wrote a raw_write() to
append to a raw vector. On input, the mode
2005 Sep 18
0
Updated rawConnection() patch
Here's an update of my rawConnection() implementation. In addition to
providing a raw version of textConnection(), this fixes two existing
issues with textConnection(): one is that the current textConnection()
implementation carries around unprotected SEXP pointers, the other is
a performance problem due to prolific copying of the output buffer as
output is accumulated line by line.
This new
2014 Mar 03
1
reference classes, LAZY_DUPLICATE_OK, and external pointers
We (the lme4 authors) are having a problem with doing a proper deep
copy of a reference class object in recent versions of R-devel with
the LAZY_DUPLICATE_OK flag in src/main/bind.c enabled.
Apologies in advance for any improper terminology.
TL;DR Is there an elegant way to force non-lazy/deep copying in our
case? Is anyone else using reference classes with a field that is an
external pointer?
2003 Oct 22
1
Windows RConsole Focus
Hi,
I was looking for a Windows-specific R function to focus the
console window and couldn't find one. The motivation is that
after loading the tcltk package, the "main" Tk window "." is
presumably focused but then immediately withdrawn (hidden) so
the RConsole loses its focus and you have to click on it to
continue typing.
Would there be any interest in including a
2009 Mar 19
1
.Internal
I was trying to find source for optimize and I ran across
function (f, interval, ..., lower = min(interval), upper = max(interval),
maximum = FALSE, tol = .Machine$double.eps^0.25)
{
if (maximum) {
val <- .Internal(fmin(function(arg) -f(arg, ...), lower,
upper, tol))
list(maximum = val, objective = f(val, ...))
}
else {
val <-
2008 Mar 05
1
SEXP size management.
Hi,
Trying to decrease the size of a SEXP variable without reassigning
values individually in a loop.
So far, I've tried using Realloc, as the follow source demonstrates:
SEXP dothis() {
SEXP Rblah;
PROTECT(Rblah = NEW_INTEGER(6));
int* blah = INTEGER(Rblah);
blah[0] = 1;
blah[1] = 2;
blah[2] = 3;
Realloc(Rblah, 3, INTEGER);
UNPROTECT(1);
return(Rblah);
}
According to the
1998 Apr 02
1
attributes now inherited
Hi R-Developers,
After my message about a month ago concerning attributes being lost during
simple operations, Martin Maechler invited me to fix the code if I was in
a hurry (especially for attributes in general). We've just made the
following changes here, which appear to implement the rules in the
Blue Book (pg. 257)
Enclosed is the output from "diff -c" from /R-0.61.1/src
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
2009 May 26
1
passing "..." arguments to a function called by eval()
Hi everyone,
I am starting learn to call C code from within R. So far, I've been
trying toy problems to see if I can get them to work. One of the things
I'd like to do is pass an arbitrary R function to C, evaluate the value
in the C code using eval, and then return it. I also want to allow an
arbitrary number of arguments to the function using "...".
The code for my toy