tempdir() on windows returns the path using "\\" as file separator. But .Platform$file.sep returns "/". As a result, you get inconsistencies like: > file.path(tempdir(), "foo") [1] "C:\\WINDOWS\\Temp\\RtmpYEIXrb/foo" # Mix of \\ and / I'm not sure if this can cause problems but I thought I'd let you know just in case.