0

I am working on data set for analysis.

I have to remove column name of single variable of data frame in r.

I have used colnames(df)<-NULL function,it removes all colnames of dataframe

The excepted output is:

enter image description here

S.I.J
  • 979
  • 1
  • 10
  • 22

1 Answers1

0

I don't really get the expected output, but maybe this is what you're looking for

colnames(df)[i] <- NA

'i' is the column location (for example 1,2,3 etc)