How to delete the first row of a dataframe in R?

前端 未结 6 1280
长情又很酷
长情又很酷 2020-11-30 22:34

I have a dataset with 11 columns with over a 1000 rows each. The columns were labeled V1, V2, V11, etc.. I replaced the names with something more useful to me using the \"c\

6条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-30 22:35

    No one probably really wants to remove row one. So if you are looking for something meaningful, that is conditional selection

    #remove rows that have long length and "0" value for vector E
    
    >> setNew<-set[!(set$length=="long" & set$E==0),]
    

提交回复
热议问题