I have about 20 columns in an excel file. I am using read_excel to read them into R as a dataframe. One column is being taken as Posix and I want it to be text.
I know that mentioning the types of all the column types would solve this but I wanted to see if I could mention the columns' name or something to specify that only that column should be taken as text
So if i have a columns in the excel as Name, Age, DOB, Gender, time of birth I want to implement something like this
df <- read_excel("excel.xlsx", col_types = 'time of birth':"text")
instead of
df <- read.excel("excel.xlsx", col_types = c("text","text","date","text","text"))
Thanks!