[R] R matrix help
Jeff Newmiller
jdnewmil at dcn.davis.CA.us
Thu Jun 14 17:19:03 CEST 2012
What makes you think that with 12 elements the dimensions should be 3x4? It seems that 4x3 would be equally valid.
In every use of matrices that I have encountered, the dimensions have been relatable to some known quantity from the problem context, and matrix dimensioning has been an exercise in consistency checking rather than a guessing game. I recommend that you look at your overall problem again.
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.
karthicklakshman <karthick.lakshman at gmail.com> wrote:
>Dear R experts,
>
>I am interested in getting the dimensions for the matrix dynamically,
>based
>on the the number of elements in a matrix for example. if the number is
>12,
>I should get dim= 3X4, if it is 20, dim=5X4.
>please help me do this.
>
>Thank you
>Regards
>karthick
>
>--
>View this message in context:
>http://r.789695.n4.nabble.com/R-matrix-help-tp4633372.html
>Sent from the R help mailing list archive at Nabble.com.
>
>______________________________________________
>R-help at 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.
More information about the R-help
mailing list