[R] elimination of multiple rows

Christian Hoffmann christian.hoffmann at wsl.ch
Thu Jul 18 08:32:39 CEST 2002


Hi all,

Excuse me for posting a question which may not be true R.

I want to process a text file so that the resulting file contains only one
of possibly multiple consecutive rows. Example (the row numbers do not
belong to the file):

(1) a b c d
(2) a b c d
(3) A b c d
(4) A b c d
(5) A b c d
(6) a b c d
(7) a b c D
..

resulting in:

(1) a b c d
(3) A b c d
(6) a b c d
(7) a b c D
..

(6) could be disposed of also by first sorting the original file.

Does anybody have a script ready, preferably in Pearl? I do not know Pearl
well enough to write it myself.

Thanks for your help.
--christian

Dr.sc.math.Christian W. Hoffmann
Mathematics and Statistical Computing
Landscape Dynamics and Spatial Development
Swiss Federal Research Institute WSL 
Zuercherstrasse 111
CH-8903 Birmensdorf, Switzerland
phone: ++41-1-739 22 77    fax: ++41-1-739 22 15
e-mail: christian.hoffmann at wsl.ch
www: http://www.wsl.ch/staff/christian.hoffmann/

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list