s-news
[Top] [All Lists]

FW: subscripting factors

To: <s-news@lists.biostat.wustl.edu>
Subject: FW: subscripting factors
From: <simona.costanzo@ubs.com>
Date: Thu, 8 Sep 2005 09:40:21 +0100
Thread-index: AcW0TnaUYVehJiW/TlOMoZ+FNfqxFAAAPk7wAAA+G8A=
Thread-topic: [S] subscripting factors
Thanks to all who respoded so promptly.

I received similar answers... here is one of them

-----Original Message-----
From: Chalvatzis, Dimitrios (Energy Wholesale)
[mailto:Dimitrios.Chalvatzis@eon-uk.com]
Sent: 08 September 2005 09:32
To: Costanzo, Simona
Subject: RE: [S] subscripting factors


Simona,

If your data frame is named DF then

DF$X2[DF$X1=="A"]


Dimitrios Chalvatzis 
Risk Analyst 
Energy Wholesale/Risk Policies & Methods 
T +44 (0)24 7642 5429 
F +44 (0)24 7642 5479 
Dimitrios.Chalvatzis@eon-uk.com 


-----Original Message-----
From: s-news-owner@lists.biostat.wustl.edu
[mailto:s-news-owner@lists.biostat.wustl.edu] On Behalf Of
simona.costanzo@ubs.com
Sent: Thursday, September 08, 2005 9:23 AM
To: s-news@lists.biostat.wustl.edu
Subject: [S] subscripting factors

Hi,

in a data.frame of the form

  X1 X2 
1  A  1
2  A  2
3  B  3
4  C  4
>

I would like to extract elements of X2, with X1="A". Where X1 is a
factor and X2 is a numeric vector.

Your help is very much appreciated

Thank you and kind regards,

Simona


Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.

--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news
___________________________ Disclaimer Notice ____________________
This message and any attachments are confidential and should only 
be read by those to whom they are addressed. If you are not the 
intended recipient, please contact us, delete the message from your
computer and destroy any copies. Any distribution or copying without
our prior permission is prohibited.

Internet communications are not always secure and therefore the 
E.ON Group does not accept legal responsibility for this message.
The recipient is responsible for verifying its authenticity before
acting on the contents. Any views or opinions presented are solely
those of the author and do not necessarily
represent those of the E.ON Group.

E.ON UK plc, Westwood Way, Westwood Business Park,
Coventry, CV4 8LG.
Registered in England & Wales No. 2366970

E.ON UK Trading Ltd, Westwood Way, Westwood Business Park,
Coventry, CV4 8LG
Registered in England & Wales No. 4178314

E.ON UK Trading Ltd is regulated by the Financial Services 
Authority to carry out investment activities.

Telephone +44 (0) 2476 42 4000
Fax +44 (0) 2476 42 5432

Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.


<Prev in Thread] Current Thread [Next in Thread>