Displaying 20 results from an estimated 4000 matches similar to: "two questions"
1998 Nov 26
1
Saving memory usage -- .C(....., DUP = FALSE) danger?
Just found out [R 0.63, standard -v -n] :
> rm(list=ls())
> gc()
free total
Ncells 96538 200000
Vcells 214008 250000
> hist(runif(50000))
Error: heap memory (1953 Kb) exhausted [needed 390 Kb more]
which is a bit astonishing given that I still have room for 214000 double's
> u1 <- runif(50000)
> u2 <- runif(50000)
> gc()
1997 Aug 25
2
R-alpha: eigen and batch
Batch:
Putting q(save=F) at the end of my file does not work in my
context because I can no longer source the file without quitting. I
have that quit statement in my .First so that I always quit that way
interactively. The problem is that it is ignored in batch.
eigen:
The crash occurs on my 586 running Red Hat Linux 2.0.27 but not on
my son's 486 running SLackware Linix 2.0.29. We both
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
2002 Jun 12
3
help debugging segfaults
(Sorry for the cross-post--- I wasn't sure which list is more
appropriate...)
Hi everyone,
I've run into segfaults when using my randomForest package on large dataset
(e.g., 100 x 15200) and large number of trees (e.g., ntree=7000 and
mtry=3000). I'm wondering if anyone can give me some hints on where to look
for the problem.
The randomForest package mainly consists of two things:
2002 Jun 12
3
help debugging segfaults
(Sorry for the cross-post--- I wasn't sure which list is more
appropriate...)
Hi everyone,
I've run into segfaults when using my randomForest package on large dataset
(e.g., 100 x 15200) and large number of trees (e.g., ntree=7000 and
mtry=3000). I'm wondering if anyone can give me some hints on where to look
for the problem.
The randomForest package mainly consists of two things:
2017 Oct 20
1
Illegal Logical Values
I'm wondering if WRE Section 5.2 should be a little more explicit about misuse of integer values other than NA, 0, and 1 in LGLSXPs.? I'm thinking of this passage:
> Logical values are sent as 0 (FALSE), 1 (TRUE) or INT_MIN = -2147483648 (NA, but only if NAOK is true), and the compiled code should return one of these three values. (Non-zero values other than INT_MIN are mapped to
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%
2008 Nov 06
3
.C(..., DUP=FALSE) memory costs depending on input size?
Hello,
I'm trying to create my own C code for use within R. While optimizing the
code I've noticed that even while only using pointers to get my data to C
the time needed still depends on data (vector) size.
To test this, I've created an empty C function to which I've send vectors
containing various sizes of elements. The time needed for each call is
measured and plotted. I would
2002 Jun 18
1
can't find array overruns (was: help debugging segfaults)
Dear R-devel,
Last week I got several responses to my question about debugging segfaults
in my code (original post below). After I changed the S_alloc() calls to
Calloc()/Free(), the symptom was gone, but I was told to keep looking. So I
did:
o Switched to Calloc/Free. Electric Fence did not find any problem.
o Put assert(index < bound); assert(index >=0); everywhere in the C routine
2002 Jun 13
3
[R] help debugging segfaults
Hi all,
Thanks to Prof. Ripley, Prof. Gentleman, and Simon Wood (did I miss
anyone?). The problem seemed to have gone away.
Everyone suggested using some malloc debugger (such as Electric Fence). All
I did was following half of what BDR suggested below, i.e., changing all the
S_alloc() calls to Calloc() and Free(). I didn't get to try efence, and the
problem seems to have disappeared!
As
2011 Nov 02
1
can one modify array in R memory from C++ without copying it?
Hi, guys. I posted this by accident at rcpp-dev, although it meant to
be only to r-dev, so don't flame me here please, rcpp guys will
do it there, i am sure :).
I have some pretty large arrays in R and i wanted to do some time
consuming modifications of these arrays in C++ without actually copying
them, just by passing pointers to them. Since i don't know internal data
structures of R, i
2009 Jul 14
1
Incorrect comment about ISNA(x) in Arith.h (PR#13826)
R-2.9.0/include/R_ext/Arith.h has:
int R_IsNA(double); /* True for R's NA only */
int R_IsNaN(double); /* True for special NaN, *not* for NA */
int R_finite(double); /* True if none of NA, NaN, +/-Inf */
#define ISNA(x) R_IsNA(x)
/* True for *both* NA and NaN.
The first and last lines are contradictory - if R_IsNA is true only
for NA, not NaN, then ISNA should be the same.
2011 Apr 08
1
Is function compiled code or not?
Hi,
Sorry for my ignorance, but how can I see if a function is 'compiled code' or plain R? E.g. the daisy
function from the cluster package.
2009 Aug 28
1
Calling C funtion from R help Needed
Hello Forum,
I'm calling C function from R.It is a small sample trial program. The C function will accept a character and a integer and print them.
It is printing some special character instead of input character. Below are the C function, Wrapper code ,R code and R output.
Please help me in this issue
Thank you in advance
C function (Name : checkstr.c)
#include<stdio.h>
int
2008 Sep 22
1
findInterval(), binary search, log(N) complexity
Dear R users,
the help for findInterval(x,vec) suggests a logarithmic dependence on N
(=length(vec)), which would imply a binary search type algorithm.
However, when I "test" this hypothesis, in the following manner:
set.seed(-3645);
l <- vector();
N.seq <- c(5000, 500000, 1000000, 10000000, 50000000);k <- 1
for (N in N.seq){
tmp <- sort(round(stats::rt(N, df=2), 2));
2004 May 28
3
gauss.hermite?
The search at www.r-project.org mentioned a function
"gauss.hermite{rmutil}". However, 'install.packages("rmutil")'
produced, 'No package "rmutil" on CRAN.' How can I find the current
status of "gauss.hermite" and "rmutil"?
Thanks,
Spencer Graves
2000 Sep 02
1
R INSTALL *.tgz fails (minor docs/feature bug) (PR#652)
R Team,
I was attempting to install Lindsey's rmutil.tgz and other
non-CRAN packages using 'R INSTALL', for example 'R INSTALL rmutil.tgz'
after downloading 'rmutil.tgz' from Lindsey's page (as linked from
r-project.org page).
Directly using the compressed file as 'R INSTALL rmutil.tgz'
failed, though the shell help from 'R INSTALL --help'
2005 Mar 21
5
Read a dataset with different lengths
Dear useR again,
How can I read a dataset if lines in dataset did not have same
elements (have different lengths), For example:
1 2, 4, 16, 1, 1, 3, 1, 1, 15, 5, 1, 1, 14, 1, 1
2 2, 13, 5, 1, 1, 3, 1, 1, 15, 5, 1, 1, 14, 1, 1
3 4, 5, 11, 1, 1, 6, 1, 1, 5, 14, 1, 1, 15, 1, 1
4 2, 5, 9, 1, 1, 14, 1, 1, 8, 16, 1, 1, 13, 1, 1
5 3, 7, 14, 1,
1998 Jan 21
2
alloc
I am trying to get our database interface (PADI) working with R. The code does
some memory allocation and for Splus there is an ifdef which controls whether
malloc or S_alloc is called. I did nm R.binary | grep alloc to see if this was
supported and I find there are some choices:
[2490] | 446036| 272|FUNC |GLOB |0 |7 |R_alloc
[806] | 693956| 312|FUNC |LOCL |0 |7