similar to: reducing a too-large matrix obtained with allocMatrix()

Displaying 20 results from an estimated 1000 matches similar to: "reducing a too-large matrix obtained with allocMatrix()"

2024 Jun 07
1
[External] Re: clarifying and adjusting the C API for R
On Fri, 7 Jun 2024, Steven Dirkse wrote: > You don't often get email from sdirkse at gams.com. Learn why this is important > Thanks for sharing this overview of an interesting and much-needed project. > You mention that R exports about 1500 symbols (on platforms supporting > visibility) but this subject isn't mentioned explicitly again in your note, > so I'm wondering
2024 Jun 08
1
[External] Re: clarifying and adjusting the C API for R
Would it be reasonable to move the non-API stuff that cannot be hidden into header files inside a "details" directory (or some other specific naming scheme)? That's what I use when I need to separate a public API from an internal API. On Fri, Jun 7, 2024 at 7:30?AM luke-tierney--- via R-devel <r-devel at r-project.org> wrote: > > On Fri, 7 Jun 2024, Steven Dirkse
2024 Jun 07
1
clarifying and adjusting the C API for R
Thanks for sharing this overview of an interesting and much-needed project. You mention that R exports about 1500 symbols (on platforms supporting visibility) but this subject isn't mentioned explicitly again in your note, so I'm wondering how things tie together. Un-exported symbols cannot be part of the API - how would people use them in this case? In a perfect world the set of
2012 Jul 31
1
ways of getting around allocMatrix limit?
I need to multiply to very large, nonsparse matrices, and so get the error "allocMatrix: too many elements specified". Is there a way to set the limit for allocMatrix? In my case, the two matrices, A and B, are nxm and mxp where m is small, so I could subdivide each into blocks of submatrices A=rbind(A1,A2,...) and B=cbind(B1,B2,...) then multiply each pair of submatrices, but I was
2009 Feb 17
1
allocMatrix error
On Sat, Feb 14, 2009 at 00:17, <ashrafi@ucdavis.edu> wrote: Hi, I was trying to read ~400 chips in an affybatch and I got the same message. Could you find a remedy for that. My server has 128 GB of RAM. However, R halted ever before it uses the memory. I have been able to load upto 250 CEL files but this time I wanted to test what would happen if I want to normalize 400 chips. Thanks
2010 Jul 21
1
Question about allocMatrix error message
Dear R family, I faced a technical problem in r coding. #s=t(dev)%*%dev/(nr-1) # dev (100,000 by 2) stands for deviation from the mean #sinv=solve(s) #t2=diag(dev%*%sinv%*%t(dev)) I got an error message at t2 statement: Error in diag(dev %*% si %*% t(dev)) : allocMatrix: too many elements specified Please let me know if there is a way to overcome this problem. best moohwan
2019 Aug 07
0
#include_next <stdio.h> not found
Yes, this did the trick, thanks very much! I?m cc?ing r-devel just for the record. Roger Koenker r.koenker at ucl.ac.uk<mailto:r.koenker at ucl.ac.uk> Department of Economics, UCL London WC1H 0AX. On Aug 7, 2019, at 4:55 PM, Steven Dirkse <sdirkse at gams.com<mailto:sdirkse at gams.com>> wrote: Roger, Updating Xcode has the unfortunate side effect of wiping out the std
2024 Jun 06
4
clarifying and adjusting the C API for R
This is an update on some current work on the C API for use in R extensions. The internal R implementation makes use of tens of thousands of C entry points. On Linux and Windows, which support visibility restrictions, most of these are visible only within the R executble or shared library. About 1500 are not hidden and are visible to dynamically loaded shared libraries, such as ones in packages,
2012 Dec 06
0
Package party Error in model.matrix.default(as.formula(f), data = blocks) :allocMatrix: too many elements specified
Dear all: I¡¯m trying to get unbiased feature importance of my data via package ¡°party¡±, which contains 1-5 integer value, and a few numeric values attributes. The class label is 1-5 integer value as well. In total I have 20 features with 1100 observations. I checked the type my data in R using class(my_data_cell), no factor has been observed. I received a commond error like others did
2024 Jun 07
1
clarifying and adjusting the C API for R
Thanks for working on this Luke! We appreciate your efforts to make it easier to tell what's in the exported API and we're very happy to work with you on any changes needed to tidyverse/r-lib packages. Hadley On Thu, Jun 6, 2024 at 9:47?AM luke-tierney--- via R-devel < r-devel at r-project.org> wrote: > This is an update on some current work on the C API for use in R >
2024 Jun 09
1
clarifying and adjusting the C API for R
Thanks so much for your wonderful work, Luke! I didn't expect such a clarification to happen this soon. This is really great. For convenience, I created a quick web page to search the result of tools:::funAPI(). https://yutannihilation.github.io/R-fun-API/ Hope this helps those who are too lazy to install R-devel to check. Best, Yutani 2024?6?6?(?) 23:47 luke-tierney--- via R-devel
2009 Oct 23
1
Confusion regarding allocating Matrices.
Hi I'm having slight confusion. I plan to grow/realloc a matrix depending on the data available in a C program. Here is what I'm tried to do: Data=allocMatrix(REALSXP,3,4); SEXP Data; REAL(Data)[8]=0.001123; REAL(Data)[200000]=0.001125; printf("%f %f\n\n\n\n",REAL(Data)[8],REAL(Data)[200000]); Here is my confusion: Do I always require to allocate the exact number of data
2005 Sep 04
1
A memory management question
Can someone explain the use of SETLENGTH() and SETTRUELENGTH()? I would like to allocate a vector and reserve some space at the end, so that it appears shorter than the allocated size. So that I can more efficiently append to the vector, without requiring a new copy every time. So I'd like to use SETLENGTH() with a shorter apparent length, and bump this up as needed until I've used the
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,
2019 Jun 14
2
R C API resize matrix
Hi, Is there a way to resize a matrix defined as follows: SEXP a = PROTECT(allocMatrix(INTSXP, 10, 2)); int *pa = INTEGER(a) To row = 5 and col = 1 or do I have to allocate a second matrix "b" with pointer *pb and do a "for" loop to transfer the value of a to b? Thank you Best regards Morgan [[alternative HTML version deleted]]
2011 Jan 17
1
isoreg memory leak?
I believe there is a memory leak in isoreg in the current version of R, as I believe the following shows > gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells 120405 3.3 350000 9.4 350000 9.4 Vcells 78639 0.6 786432 6.0 392463 3.0 > for(k in 1:100) { + + y <- runif(10000) + isoreg(x,y) + } > rm(x) > rm(y) > gc() used (Mb) gc
2017 Nov 21
1
Truncating vectors by reference in C-backend
Dear all, I want to create a function shrinkVector(x) that takes x and truncates it to the first element without copy. With SETLENGTH and SET_TRUELENGTH, I can achieve that. You can find a reproducible example below. But the memory that was freed is not available for other objects afterwards, except if x is a list (VECSXP). Any suggestions? library(inline) ## define the shrinking function
2012 Dec 15
3
interfacing with .Call
Hi My code is as following: #include <R.h> #include <Rinternals.h> //* the Projector part *// void Projector(double *L, int *dimL, double *G, int *dimG, double *W, int *dimW, int *xymod, int *dimxy, double *modif, int *dimif, double *Lsum) { ...} //* the interface part *// #define getDim(A) INTEGER(coerceVector(getAttrib(A,R_DimSymbol), INTSXP)) SEXP Projector5(SEXP L, SEXP G,
2014 Dec 18
2
segfault when trying to allocate a large vector
Dear R contributors, I'm running into trouble when trying to allocate some large (but in theory viable) vector in the context of C code bound to R through .Call(). Here is some sample code summarizing the problem: SEXP test() { int size = 10000000; double largevec[size]; memset(largevec, 0, size*sizeof(double)); return(R_NilValue); } If size if small enough (up to 10^6), everything is