You can use negative indexing to delete rows, for example:
dat <- dat[-1, ]
Here is an example:
> dat <- data.frame(A = 1:3, B = 1:3) > dat[-1, ] AB 2 2 2 3 3 3 > dat2 <- dat[-1, ] > dat2 AB 2 2 2 3 3 3
However, you may have more problems than just deleting shortcuts that fall into line 1. Most likely, R interprets the data as text and then converts to factors. Check that str(foo) , where foo is your data object, is talking about data types.
It looks like you just need header = TRUE in your call to read data (assuming you read it through read.table() or one of them.)
Gavin Simpson Sep 24 '11 at 20:17 2011-09-24 20:17
source share