search for: submatrixes

Displaying 20 results from an estimated 56 matches for "submatrixes".

Did you mean: submatrices
2016 Jun 25
2
strange behavior in 'inherits' check for loaded S4 object
Hi, (sorry for the wall of text; the issue here appears to be rather complicated) I'm seeing a somewhat strange case where checking whether an S4 object inherits from a parent class defined from another package with 'inherits' fails if that object is materialized through a call to 'load'. That's a mouthful, so I've put together a relatively small reproducible example
2010 Mar 29
4
Confusing concept of vector and matrix in R
Why does R need the concept of "Vector"? In my opinion, it is a useless and confusing concept. A vector is simply a special case of a matrix whose row or column number is equal to 1. When I take submatrix from one matrix and if row or column number is 1, R will automatically convert it into a vector. It is very straightforward that a submatrix of a matrix should be a matrix. In
2004 Nov 04
3
keep dimension of a sub matrix
Hi, is there any way to keep a sub matrix dimension? exemple : i1<-1; i2<-1 j1<-2; j2<-3; ret <-matrix(1,4,4)[i1:i2,j1:j2] ; dim(ret) is NULL because the submatrix single col or single row is coerce to a vector automaticaly. How can i bypass this cast : submatrix->vector ??????? Thank you. --------------------------------- [[alternative HTML version
2003 Oct 13
2
colnames from submatrix?
Hi R-Wizards: I've looking through the R docs and have yet to find what I'm looking for and have tried a few intermediate steps to now avail yet and rather than spend another few hours looking for the solution, I figured I would post a message. I have a matrix (actually a set of them) that I want to pull all the names of the non-zero columns into a vector/list for further processing:
2016 Jul 29
2
strange behavior in 'inherits' check for loaded S4 object
I should add one more item that may be related here -- calling 'methods:::.requirePackage' returns a different result based on whether the package namespace is already loaded or not. If the package namespace is not loaded, the package is loaded and attached, and the package environment is returned: > methods:::.requirePackage("digest") Loading required package:
2016 Jul 29
0
strange behavior in 'inherits' check for loaded S4 object
I have a small idea as to what's going on now; at least, why exporting the class resolves this particular issue. Firstly, when an S4 class is not exported, the associated '.__C__<class>' object is not made part of the package environment. For example, I see: > getAnywhere(".__C__SubMatrix") A single object matching '.__C__SubMatrix' was found It
2012 Aug 23
1
Why was my R process killed spontaneously?
I tried to use gpuCor function in the gputools package of R to calcuate the pairwise correlations of a matrix of 40,000 columns. Becuase there would be memory issues if I use the whole matrix at a time, I splitted the matrix into submatrix of 10,000 columns and then calculate the pairwise correlation of different submatrices. There are altogether 4 submatrices, so I need to calculate the pearson
2004 Sep 15
2
efficient submatrix extraction
Hi, I have a matrix of say 1024x1024 and I want to look at it in chunks. That is I'd like to divide into a series of submatrices of order 2x2. | 1 2 3 4 5 6 7 8 ... | | 1 2 3 4 5 6 7 8 ... | | 1 2 3 4 5 6 7 8 ... | | 1 2 3 4 5 6 7 8 ... | ... So the first submatrix would be | 1 2 | | 1 2 | the second one would be | 3 4 | | 3 4 | and so on. That is I want the matrix to be evenly divided
2000 Feb 11
1
Creating efficiently a subset of a matrix
Dear R-helpers I have the following problem: given a m x n matrix A, I want to have just a m x k submatrix B, with B[i,] = A[i, offset[i] + 1:k], e.g. from > offset <- c(0, 0, 1) > a <- matrix(1:9, 3) > a [,1] [,2] [,3] [1,] 1 4 7 [2,] 2 5 8 [3,] 3 6 9 the submatrix b 1 4 2 5 6 9 I can do this with a for loop or with sapply > b <-
2004 Dec 17
2
Matrix and rownames problem
Hi, I'm quite new to R, so excuse me if this problem has a simple solution. I'm working with an array, lets say i <- array(c(1:3,3:1), dim=c(3,2)) Then I want to give the rows and the columns names: rownames(i)<-c("a","b","c") colnames(i)<-c("d","e") The result is given below: d e a 1 3 b 2 2 c 3 1 Here comes my problem.
2016 Jul 31
2
strange behavior in 'inherits' check for loaded S4 object
(Just returning from the "wilds" of Canada, so not able to comment on the specifics, but ...) There is a basic point about generic functions that may be related to the "private" class question and my earlier remarks that Martin alluded to. R (and S4 before it) allows packages to define methods for a generic function in another package. Say, for plot() in graphics. The
2007 Feb 09
1
extract submatrix with unique names
Dear list, I have a table where first 3 columns are identical if the name in the first column is the same, and the number in N4 is slightly different for all identical names, like this: ------------------------------------------------------------------- 29 Mm.1_at 3 + 93649936 30 Mm.1_at 3 + 93649990 31 Mm.1_at 3 + 93649993 32
2002 Oct 10
2
tapply for matrices
Does anyone have something like tapply that is extremely fast for matrices when there is a very large number of levels of the grouping variable? I'm referring to, for example, tapply(x, grouping.variable, function.operating.on.submatrix) where x is a matrix and the submatrix is a subset of the rows of x. The grouping variable's length equals the number of rows of x. -- Frank E
2004 Feb 09
5
simple question on picking out some rows of a matrix/data frame
Hi, I have a simple question about matrix/data frame manipulation. I have a data frame that looks a something like this X Y Z 1 0 "apples" -1 -1 "oranges" ... 0 -1 "bananas" and I'd like to pull out all the rows for which X and Y are (un)equal into a submatrix. How can I do that? Many thanks, Roger Levy
2016 Jul 30
0
strange behavior in 'inherits' check for loaded S4 object
>>>>> Kevin Ushey <kevinushey at gmail.com> >>>>> on Fri, 29 Jul 2016 11:46:19 -0700 writes: > I should add one more item that may be related here -- > calling 'methods:::.requirePackage' returns a different > result based on whether the package namespace is already > loaded or not. > If the package namespace is
2009 Jun 02
2
bigmemory - extracting submatrix from big.matrix object
I am using the library(bigmemory) to handle large datasets, say 1 GB, and facing following problems. Any hints from anybody can be helpful. _Problem-1: _ I am using "read.big.matrix" function to create a filebacked big matrix of my data and get the following warning: > x = read.big.matrix("/home/utkarsh.s/data.csv",header=T,type="double",shared=T,backingfile
2007 Apr 25
1
for loops
Hello everybody I'm very new at using R so probably this is a very stupid question. I have a matrix of "p" columns and I have to calculate for each of them the "two sample t-statistic" and p-value and to save the results into two different vectors. I have divided my matrix into two submatrices: submatrix A containing the first "n1" rows (p columns) and submatrix B
2007 Oct 15
2
Get data from matrix
Hi, I have a matrix that has a variable number of columns. I do not know, a priori, the number of columns. How can I get a sub matrix, for example, from row 10 to the end of the columns? In MatLab I would use something like this: SubMatrix = Matrix[10, 1:end] Thanks a lot. -- View this message in context: http://www.nabble.com/Get-data-from-matrix-tf4629336.html#a13218653 Sent from the R
2016 Aug 02
0
strange behavior in 'inherits' check for loaded S4 object
Hi Martin, John, Thanks for the responses! I've tidied up some of the notes from this mailing list thread and posted them on the bug tracker. John, in this case, I think namespaces are relevant because for non-exported S4 classes, the class information is made available through the '.__C__<package>' symbol in the package's namespace, but not the package environment that
2010 Jan 18
1
Sub-matrixes that are linked to the "Base matrix"
Hello, I'm am in the process of trying to port a RATS functions to R and have the problem, that RATS allows for the creation of submatrixes that are linked to their basematrix. Basically it should work like this: a = matrix(1:(4*3),4,3) a # [,1] [,2] [,3] # [1,] 1 5 9 # [2,] 2 6 10 # [3,] 3 7 11 # [4,] 4 8 12 # This of course doesnt work :) b = submatrix(a,fromx=1,tox=2,fromy=1,toy=2) b # [...