Early in my R life I discovered the pain of R and windows being on different pages when it came to the separator between directories and subdirectories. Eventhough I know about
why not create a function that checks the OS and returns the proper file separator (the java solution i believe)?
file_sep <- function(){
ifelse(.Platform$OS.type == "unix", "/", "//")
}
file_sep()
you can pick a shorter name if you like. The big flaw here is that you have to paste together file paths, but it's still worth it long term if you're working on big projects.