Try this,

library(lattice)
data(barley)
names(barley)

# Removing first column
barley <- barley[,c(-1)]
names(barley)

# Keeping 1st and 3rd column
 barley <- barley[,c(1,3)]
names(barley)
HTH,
Gary


On Sat, Dec 19, 2009 at 3:21 PM, <sarjin...@yahoo.com> wrote:

> What is equivalent to DROP or KEEP statements of SAS in R?
>
> --
> This message was sent on behalf of sarjin...@yahoo.com at
> openSubscriber.com
> http://www.opensubscriber.com/messages/r-help@r-project.org/topic.html
>
> ______________________________________________
> 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<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

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

Reply via email to