Skip to content
Prev 278285 / 398513 Next

how to keep row name if there is only one row selected from a data frame

You probably mean this:

df1[!(rownames(df1) %in% c("2098","2970","784")), ]

Remember, row names are strings: if you give R an integer, it will
interpret it as a row index.

Michael
On Wed, Nov 23, 2011 at 5:37 AM, agent dunham <crosspide at hotmail.com> wrote: