I am trying to parse out a file address and want to extract both the file location and the file name. For example, I want this:
"C:\Users\carriebrown\Desktop\test\Project_8754.csv"
to become this:
"C:\Users\carriebrown\Desktop\test\" and "Project_8754.csv"
I am attempting to use:
strsplit(file,'\\', fixed=TRUE)
But continue to the get the error:
Error in strsplit(file, "\", fixed = TRUE) : non-character argument
Is there a way to do this in R with strsplit? If not, is there a way to do it in a different manner?