I have a data frame a
> a # a is a data frame
X1.4
one 1
two 2
three 3
four 4
when I want to remove a row
> a = a[-2,] # remove row 2
it turns into numeric values
> a
[1] 1 3 4
Why?? I want to keep them as data frame with the same row names and column names
Here's the dput:
> dput(a)
structure(list(X1.4 = 1:4), class = "data.frame", row.names = c("one",
"two", "three", "four"))