[From nobody Thu Oct 23 22:49:25 2008
Received: from mail143.messagelabs.com (216.82.254.35) by
	767M-CAHT.goldbox.com (192.168.110.215) with Microsoft SMTP Server id
	8.1.291.1; Thu, 23 Oct 2008 14:37:55 -0400
X-VirusChecked: Checked
X-Env-Sender: r-help-bounces@r-project.org
X-Msg-Ref: server-3.tower-143.messagelabs.com!1224787072!42049292!1
X-StarScan-Version: 5.5.12.14.2; banners=-,-,-
X-Originating-IP: [129.132.145.15]
X-SpamReason: No, hits=0.0 required=7.0 tests=
Received: (qmail 24206 invoked from network); 23 Oct 2008 18:37:54 -0000
Received: from hypatia.math.ethz.ch (HELO hypatia.math.ethz.ch)
	(129.132.145.15) by server-3.tower-143.messagelabs.com with AES256-SHA
	encrypted SMTP; 23 Oct 2008 18:37:54 -0000
Received: from hypatia.math.ethz.ch (hypatia [129.132.145.15])	by
	hypatia.math.ethz.ch (8.14.1/8.14.1) with ESMTP id m9NIbDDQ009796;
	Thu, 23 Oct 2008 20:37:37 +0200
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on hypatia.math.ethz.ch
X-Spam-Level: 
X-Spam-Status: No, score=-3.8 required=5.0 tests=AWL, BAYES_00,
	RCVD_IN_DNSWL_MED autolearn=unavailable version=3.2.5
Received: from phil3.ethz.ch (phil3.ethz.ch [129.132.202.239])	by
	hypatia.math.ethz.ch (8.14.1/8.14.1) with ESMTP id m9NIOq8G031347	for
	&lt;r-help@r-project.org&gt;; Thu, 23 Oct 2008 20:24:53 +0200
Received: from outmail128096.authsmtp.co.uk ([62.13.128.96])	by phil3.ethz.ch
	with esmtp (Exim 4.66)	(envelope-from &lt;pburns@pburns.seanet.com&gt;) id
	1Kt4rh-0006IB-AP	for r-help@r-project.org;
	Thu, 23 Oct 2008 20:24:59 +0200
Received: from mail-c189.authsmtp.com (mail-c189.authsmtp.com [62.13.128.71])
	by punt5.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP
	id	m9NIOmRl056904; Thu, 23 Oct 2008 19:24:48 +0100 (BST)
Received: from [192.168.2.15] (host86-129-89-71.range86-129.btcentralplus.com
	[86.129.89.71]) (authenticated bits=0)	by mail.authsmtp.com
	(8.14.2/8.14.2/Kp) with ESMTP id m9NIOlM8083930;
	Thu, 23 Oct 2008 19:24:48 +0100 (BST)
Message-ID: &lt;4900C171.1090103@pburns.seanet.com&gt;
Date: Thu, 23 Oct 2008 19:24:49 +0100
From: Patrick Burns &lt;pburns@pburns.seanet.com&gt;
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: megh &lt;megh700004@yahoo.com&gt;
References: &lt;20136201.post@talk.nabble.com&gt;
In-Reply-To: &lt;20136201.post@talk.nabble.com&gt;
X-Server-Quench: dfe5c1f8-a12f-11dd-bc7a-001f29070be2
X-AuthRoute: OCdwYA8TAVZNRhkA DDgsFCVdUwM+YAZB CBkOMU1RJ18fUBlV
	LkdCKlcTahwKHwoe fDVPRFZUUFVhWGp/ aQ5baQ0TakxQXgdj
	TkBAXFVTCwdtAxke BlBDW2cLCFk7cH54 Zk9hXj5aWUZyOxIr
	F0sHFDsOeDZhajYC UUEMIx4GIwQbYx9F awZ9XXMKYTdSZDQC
	El17DAoEdX1hBQ8d ZRkAN1sORlxDHzh0 fXhs
X-Authentic-SMTP: 61633330373632.kestrel.dmpriest.net.uk:1378/Kp
X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse
X-Virus-Status: No virus detected - but ensure you scan with your own
	anti-virus system!
X-USF-Tag-Only: YES
X-USF-Filter-Node: phil3.ethz.ch
X-USF-Spam-Level: --
X-USF-Spam-Status: hits=-2.6 tests=BAYES_00
X-USF-Spam-Flag: NO
X-USF: 
X-Virus-Scanned: by amavisd-new at stat.math.ethz.ch
CC: &lt;r-help@r-project.org&gt;
Subject: Re: [R] VEC Operator in R
X-BeenThere: r-help@r-project.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: &quot;Main R Mailing List: Primary help&quot; &lt;r-help.r-project.org&gt;
List-Unsubscribe: &lt;https://stat.ethz.ch/mailman/options/r-help&gt;,
	&lt;mailto:r-help-request@r-project.org?subject=unsubscribe&gt;
List-Archive: &lt;https://stat.ethz.ch/pipermail/r-help&gt;
List-Post: &lt;mailto:r-help@r-project.org&gt;
List-Help: &lt;mailto:r-help-request@r-project.org?subject=help&gt;
List-Subscribe: &lt;https://stat.ethz.ch/mailman/listinfo/r-help&gt;,
	&lt;mailto:r-help-request@r-project.org?subject=subscribe&gt;
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=&quot;us-ascii&quot;; format=flowed
Sender: &lt;r-help-bounces@r-project.org&gt;
Errors-To: r-help-bounces@r-project.org
Return-Path: r-help-bounces@r-project.org
X-MS-Exchange-Organization-OriginalArrivalTime: 23 Oct 2008 18:37:55.3865 (UTC)
X-MS-Exchange-Organization-AuthSource: 767M-CAHT.goldbox.com
X-MS-Exchange-Organization-AuthAs: Anonymous
X-MS-Exchange-Organization-OriginalSize: 5012
X-MS-Exchange-Organization-Recipient-Limit-Verified: True

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 &quot;official&quot; 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@burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and &quot;A Guide for the Unwilling S User&quot;)

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

______________________________________________
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.
]