[R] data manipulation

Robert.Denham@dnr.qld.gov.au Robert.Denham at dnr.qld.gov.au
Wed Sep 5 02:36:57 CEST 2001


Antonio,
       it is much simpler than that:
length2.dat <- length1.dat[-c(5,9),]

You can of course overwrite the existing dataframe if you want:

length1.dat <- length1.dat[-c(5,9),]

Robert Denham
Qld Dept. Natural Resources
Brisbane


>Dear R-list members,

> Here goes a simple question that I could not solve: I want to delete a row
> in a data frame.
> Suppose rows 5 and 9 are out-layers and I want to take them out from a
data
> frame named "length1.dat":

>       LT   LF
> 1    335 320
> 2    340 335
> 3    360 355
> 4    370 365
> 5    376 310
> 6    388 378
> 7    395 385
> 8    400 390
> 9    400 410
> 10   405 392

> Antonio Olinto
> Fisheries Institute
> Sao Paulo - BRAZIL



************************************************************************
The information in this e-mail together with any attachments is
intended only for the person or entity to which it is addressed
and may contain confidential and/or privileged material.

Any form of review, disclosure, modification, distribution
and/or publication of this e-mail message is prohibited.  

If you have received this message in error, you are asked to
inform the sender as quickly as possible and delete this message
and any copies of this message from your computer and/or your
computer system network.  
************************************************************************
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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