How to Delete Multiple Columns in R DataFrame? Last Updated : 19 Dec, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article, we will discuss how to delete multiple columns in R Programming Language. We can delete multiple columns in the R dataframe by assigning null values through the list() function. Syntax: data[ , c('column_name1', 'column_name2',...........,'column_nam en)] <- list(NULL) where, data is the input dataframe Example: R program to create a dataframe and assign columns to null. R # dataframe data = data.frame(column1=c(70, 76, 89), column2=c(90, 79, 100), column3=c(23, 4, 56), column4=c(23, 45, 21)) # display print(data) # delete three columns print(data[, c('column1', 'column2', 'column3')] < - list(NULL)) Output: We can also delete columns using index of columns. Syntax: dataframe[ , column_index_start:column_index_end] <- list(NULL) Where , dataframe is the input dataframecolumn_index are the column positions Example: R # dataframe data = data.frame(column1=c(70, 76, 89), column2=c(90, 79, 100), column3=c(23, 4, 56), column4=c(23, 45, 21)) # display print(data) # delete three columns print(data[, 1:3] < - list(NULL)) Output: Comment More infoAdvertise with us Next Article How to Select DataFrame Columns by Index in R? S sireeshakanneganti112 Follow Improve Article Tags : R Language R Programs R-DataFrame R DataFrame-Programs Similar Reads How to select multiple DataFrame columns by name in R ? In this article, we will discuss how to select multiple columns from a DataFrame by name in R Programming Language. To get multiple columns we will use the list data structure. By using a list we can pass the dataframe columns separated with a comma. Then, we can get list by using list() function Sy 1 min read How to Delete Row(s) in R DataFrame ? In this article, we will see how row(s) can be deleted from a Dataframe in R Programming Language. Deleting a single row For this, the index of the row to be deleted is passed with a minus sign. Syntax: df[-(index), ] Example 1 :Â R # creating a data frame with # some data . df=data.frame(id=c(1,2,3 2 min read How to merge multiple DataFrames in R ? In this article, we will discuss how to merge multiple dataframes in R Programming Language. Dataframes can be merged both row and column wise, we can merge the columns by using cbind() function and rows by using rbind() function Merging by Columns cbind() is used to combine the dataframes by column 2 min read Split DataFrame Variable into Multiple Columns in R In this article, we will discuss how to split dataframe variables into multiple columns using R programming language. Method 1: Using do.call method The strsplit() method in R is used to split the specified column string vector into corresponding parts. The pattern is used to divide the string into 3 min read How to Select DataFrame Columns by Index in R? In this article, we will discuss how to select columns by index from a dataframe in R programming language. Note: The indexing of the columns in the R programming language always starts from 1. Method 1: Select Specific Columns By Index with Base R Here, we are going to select columns by using index 2 min read How to Select Specific Columns in R dataframe? In this article, we will discuss how to select specific columns from a data frame in the R Programming Language. Selecting specific Columns Using Base R by column nameIn this approach to select a specific column, the user needs to write the name of the column name in the square bracket with the name 7 min read Like