similar to: max size of a matrix

Displaying 20 results from an estimated 1000 matches similar to: "max size of a matrix"

2008 Aug 11
6
number of an element in a matrix
Hi, I wonder if there is any function which gives the number of times which an element is repeated in the matrix. Let say there is a matrix, I would like to find out how many times number 2 has been repeated in the matrix, or in other words, how many elements of the matrix are equal 2. Thanks for your help, Rostam [[alternative HTML version deleted]]
2008 Aug 12
1
converting rgb() output to 0-255
Hi, I have three matrices, Red, Green and Blue. I would like to produce a matrix which is the combined values of Red, Green and Blue matrices. I know rgb() does the job, but the values are not between 0-255, they are in the following format: "#2C312C" I would like to have the values between 0-255. I wonder if you could tell me what I can do... Thanks for your help, Rostam
2008 Aug 01
1
creating image using RGB values
Hi R users, I would like to create an image using three matrices which contain the values of Red, Green, and Blue of each pixel, i.e. one matrix which has values of red, one which has values of green, and one which has values of blue. The values are between 0 and 1 instead of 0-255. I have obtained the matrices using the getChannels of pixmap library. I wonder if anyone knows how to create the
2008 Sep 04
1
showing the image
Hi everyone, I have a matrix containing color values of an image same as following, [1,] "#444444" "#444444" "#434343" "#404040" "#3D3D3D" "#3D3D3D" "#3E3E3E" [2,] "#414141" "#414141" "#414141" "#404040" "#3F3F3F" "#3F3F3F" "#3F3F3F" [3,] "#3E3E3E"
2008 Nov 14
1
running r script in windows command line
Hi, I would like to run a saved script in windows command line. Some command which takes the filename as an argument, and runs it in R. Thanks, Rostam [[alternative HTML version deleted]]
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
2008 Aug 14
0
bmp
Hi R users, I already had post this question under the title of bmp header, there was a mistake in my post. The following is the same post without the mistake. Thanks Rostam I have a xml file. A value of one of the nodes of the xml file is a bmp image encoded in base64. I would like to read this image by R. I think I should do the following steps: 1. Decoding it from base64 to binary. 2.
2004 Feb 11
1
.Call setAttrib(ans,R_DimSymbol,dim); Crashes.
Hi! I want to return a matrix. The code does the R interfacing. This version does it fine. SEXP ans,dim; PROTECT(ans = NEW_NUMERIC(count*2)); memcpy(NUMERIC_POINTER(ans),result,count*sizeof(double)); memcpy(&(NUMERIC_POINTER(ans)[count]),occur,count*sizeof(double)); /** PROTECT(dim=NEW_INTEGER(2)); INTEGER_POINTER(dim)[0]=2; INTEGER_POINTER(dim)[1]=count;
2004 Jun 16
1
off topic: C/C++ codes for pseudo inverse
Hi, I am looking for C/C++ codes for computing generalized inverse of a matrix. Can anyone help me in this regard? Thanks, Mahbub.
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
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]]
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,
2011 Mar 29
7
Error en cor, too many elements specified
Hola, tengo una serie de datos datExpr, al usar cor() : cor(datExpr ,method = "pearson", use ="pairwise.complete.obs") me da el siguiente error allocMatrix: too many elements specified Trate con "complete.obs", "na.or.complete", y el resto de las opciones para "use", pero siempre me da algun error.  ¿Alguna idea de como puedo hacer que cor() lea
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
2011 Nov 01
1
reducing a too-large matrix obtained with allocMatrix()
Hello, I have some C code (for a shared lib called via .External) that uses PROTECT(w= allocMatrix(REALSXP, m, n)); mostly successfully. In rare cases, though, the row count m will be an overestimate. Is there a way to reallocate the matrix in-place, something like reAllocMatrix (w,m-excess,n) /* where excess is > 0 */ to chop off the last excess rows of w? I only find out about the
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,
2002 Dec 18
2
meta analysis
Dear R-lister, is there any function for Meta Analysis in R? (like homogeneity an, risk differences, relative riskm amd odds ratios? Many thanks, Edwin
2013 Apr 09
2
Behaviors of diag() with character vector in R 3.0.0
Dear all, According to CHANGES IN R 3.0.0: o diag() as used to generate a diagonal matrix has been re-written in C for speed and less memory usage. It now forces the result to be numeric in the case diag(x) since it is said to have 'zero off-diagonal entries'. diag(x) does not work for character vector in R 3.0.0 any more. For example, v <- c("a",
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