anna <lippelanna24 <at> hotmail.com> writes: > > Hello my friends, > here is a code I wrote with no loops on matrix that is taking too long (2 > seconds and I call him 720 times --> 12 minutes): > > mat1 and mat2 are both matrix with 103 columns and 164 rows.
Could you provide some example code creating matrices mat1 and mat2 which have exactly the same structure as the mat1 and mat2 you are using. We don't really want your exact data, but just toy matrices that have exactly the same form as your data matrices. Without that your question's hard to answer as we can't try out your code. failing that, please post the output of str(mat1) and str(mat2). ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.