, d=d)
}
#
--
View this message in context:
http://r.789695.n4.nabble.com/writing-spdiags-function-for-R-tp4552626p4675010.html
Sent from the R help mailing list archive at Nabble.com
would still be
there, even fixing the dimensionality issue.
I really hope somebody out there can help me to figure this out.
thanks a lot for your precious time and attention,
Moreno
--
View this message in context:
http://r.789695.n4.nabble.com/writing-spdiags-function-for-R-tp4552626p4674540
Hi Ben,
A couple of quick comments:
the semicolons at the end of each line are unnecessary (they're
harmless, but considered bad style -- most common in code of C and
MATLAB coders
yes, I know, just forgot to clean it up after translating :)
You don't need to source(getband.R) inside
Hi Ben,
thank you soo much:) your code worked, and we
managed to halven computing time.
I am copying below the final version of the function,
if anybody is willing to use/improve it.
thanks again,
Moreno
###
spdiags = function(A){
On 12-04-16 09:32 PM, Moreno I. Coco wrote:
Hi Ben,
thank you soo much:) your code worked, and we
managed to halven computing time.
I am copying below the final version of the function,
if anybody is willing to use/improve it.
thanks again,
Moreno
A couple of quick comments:
the
Moreno I. Coco M.I.Coco at sms.ed.ac.uk writes:
[snip snip snip]
So, I have written my own spdiags function (below); following
also a suggestion in an old, and perhaps unique post, about
this issue.
It works only for square matrices (that's my need), however I
have a couple of issues,
Ben Bolker bbolker at gmail.com writes:
I'm not quite sure how to do it, but I think you should look
at the ?band function in Matrix. In combination with diag() of a
suitably truncated matrix, you should be able to extract bands
of sparse matrices efficiently ...
getband -
Dear R-list,
I am in the process of translating a long function written in Matlab
into R (mainly because I am a big of fan of R, and folks will not
have to pay to use it :). In the translation of this function
I got stack because they use spdiags, which, as far as I can tell
it is not available
8 matches
Mail list logo