Displaying 20 results from an estimated 10000 matches similar to: "R-alpha: eigen and batch"
1997 Aug 22
2
R-alpha: eigen
eigen(matrix(rep(1,9),ncol=3),only.values=T)
works repeatedly but eventually (after 3 or 4 goes) gave a core dump
of 11mb (I think only the first answer was right).
if I type
gc()
immediately after the first call, I get a core dump right away (this
might possibly be related to my huge core dumps with nlm)
eigen(matrix(rep(1,9),ncol=3))
core dumps immediately after the first call
Jim
1997 Aug 05
1
R-beta: Characters in .C
I am having some difficulties using dynamically loaded
C functions on a Sparc 10 with R compiled
using cc (both R-0.49 and R-0.50). I get sporadic errors with the
error message:
Error: character variables must be duplicated in .C/.Fortran,
with C functions which pass character variables.
my C functions look like: anyfunc(char **filename, other variables )
This error message appears about 25%
1997 Aug 05
1
R-beta: Characters in .C
I am having some difficulties using dynamically loaded
C functions on a Sparc 10 with R compiled
using cc (both R-0.49 and R-0.50). I get sporadic errors with the
error message:
Error: character variables must be duplicated in .C/.Fortran,
with C functions which pass character variables.
my C functions look like: anyfunc(char **filename, other variables )
This error message appears about 25%
1999 Nov 23
1
compile error for mkString on alpha (PR#332)
Full_Name: Albrecht Gebhardt
Version: 0.90.0
OS: osf4.0
Submission from: (NULL) (143.205.61.73)
I had to apply the following patch to be able to compile on
an alpha with DU 4.0E:
###############################################
--- ./src/main/gram.y.mkString-patch Tue Nov 23 12:16:29 1999
+++ ./src/main/gram.y Tue Nov 23 12:16:59 1999
@@ -56,7 +56,8 @@
SEXP mkFloat(char *);
SEXP
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
2006 Mar 03
1
NA in eigen()
Hi,
I am using eigen to get an eigen decomposition of a square, symmetric
matrix. For some reason, I am getting a column in my eigen vectors (the
52nd column out of 601) that is a column of all NAs. I am using the option,
symmetric=T for eigen. I just discovered that I do not get this behavior
when I use the option EISPACK=T. With EISPACK=T, the 52nd eigenvector is
(up to rounding error) a
2005 Aug 17
2
About R variable references
Hello Group,
I could use an advice on how SEXP handles work. My aim is to implement a
system where I initially set a few global variables that are used for
communication between C and R code. Then I do some work with R code and
periodically call a function of my own that will update the system
state. Such a design is useful for many purposes (for GUIs to name one).
I am not entirely sure that R
2007 Jul 25
6
Using R_MakeExternalPtr
Hi all,
I've been writing a package and I've run into a problem that I'm unsure how
to solve. I am looking to pass a C++ class object to R so that it may be
passed back to another C++ function later on to be used. I'm quite new to R
and this is my first time writing a package, so I hope you can bear with me.
The following is how I create the class and use
2007 Mar 18
1
eigen returns NAs from a real matrix
Hi, All:
Attached please find a symmetric, indefinite matrix for which
'eigen(...)$vectors' included NAs:
> load("eigenBug.Rdata")
> sum(is.na(eigen(eigenBug)$vectors))
[1] 5670
> sessioninfo()
Error: could not find function "sessioninfo"
> sessionInfo()
R version 2.4.1 (2006-12-18)
i386-pc-mingw32
locale:
LC_COLLATE=English_United
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
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
2011 Sep 14
2
External pointers and an apparent memory leak
I'm using external pointers and seemingly leaking memory. My determination of a memory leak is that the R process continually creeps up in memory as seen by top while the usage as reported by gc() stays flat. I have isolated the C code:
void h5R_allocate_finalizer(SEXP eptr) {
Rprintf("Calling the finalizer\n");
void* vector = R_ExternalPtrAddr(eptr);
free(vector);
2002 Aug 23
1
R_NilValue blows up on Windows
Ok, Here's the c code that's loaded into R as dll on windows:
#include <R.h>
#include <Rdefines.h>
SEXP test1(SEXP col);
SEXP test1(SEXP col)
{
SEXP col2;
Rprintf("no value!\n");
return col2;
}
Compiles ok with bcc32 into a dll, loads into R as part of a library, I
Run library(rkdb), then
> .Call("test1", 2)
no value!
And puf! Rterm crashes.
2006 Mar 28
2
R crashes during 'eigen'
Hi all,
Hi,
When I want to compute the eigenvalues & eigenvectors of a specific
matrix, R crashes (i.e. it stops responding to any input). I've tried it
with different versions of R (2.1.1, 2.2.0, 2.2.1) - all with crashing
as result.
What I did before the crash was:
M <- as.matrix(read.table("thematrix",header=T))
eigen(M)
If, instead of eigen(M), I use eigen(M,
2005 May 01
2
eigen() may fail for some symmetric matrices, affects mvrnorm()
Hi all,
Recently our statistics students noticed that their Gibbs samplers were
crashing due to some NaNs in some parameters. The NaNs came from
mvrnorm (Ripley & Venables' MASS package multivariate normal sampling
function) and with some more investigation it turned out that they were
generated by function eigen, the eigenvalue computing function. The
problem did not seem to happen
help with gotoExitingHandler(R_NilValue, call, entry); . Implementation of error handling internally
2014 Feb 26
1
help with gotoExitingHandler(R_NilValue, call, entry); . Implementation of error handling internally
Hello,
I?m trying to leverage R_ToplevelExec to implement C level try/catch.
The way it is implemented allows for running a function in a top level context. This context gets an empty handler stack, so either the function runs correctly or it jumps. When it jumps, it does not find a handler, so it jumps to the top level context.
R does not allow me to call begin context and end context
2009 Mar 03
1
profiler and loops
Hello,
(This is follow up from this thread:
http://www.nabble.com/execution-time-of-.packages-td22304833.html but
with a different focus)
I am often confused by the result of the profiler, when a loop is
involved. Consider these two scripts:
script1:
Rprof( )
x <- numeric( )
for( i in 1:10000){
x <- c( x, rnorm(10) )
}
Rprof( NULL )
print( summaryRprof( ) )
script2:
2008 Jan 29
2
Problem with new("externalptr")
Hi,
It seems that new("externalptr") is always returning the same instance, and
not a new one as one would expect from a call to new(). Of course this is hard
to observe:
> new("externalptr")
<pointer: (nil)>
> new("externalptr")
<pointer: (nil)>
since not a lot of details are displayed.
For example, it's easy to see that 2
2024 Apr 25
1
Big speedup in install.packages() by re-using connections
On Thu, 25 Apr 2024 14:45:04 +0200
Jeroen Ooms <jeroenooms at gmail.com> wrote:
> Thoughts?
How verboten would it be to create an empty external pointer object,
add it to the preserved list, and set an on-exit finalizer to clean up
the curl multi-handle? As far as I can tell, the internet module is not
supposed to be unloaded, so this would not introduce an opportunity to
jump to an
2010 Oct 27
2
must .Call C functions return SEXP?
For using R's .Call interface to C functions, all the examples I've
seen have the C function return type SEXP. Why? What does R actually
do with this return type? What happens if I *don't* return a SEXP?
Reason I ask, is I've written some R code which allocates two long
lists, and then calls a C function with .Call. My C code writes to
those two pre-allocated lists, thus, I