Displaying 20 results from an estimated 600 matches similar to: "Matrix: How create a _row-oriented_ sparse Matrix (=dgRMatrix)?"
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
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 May 03
1
Issue with the Matrix package
Hi all,
I am wondering if this is a bug in the Matrix package or if it something
that I am just getting wrong...here is an example:
> m = matrix(0,4,4)
> dimnames(m) = list(letters[1:4], letters[5:8])
> r = c("a","b","a","d")
> m[r,2] = 1
> m
e f g h
a 0 1 0 0
b 0 1 0 0
c 0 0 0 0
d 0 1 0 0
> M = Matrix(0,4,4)
> dimnames(M) =
2009 Jan 20
1
Creating a Sparse Matrix from a Sparse Vector
Hello,
I am working with a sparse matrix that is approx. 13,900 by 14,100. My
goal is to select a row out of the matrix and create a new matrix with that
row repeated 13,900 times without having to do any looping. Example:
Starting Matrix:
exampleMatrix
3 x 4 sparse Matrix of class "dgCMatrix"
[1,] 1 . . .
[2,] . 1 . 0.5
[3,] . . 1 ..
New Matrix:..
newExampleMatrix
3 x 4 sparse
2009 Feb 11
1
Problem with R using pgi compiler on x86_64
Hi,
we have installed R-2.8.1 using the current pgi compiler (8.0.2) for
AMD64 on a SLES9 system.
When I try to install "Matrix" everything is fine until the last step.
make[1]: Leaving directory `/tmp/R.INSTALL.TW3399/Matrix/src/AMD'
pgCC -L/usr/lib64 -L/usr/X11R6/lib64 -pgf90libs -o Matrix.so
CHMfactor.o Csparse.o TMatrix_as.o Tsparse.o init.o Mutils.o
chm_common.o
2009 Aug 26
1
Problem with standard generic methods in Matrix package
I have posted this message on r-lang, but it is perhaps more appropriate
on r-devel:
---
Hello,
I'm puzzled by a problem with call to diag(), rowSums(), rownames() on
objects of class "dgtMatrix", created by sparseMatrix() or spMatrix().
I use Matrix 0.999375-30.
The weird thing is that I don't encounter any problem when I use this
functions on the R prompt, or
2010 Dec 01
1
Install package 'Matrix' problem
64-bit R-2.12.0 was installed on Sun SPARC Solaris 10. Compiler used is solstudio12.2. Attached is the configure script.
I then tried to install a recommended package called Matrix. The compilation failed with the following messages,
.......
CC -library=stlport4 -G -L/opt/csw/lib/sparcv9 -L/opt/solstudio12.2/prod/lib/v9 -o Matrix.so CHMfactor.o Csparse.o TMatrix_as.o Tsparse.o init.o Mutils.o
2009 Feb 21
1
R-devel/Linux x64/Sun Studio 12: Problem with Matrix
Dear Developers,
motivated by the new Sun Studio checks I compiled R-devel and several of
our packages with Sun Studio 12 on Fedora x64.
Everything worked fine and R-devel runs, with the exception of package
Matrix where compilation crashes with the following message. The error
occurs during building of the recommended packages and also if Matrix is
compiled separately:
[...]
CC -G -lCstd
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
2009 Feb 11
1
Compiling Matrix on Solaris 10 x86-64 Sun Studio 12
Hi all,
I have trouble to compile Matrix packages on Solar10 x86-64 with Sun compilers.
I saw some postings on this but am not sure how to solve this problem.
It is becoming critical as I cannot install biocLite() because of its dependency on Matrix.
Could you direct me how to resolve the issue?
Thanks in advance!
Dongseok
R version 2.8.1 (2008-12-22)
Copyright (C) 2008 The R Foundation for
2020 Jul 21
2
trivial typo in ?Matrix::sparse.model.matrix.Rd
? "form" -> "from". Diff against latest SVN:
Index: sparse.model.matrix.Rd
===================================================================
--- sparse.model.matrix.Rd??? (revision 3336)
+++ sparse.model.matrix.Rd??? (working copy)
@@ -4,7 +4,7 @@
?\alias{fac2sparse}
?\alias{fac2Sparse}
?\description{Construct a sparse model or \dQuote{design} matrix,
-? form a formula
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.
2017 Oct 21
1
What exactly is an dgCMatrix-class. There are so many attributes.
> On Oct 21, 2017, at 7:50 AM, Martin Maechler <maechler at stat.math.ethz.ch> wrote:
>
>>>>>> C W <tmrsg11 at gmail.com>
>>>>>> on Fri, 20 Oct 2017 15:51:16 -0400 writes:
>
>> Thank you for your responses. I guess I don't feel
>> alone. I don't find the documentation go into any detail.
>
>> I also find
2006 Dec 19
1
preserving sparse matrices (Matrix)
Hi,
I have sparse (tridiagonal) matrices, and I use the Matrix package for
handling them. For certain computations, I need to either set the
first row to zero, or double the last row. I find that neither
operation preserves sparsity, eg
> m <- Diagonal(5)
> m
5 x 5 diagonal matrix of class "ddiMatrix"
[,1] [,2] [,3] [,4] [,5]
[1,] 1 . . . .
[2,] . 1
2017 Oct 21
0
What exactly is an dgCMatrix-class. There are so many attributes.
>>>>> C W <tmrsg11 at gmail.com>
>>>>> on Fri, 20 Oct 2017 15:51:16 -0400 writes:
> Thank you for your responses. I guess I don't feel
> alone. I don't find the documentation go into any detail.
> I also find it surprising that,
>> object.size(train$data)
> 1730904 bytes
>>
2017 Oct 20
4
What exactly is an dgCMatrix-class. There are so many attributes.
Thank you for your responses.
I guess I don't feel alone. I don't find the documentation go into any
detail.
I also find it surprising that,
> object.size(train$data)
1730904 bytes
> object.size(as.matrix(train$data))
6575016 bytes
the dgCMatrix actually takes less memory, though it *looks* like the
opposite.
Cheers!
On Fri, Oct 20, 2017 at 3:22 PM, David Winsemius
2007 May 15
1
Matrix package: writeMM
Hi,
I'm finding that readMM() cannot read a file written with writeMM().
Example:
library(Matrix)
a = Matrix(c(1,0,3,0,0,5), 10, 10)
a = as(a, "CsparseMatrix")
writeMM(a, "kk.mm")
b = readMM("kk.mm")
Error in validObject(.Object) : invalid class "dgTMatrix" object: all row
indices must be between 0 and nrow-1
Thoughts?
Thanks,
-Jose
--
Jose
2006 Jul 06
1
Warning while subsetting using Matrix package
Hello,
Could someone please explain the following warning while subsetting in
the Matrix package?
Thanks,
John Thaden, PhD
U. Arkansas for Med. Sci.
Little Rock AR USA
> # In the Matrix package...
> library("Matrix")
> # ...I had previously created a sparse matrix in triplet form:
> str(x)
Formal class 'dgTMatrix' [package "Matrix"] with 6 slots
..@ i
2011 Dec 20
1
column permutation of sparse matrix
Hi,
I'm very new to working with sparse matrices and would like to know how I
can column permute a sparse matrix. Here is a small example:
> M1 <-
> spMatrix(nrow=5,ncol=6,i=sample(5,15,replace=TRUE),j=sample(6,15,replace=TRUE),x=round_any(rnorm(15,2),0.001))
> M1
5 x 6 sparse Matrix of class "dgTMatrix"
[1,] 2.983 . 1.656 5.003 . .
[2,] .