similar to: Matrix package: writeMM

Displaying 20 results from an estimated 600 matches similar to: "Matrix package: writeMM"

2007 Jun 19
1
Matrix library error: "should never happen; please report"
Hi, I got the following error. Sorry but this time I couldn't reproduce it with a simple chunk of code: .TM.repl.i.2col(): drop 'matrix' case ... Error in .nextMethod(x = x, i = i, j = j) : 'i' has no integer column number should never happen; please report In addition: Warning messages: 1: Ambiguous method selection for "%*%", target
2007 Jan 26
2
%*% in Matrix objects
Dear R users, I need to normalize a bunch of row vectors. At a certain point I need to divide a matrix by a vector of norms. I find that the behavior of Matrix objects differs from normal matrix objects. Example the following code examples differ only in xnormed changing from normal to Matrix object: x = matrix(1:12,3,4) x = as(x, "CsparseMatrix") xnorms = sqrt(colSums(x^2))
2016 Apr 20
0
Matrix: How create a _row-oriented_ sparse Matrix (=dgRMatrix)?
>>>>> Henrik Bengtsson <henrik.bengtsson at gmail.com> >>>>> on Tue, 19 Apr 2016 14:04:11 -0700 writes: > Using the Matrix package, how can I create a row-oriented sparse > Matrix from scratch populated with some data? By default a > column-oriented one is created and I'm aware of the note that the > package is optimized for
2007 Jan 23
3
[fixed] vectorized nested loop: apply a function that takes two rows
(Extremely sorry, disregard previous email as I hit send before pasting the latest version of the example; this one is smaller too) Dear R users, I want to apply a function that takes two vectors as input to all pairs (combinations (nrow(X), 2))of matrix rows in a matrix. I know that ideally, one should avoid loops in R, but after reading the docs for do.call, apply, etc, I still don't know
2007 Jan 23
3
[fixed] vectorized nested loop: apply a function that takes two rows
(Extremely sorry, disregard previous email as I hit send before pasting the latest version of the example; this one is smaller too) Dear R users, I want to apply a function that takes two vectors as input to all pairs (combinations (nrow(X), 2))of matrix rows in a matrix. I know that ideally, one should avoid loops in R, but after reading the docs for do.call, apply, etc, I still don't know
2007 Apr 16
1
colSum() in Matrix objects
Hi, I'd like to simply add column-wise using Matrix objects (Csparse). It looks like one can apply mosty any base function to these objects (i.e., apply, colSums), but there is a nasty conversion to traditional matrix objects if one does that. Is there any workaround? I can see colSum listed in the help for Class 'CsparseMatrix' , but I wonder whether I'm using the default
2017 Nov 20
2
package check fail on Windows-release only?
I mistakenly left a write in "/tmp" in the rockchalk package (version 1.8.109) that I uploaded last Friday. Kurt H wrote and asked me to fix today. While uploading a new one, I became aware of a problem I had not seen. The version I uploaded last Friday, 1.8.109, has OK status on all platforms except r-release-windows-ix86+x86_64. I get OK on oldrel-windows and also on devel-windows.
2016 Apr 19
2
Matrix: How create a _row-oriented_ sparse Matrix (=dgRMatrix)?
Using the Matrix package, how can I create a row-oriented sparse Matrix from scratch populated with some data? By default a column-oriented one is created and I'm aware of the note that the package is optimized for column-oriented ones, but I'm only interested in using it for holding my sparse row-oriented data and doing basic subsetting by rows (even using drop=FALSE). Here is what I
2012 Jan 18
1
kmeans clustering on large but sparse matrix
Hi, I have a 60k*600k matrix, which exceed the vector length limit of 2^32-1. But it's rather sparse, only 0.02% has value. So I save is as MarketMatrix (mm) file, it's about 300M in size. I use readMM in Matrix package to read it in. If do so, the data type becomes dgTMatrix in 'Matrix' package instead of the common matrix type. The problem is, if I run k-means only on part of
2007 May 07
3
like apply(x,1,sum), but using multiplication?
Hi, I need to multiply all columns in a matrix so something like apply(x,2,sum), but using multiplication should do. I have tried apply(x,2,"*") I know this must be trivial, but I get: Error in FUN(newX[, i], ...) : invalid unary operator The help for apply states that unary operators must be quoted. I tried single quotes too, with the same results. Thanks, -Jose -- Jose
2009 Oct 24
1
operations on sparse matrices, and dense intermediary steps
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I'm doing some basic operations on large sparse matrices, for example getting a row. it takes close to 30 seconds on a 3Ghz machine, and shots the memory usage up to the sky. I suspect there are dense intermediary steps (which, if true would defeat the purpose of trying to use sparse representaitons). As much as I try understanding the
2006 Apr 27
3
gmane?
Hi All, I recently found gmane http://gmane.org/ It's a system to covert mail to news and back, with the nice property of keeping a searchable archive... Very convenient if you are subscribed to many lists and don't want to have your mail box cluttered. I use it to read several mailing lists already, but R is not available there. I wonder if the admins know about gmane and if they
2007 Jan 23
0
vectorized nested loop: apply a function that takes two rows
Dear R users, I want to apply a function that takes two vectors as input to all pairs (combinations (nrow(X), 2))of matrix rows in a matrix. I know that ideally, one should avoid loops in R, but after reading the docs for do.call, apply, etc, I still don't know how to write the nested loop in a vectorized way. Example data: x = matrix(rnorm(1000), 100, 100) zeros = runif(90) x[] # this is
2004 Dec 01
2
rank in descending order?
Hi, Is there any simple solution to get ranks in descending order? Example, a <- c(10, 98, 98, 98, 99, 100) r <- rank(a, ties.method="average") produces 1 3 3 3 5 6 I would want this instead: 6 5 3 3 3 1 Note that reversing r doesn't work but in small examples. Thanks, -Jose -- jquesada at andrew.cmu.edu Research associate http://lsa.colorado.edu/~quesadaj Dept. of
2008 Dec 06
1
R vs Python performance-wise
Hi, Has anyone run any R vs Python (numpy) tests? I'd love to see what the differences performance-wise are, specially handling large sparse matrices. Since both rely on external C code, there might not be much of a difference. If you know and use both languages, what are the main differences and what made you stick to one over another? I also noticed that there are strong libraries
2016 Jan 04
2
R, AIX 64-bit builds - trying to understand root cause for message: "Error: Line starting 'Package: tools ...' is malformed!"
The bulk is on my forums - the final post for today is: Results to date: A. It looks like I am going to need a newer compiler for C - xlc/xlC V11 apparently does not understand this code: "/data/prj/cran/R-3.2.3/src/main/memory.c", line 2149.31: 1506-046 (S) Syntax error. I will have to check if R-devel has different code before asking for assistence. +2139 #ifdef
2007 Jul 16
1
R equivalent to Matlab's Bayes net toolbox
Hi, I'm attending summer School at UCLA (IPAM) on "probabilistics models of cognition". I have been an R-user since v. 1.4.1, but was trained in the frequentist tradition (as most psychologists!). I found that all faculty here use matlab and Murphy's bayes net toolbox. I have not had the need to use matlab before, and would love to stick to R for graphics models and
2017 Nov 21
0
package check fail on Windows-release only?
>>>>> Paul Johnson <pauljohn32 at gmail.com> >>>>> on Mon, 20 Nov 2017 14:59:26 -0600 writes: > I mistakenly left a write in "/tmp" in the rockchalk package (version > 1.8.109) that I uploaded last Friday. Kurt H wrote and asked me to fix > today. > While uploading a new one, I became aware of a problem I had not seen.
2006 Jul 09
1
package:Matrix handling of data with identical indices
In the Matrix package v. 0.995-11 I see that the dgTMatrix Class for compressed, sparse, triplet-form matrices handles Identically indexed data instances by summing their values, e.g., library(Matrix) (Mt <- new("dgTMatrix", i = as.integer(c(0,0,1,1,4)), j = as.integer(c(0,1,2,2,4)), x = as.double(1:5), Dim = as.integer(c(5,5)))) ## 5 x 5 sparse Matrix of class
2006 Jul 09
1
package:Matrix handling of data with identical indices
In the Matrix package v. 0.995-11 I see that the dgTMatrix Class for compressed, sparse, triplet-form matrices handles Identically indexed data instances by summing their values, e.g., library(Matrix) (Mt <- new("dgTMatrix", i = as.integer(c(0,0,1,1,4)), j = as.integer(c(0,1,2,2,4)), x = as.double(1:5), Dim = as.integer(c(5,5)))) ## 5 x 5 sparse Matrix of class