I am able to create a coordinate list sparse matrix this way:
r = c(1,2,2,3,3)
c = c(4,1,2,3,5)
v = c(1,2,1,3,1)
a = sparseMatrix(i=r,j=c,x=v)
However, this results in an object that looks like this:
a
3 x 5 sparse Matrix of class dgCMatrix
[1,] . . . 1 .
[2,] 2 1 . . .
Is there a way to get the coordinate list vectors back from the matrix a
without any prior knowledge?
a
[,1] [,2] [,3] [,4] [,5]
[1,]00010
[2,]21000
[3,]00301
How to get:
r = c(1,2,2,3,3)
c = c(4,1,2,3,5)
v = c(1,2,1,3,1)
I have a 9 GB RAM Windows Vista machine.
I installed the 64-bit version of R 2.11.1 for Windows from here:
http://cran.r-project.org/bin/windows64/base/
I am running a program now in R. However, looking at Windows Task Manager, I
see that Rgui.exe is only using 12% of CPU and 191,900K of
I am running Mac OS X version 10.6.3. I am running R 2.11.1 GUI 1.34 64 bit.
I have RPostgreSQL 0.1-6 (as RPostgreSQL_0.1-6.tar) from this site:
http://mac.softpedia.com/get/Developer-Tools/RPostgresql.shtml
I have PostgreSQL version 8.4.4-1 for Mac OS X from this site:
This is my first post. I am running Mac OS X version 10.6.3. I am running R
2.11.0 GUI 1.33 64 bit.
This may or may not be related to sqldf, but I experienced this problem while
attempting to use an sqldf query. The same code runs with no problem on my
Windows machine. Here is what
5 matches
Mail list logo