Thank you all for your help!
I used the function big.matrix, from a package named bigmemory, to
allocate a large matrix 50k x 50k
(http://www.inside-r.org/packages/cran/bigmemory/docs/bigmemory).
And I followed the suggestions from Sarah to do the calculations fastly!
Thank you very much!
Dear all,
I need to access data from a large matrix (48000 x 48000) and to do it
I am trying to run two loops using for command. Surely it is been a
very slow job.
I heard that for is not the best option to perform large loops in R,
but I don't really know what would be the best (fast) option
option to perform large loops in R,
but I don't really know what would be the best (fast) option. sapply?
vapply? Could anyone help me with this issue, please?
What exactly are you trying to do? It's likely doable with a few vectorized
operations.
Michael
Thank you very much for your
) and to do it
I am trying to run two loops using for command. Surely it is been a
very slow job.
I heard that for is not the best option to perform large loops in R,
but I don't really know what would be the best (fast) option. sapply?
vapply? Could anyone help me with this issue, please?
What
:
Dear all,
I need to access data from a large matrix (48000 x 48000) and to do it
I am trying to run two loops using for command. Surely it is been a
very slow job.
I heard that for is not the best option to perform large loops in R,
but I don't really know what would be the best (fast
On Tue, Dec 4, 2012 at 11:27 AM, Charles Novaes de Santana
charles.sant...@gmail.com wrote:
Dear Michael,
Thank you for your answer.
I have 2 matrices. Each position of the matrices is a weight. And I
need to calculate the following sum of differences:
Considering:
mat1 and mat2 - two
On Tue, Dec 4, 2012 at 8:43 PM, Peter Langfelder
peter.langfel...@gmail.com wrote:
On Tue, Dec 4, 2012 at 11:27 AM, Charles Novaes de Santana
charles.sant...@gmail.com wrote:
Dear Michael,
Thank you for your answer.
I have 2 matrices. Each position of the matrices is a weight. And I
need
) and to do it
I am trying to run two loops using for command. Surely it is been a
very slow job.
I heard that for is not the best option to perform large loops in R,
but I don't really know what would be the best (fast) option. sapply?
vapply? Could anyone help me with this issue, please?
What
On Tue, Dec 4, 2012 at 8:14 PM, Charles Novaes de Santana
charles.sant...@gmail.com wrote:
Error in matrix(0, 48000, 48000) : too many elements specified
but I thought it was a machine limitation (and I was asking for access
to a better machine in my labs...). Thanks for clarifying it.
Well,
I don't think there's any reason for the calculation you're doing that
you must have the whole matrix in memory, is there?
Unless there's something more than what you've shown us, you're just
taking the sum of elementwise operations. You can read the matrix in
in manageable chunks, take the sum
Subject: Re: [R] Large loops in R
Dear Michael,
Thank you for your answer.
I have 2 matrices. Each position of the matrices is a weight. And I
need to calculate the following sum of differences:
Considering:
mat1 and mat2 - two matrices (each of them 48000 x 48000).
d1 and d2 - two constant
11 matches
Mail list logo