similar to: Combining two matrices

Displaying 20 results from an estimated 11000 matches similar to: "Combining two matrices"

2009 Jul 20
3
Write in file matrices of sifferent size
Hi list, How to save a list content into a text file? Please consider example below, I have two numeric matrices that I bundle into a list & give each list element a name Example: > matrixA <- matrix(0,5,4) > matrixB <- matrix(1,7,13) > matrixList <- list(matrixA,matrixB) > names <- c("Matrix A","Matrix B") > names <-
2017 Mar 20
1
Fwd: Possible memory problems with mallloc when called with .C()
Hello, I'm trying to calculate a certain distance estimator for my thesis. I have a program in C that works fine when I call it with .C() in R, but since I'm dealing with big matrices like 30000x20000 it was getting a stack overflow. Now I have the same program but more efficeintly coded using malloc, and it works perfectlry in C, compiles well with R CMD SHLIB but when I call it with
2007 Dec 31
1
help with matrix
Hi, dear all: I am a beginner. I appreciate any help or hint from you. I am trying to do calculation with matrices. I have 3 matrices. One is matrixA, 2nd is matrixB, and last is matrixC. Here is matrixA: 1.8511.40.0831.001 0.8771.30.1161.33 1.9021.21.1020.302 0.8640.1261.110.252 1.8230.2161.0020.307 Next is matrixB: 0.8761.770.1930.328 0.8911.0090.2381.004
2005 Nov 21
2
Removing Rows
I have a data frame with the following dimensions 217 x 5 I want to create two data frames from the original. 1) One containing every tenth row of the original data frame 2) Other containing the rest of the rows. How do I do this? I've tried subset() and calling the index. thank you in advance, [[alternative HTML version deleted]]
2009 Nov 25
1
help writing for loop
Hi, I?d like to ask for some help in writing a loop. My situation is the following: I have a matrix (matrix.A) containing 3 columns and 100 rows. The columns represent parameter estimates a, b, and c. The rows contain different values for these parameter estimates. Each row is unique. I want to insert these parameter estimates into a model (say, y = a + bx + cx^2) and solve for y given a
2006 May 22
2
Matrix in 3D
Dear R Users, Is it possible to add another (third) index to matrix (as in MATLAB). For some analysis e.g. finite mixture models is necessary. Simple example i<-3 matrix[, , i]<-matrixA[, ,i]%*%matrixB[, , i] I would appreciate any help Rob
2005 Jul 26
1
Help on T test
ok I created a matrix C with A B C A1 B1 C1 .................................. ................................. the columns contain the gene expression values.. I ran the following t.test: apply(C, 1, function(x) t.test( x[1:3], x[4,6] )$p.value ) which outputs out 16063 pvalues (the number of rows) I just want to output 3 pvalues showing if A's column is different from A1
2009 Aug 24
6
Combining matrices
If I have two matrices like x <- matrix(rep(c(1,2,3),3),3) y <- matrix(rep(c(4,5,6),3),3) How can I combine them to get ? 1 1 1 4 4 4 1 1 1 5 5 5 1 1 1 6 6 6 2 2 2 4 4 4 2 2 2 5 5 5 2 2 2 6 6 6 3 3 3 4 4 4 3 3 3 5 5 5 3 3 3 6 6 6 The number of rows and the actual numbers above are unimportant, they are given so as to illustrate how I want to combine the matrices. I.e., I am looking for
2005 Aug 17
2
Classifying values in vector
I have a vector of size 217 called "A". the values of A are not sorted and range from 0 to 1 (normalized) I am having difficulty writing a program to create a new vector "B" where if A's value is 0< A <=0.333 then B is 0 if A's value is 0.333< A <=0.666 then B is 1 if A's value is 0.666< A <=1 then B is 2 so if A is 0.22 0.999 0.444 0 B would
2006 Mar 07
7
reading in only one column from text file
How do I manipulate the read.table function to read in only the 2nd column??? [[alternative HTML version deleted]]
2019 Apr 17
2
Disable combining of loads and stores in instcombine
> Why do you want this? The goal is to share arrays between multiple tiles on a manycore architecture by splitting arrays between tiles. With a DRF memory model, it makes sense to elide multiple loads to the same memory location between barriers.; IIRC the semantics for volatile don’t allow this eliding. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2008 Aug 02
2
Iterative Averages
Dear all, I have a data frame of 2160 rows and 4320 columns, which I hope to condense to a smaller dataset by finding averages of 6 by 6 blocks of values (to produce a data frame of 360 rows by 720 columns). How would I go about finding the mean of a 6 x 6 block, then find the mean of the next adjacent 6 x 6 block, and so on, until the whole data frame has been covered? One slight twist is that
2019 Apr 17
5
Disable combining of loads and stores in instcombine
> On Apr 17, 2019, at 5:02 AM, Arsenault, Matthew via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > This won’t happen with volatile load/store This is mostly true today, but AFAICT the LLVM memory model doesn’t actually offer this guarantee. It merely says that LLVM treats volatile like C / C++ treats volatile… which isn’t much of a guarantee because C / C++ volatile doesn’t
2006 Apr 02
2
VARIANCE across each ROW
I have a very large matrix. I would like to display the variance across each row. In other words, I want to output a vector containing the values of variance across row. When I use the function var(), it seems to give me the variability of each column. Any ideas?? [[alternative HTML version deleted]]
2019 Apr 17
1
Disable combining of loads and stores in instcombine
> But why is it desirable to avoid combining adjacent stores? If you’ve got DRF code then the combination can’t be observed. It’s more that the consecutive stores would be going to different tiles. If multiple stores are combined in IR, I don’t think they’d be able to decoupled in IR, unless there’s a way to always determine which global object an arbitrary GEP is pointing to. --------------
2006 Mar 21
3
ROWNAMES error message
I am getting an error message, which I do not know the source to. I have a matrix SAMPLES that has preexisting rownames that I would like to change. GENE_NAMES contains these rownames. > rownames(SAMPLES) = GENE_NAMES Error in "dimnames<-.data.frame"(`*tmp*`, value = list(list(V1 = c(3843, : invalid 'dimnames' given for data frame > dim(SAMPLES) [1] 12626
2006 Mar 16
6
removing ROWS with missing values
I am trying to find out if R can recognize specific criteria for removing rows (i.e. a prexisting function) I have a matrix myMatrix that is 12000 by 20 I would like to remove rows from myMatrix that have: -999 across all columns -999 across all columns but one -999 across all columns but two -999 across all columns but three -999 across all columns but four -999 across all columns but five
2003 Jul 17
1
R matrices in memory
Acording to the documentation in gsl "The physical row dimension tda, or trailing dimension, specifies the size of a row of the matrix as laid out in memory" I think that if I pass a matrix to C++ through .C as single ( or.double ), that is, .C ( as.single ( matrix )) then the tda is simply the number of elements of that matrix. Am I right? Thank you.
2005 Oct 24
0
error messages in matrix multiplication
Hello, I am hoping for some advice on using R - my experience with statistical programs has been limited to SPSS. I have been using a textual analysis program and wanted to add some rigour to making a choice between two models of self-reported cannabis effects. To do this, I need to compare the two resulting word co-occurence matrices. The program itself,doesn't offer this as an option
2019 Apr 17
2
Disable combining of loads and stores in instcombine
So, volatile’s been a fine solution — the issue is volatile pointers would perform the load every time; ideally memory accesses would be able to be cached. This is why I’ve been leaning towards disabling the part of instcombine that combines memory accesses instead of using volatile — there should be better performance. On Apr 17, 2019, 9:54 AM -0700, Jameson Nash <vtjnash at gmail.com>,