[R] VEC Operator in R

Patrick Burns pburns at pburns.seanet.com
Thu Oct 23 20:24:49 CEST 2008


For 'VEC' you may not need to do anything -- in
a lot of circumstances it will just work.

For 'VECH' you can write a function using the
'lower.tri' function.

But it seems to me that the assumption behind your
question is that a simple function that someone else
has written is going to be better than a simple function
that you write.  Not true (barring bugs).

R is egalitarian -- your functions have the same standing
as "official" functions. A lot of times it is faster to write
a function of your own rather than search out someone
else's even if you know such functions exist.


Patrick Burns
patrick at burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and "A Guide for the Unwilling S User")

megh wrote:
> Can anyone please tell whether there is any R function to act as "VEC" and
> "VECH" operator on Matrix? Yes of course, I can write a
> user-defined-function for that or else, I can put dim(mat) <- NULL. However
> I am looking for some R function.
>
> Your help will be highly appreciated.
>
> Regards,
>



More information about the R-help mailing list