Hi all, I have a question about the column names. In the text file, there are two columns, but the column name is just one string. How to change the column name to two strings? In this case, I'd like to change "20080101" to "max, min". Thanks.
20080101 10.430,-2.430 11.320,-2.180 12.440,-1.820 15.240,1.760 15.610,2.140 19.570,2.370 18.850,3.380 15.830,4.630 20.090,6.050 23.010,9.840
Try this
library(tidyverse) df <- read_csv("myfile.csv", skip = 1, col_names = c("max", "min"))
Thanks very much, it works now. I did not know "skip".
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.