I'm totally confused ! I have a one column dataframe in R :
temp1 = structure(list(Hamburg = c("Hamburg", "4562", "4604")), class = "data.frame", row.names = c(NA,
-3L))
str(temp1)
'data.frame': 3 obs. of 1 variable:
$ Hamburg: chr "Hamburg" "4562" "4604"
When I remove the first row by :
temp1 = temp1[-1,]
then the remaining is not a dataframe any more ! and I do not have the column name as well !
temp1
[1] "4562" "4604"
str(temp1)
chr [1:2] "4562" "4604"
How could I fix it ? I would like to keep the dataframe structure just get rid of the first row !