I am trying to import a xlsx file into R but I keep getting this error when copying the file path. The file path is "C:\Users\aj\Downloads" so I have been writing:
library(openxlsx)
Data <- read.xlsx(paste0(C:\Users\aj\Downloads, '\Data.xlsx'))
I tried switching to "/" from "" and I got a different error that stated unexpected input. Does anybody know what I am missing or if I am even on the right track?
paste0function in inverted commas?paste0("C:\Users\aj\Downloads", "\Data.xlsx")- PeterData <- read.xlsx('C:\\Users\\aj\\Downloads\\Data.xlsx')? The back-slash often works as an escape-character. - WilliamGram