R: setting my directory for saving files
The command
savedir = gsub("7/ ","7/",paste('~/Box Sync/Home Folder gjl7/',gsub(" ","",paste('Sync/Duke/research/saves/'))))
will give the correct path to the saves directory itself. Then just create a filename e.g.
thisfile = gsub(" ","",paste('20140625-em.res.bvm.J0',j,'.reps50.list'))
and the final save file path(or load file path, in this example) is
loadstr = gsub("saves/ ", "saves/", paste(savedir, thisfile))