r - How do I delete rows from a data frame when the DF only has one column -
this question has answer here:
this sort of duplicate of this question, emphasis different, i'm posting it.
i have data.frame 1 column. if attempt delete row using "df[-1, ]" r returns list. how return data.frame?
the problem r trying "helpful", , simplifying data you. solution following (note 2 commas, not one):
df[-1,, drop = false] this remove specified row, , leave data.frame otherwise untouched.
Comments
Post a Comment