Answers for "how to remove rows and columns in r"

R
4

r remove row dataframe

myData[-c(2, 4, 6), ]   # remove rows 2, 4, 6
Posted by: Guest on July-08-2020
1

r remove row names

rownames(data) <- c()
Posted by: Guest on March-13-2020
0

how to remove columns in a table in r

# delete multiple columns in r 
# delete column in R by mapping Null value to them
dataset$firstcol <- dataset$nextcol <- dataset$anothercol <- NULL
Posted by: Guest on May-09-2021

Code answers related to "how to remove rows and columns in r"

Browse Popular Code Answers by Language