1

I exported an excel in r without headers.

df = read.xlsx('D:/hotel rates/Yoho 5th Lane Signature 2799850.xls', sheetIndex = 1, header = FALSE)

Then changed the colnames as the second row values.

colnames(df) =df[2,]

But my column names appeared as numbers as follows.

enter image description here

Actually I want the second row as my colnames. Can any one fix this?

I think thereis some kind of factor level in data. when I run df[2,2]the console shows the following.`

enter image description here

Jaliya
  • 337
  • 5
  • 20

0 Answers0