s-news
[Top] [All Lists]

Removing 0's

To: <s-news@lists.biostat.wustl.edu>
Subject: Removing 0's
From: "Bert Jacobs" <b.jacobs@pandora.be>
Date: Mon, 21 Nov 2005 12:55:19 +0100
In-reply-to:
Thread-index: AcWu83Cjb6LbE6HdRfG3h+o35b9tcgADvSNwD+PYffA=
Hi,

Using S-Plus 6.2 for Windows XP

I have a vector of values that looks like this:

0
0
12
15
16
0
0
18
4
3
2
0
0

Does there exist an elegant way to achieve the following 
=removing the 0's at the start of the vector (if there are any) and at the
end of the vector (if there are any):

12
15
16
0
0
18
4
3
2

Thx for helping me out.
Bert


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