Change working directory to the document's enclosing dir when using Send Selection / Document to R if you have nothing selected (i.e. it sends the entire document). Changed: U trunk/Bundles/R.tmbundle/Commands/010 R command.plist