Variable: org-babel-R-write-object-command

org-babel-R-write-object-command is a variable defined in ob-R.el.gz.

Value

"{\n    function(object,transfer.file) {\n        object\n        invisible(\n            if (\n                inherits(\n                    try(\n                        {\n                            tfile<-tempfile()\n                            write.table(object, file=tfile, sep=\"\\t\",\n                                        na=\"\",row.names=%s,col.names=%s,\n                                        quote=FALSE)\n                            file.rename(tfile,transfer.file)\n                        },\n                        silent=TRUE),\n                    \"try-error\"))\n                {\n                    if(!file.exists(transfer.file))\n                        file.create(transfer.file)\n                }\n            )\n    }\n}(object=%s,transfer.file=\"%s\")"

Documentation

Template for an R command to evaluate a block of code and write result to file.

Has four %s escapes to be filled in:
1. Row names, "TRUE" or "FALSE"
2. Column names, "TRUE" or "FALSE"
3. The code to be run (must be an expression, not a statement)
4. The name of the file to write to

Source Code

;; Defined in /usr/src/emacs/lisp/org/ob-R.el.gz
(defconst org-babel-R-write-object-command "{
    function(object,transfer.file) {
        object
        invisible(
            if (
                inherits(
                    try(
                        {
                            tfile<-tempfile()
                            write.table(object, file=tfile, sep=\"\\t\",
                                        na=\"\",row.names=%s,col.names=%s,
                                        quote=FALSE)
                            file.rename(tfile,transfer.file)
                        },
                        silent=TRUE),
                    \"try-error\"))
                {
                    if(!file.exists(transfer.file))
                        file.create(transfer.file)
                }
            )
    }
}(object=%s,transfer.file=\"%s\")"
  "Template for an R command to evaluate a block of code and write result to file.

Has four %s escapes to be filled in:
1. Row names, \"TRUE\" or \"FALSE\"
2. Column names, \"TRUE\" or \"FALSE\"
3. The code to be run (must be an expression, not a statement)
4. The name of the file to write to")