# HG changeset patch # User Oleksandr Gavenko # Date 1457216736 -7200 # Node ID 7b82258d60a79fdc2545ec62d431031057f773ee # Parent d56a295b48daaa9629f2a43e128586587aea56f7 Drop column from data frame by number diff -r d56a295b48da -r 7b82258d60a7 r.rst --- a/r.rst Sun Mar 06 00:04:35 2016 +0200 +++ b/r.rst Sun Mar 06 00:25:36 2016 +0200 @@ -208,3 +208,18 @@ library(plyr) newd <- rename(d, c("beta"="two", "gamma"="three")) +Filtering raws and columns +========================== +:: + + TODO + +Droping raws and columns +======================== + +Drop column from data frame by number:: + + dfnew <- df[-1] # first + dfnew <- df[-ncol(df)] # last + dfnew <- df[-c(1, 3:4, 7)] # range +