I would like to create a very simple function that will take the dataframe and row number as arguemnts, and then return a dataframe without that row. So if I have:
1 ben
2 adrian
3 bill
4 matthew
After calling remove(3,df) I will get:
1 ben
2 adrian
3 matthew
Anyone can help out?
df[-3,]to remove row 3 from the output? (or in case of multiple rows to be removed:df[-c(1:2),])?, drop=Ftoo in order to keep it in adata.framestructure, but that's basically itdf <- df[-3,, drop=FALSE]and then save it as you wish.