403Webshell
Server IP : 217.160.0.212  /  Your IP : 216.73.217.98
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1073854427 ( 1073854427)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/share/emacs/28.2/lisp/org/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/emacs/28.2/lisp/org/ob-R.elc
;ELC
;;; Compiled
;;; in Emacs version 28.2
;;; with all optimizations.



(byte-code "\300\301!\210\300\302!\207" [require cl-lib ob] 2)
#@30 R-specific header arguments.
(defconst org-babel-header-args:R '((width . :any) (height . :any) (bg . :any) (units . :any) (pointsize . :any) (antialias . :any) (quality . :any) (compression . :any) (res . :any) (type . :any) (family . :any) (title . :any) (fonts . :any) (version . :any) (paper . :any) (encoding . :any) (pagecentre . :any) (colormodel . :any) (useDingbats . :any) (horizontal . :any) (results (file list vector table scalar verbatim) (raw html latex org code pp drawer) (replace silent none append prepend) (output value graphics))) (#$ . 147))
#@132 Header args which are safe for R babel blocks.

See `org-babel-safe-header-args' for documentation of the format of
this variable.
(defconst ob-R-safe-header-args (append org-babel-safe-header-args '(:width :height :bg :units :pointsize :antialias :quality :compression :res :type :family :title :fonts :version :paper :encoding :pagecentre :colormodel :useDingbats :horizontal)) (#$ . 718))
(defvar org-babel-default-header-args:R nil)
(byte-code "\300\301\302\303#\210\304\305\306\307\310DD\311\312\313\314\315\316\317&	\207" [put org-babel-default-header-args:R safe-local-variable #[257 "\211<\205	\300\301\"\207" [cl-every #[257 "\211:\205	\301\"\207" [ob-R-safe-header-args org-babel-one-header-arg-safe-p] 4 "\n\n(fn PAIR)"]] 4 "\n\n(fn VALUE)"] custom-declare-variable org-babel-R-command funcall function #[0 "\300\207" ["R --slave --no-save"] 1 ""] "Name of command to use for executing R code." :group org-babel :version "24.1" :type string] 10)
#@13 

(fn INFO)
(defalias 'org-babel-edit-prep:R #[257 "\300\3018\236A\211\205\302\303\"\205\304\303\"\205\305\306\"\207" [:session 2 string-prefix-p "*" string-suffix-p org-babel-R-initiate-session nil] 5 (#$ . 1686)])
#@127 R code used to transfer a table defined as a variable from org to R.

This function is used when the table contains a header.
(defconst ob-R-transfer-variable-table-with-header "%s <- local({\n     con <- textConnection(\n       %S\n     )\n     res <- utils::read.table(\n       con,\n       header    = %s,\n       row.names = %s,\n       sep       = \"\\t\",\n       as.is     = TRUE\n     )\n     close(con)\n     res\n   })" (#$ . 1919))
#@135 R code used to transfer a table defined as a variable from org to R.

This function is used when the table does not contain a header.
(defconst ob-R-transfer-variable-table-without-header "%s <- local({\n     con <- textConnection(\n       %S\n     )\n     res <- utils::read.table(\n       con,\n       header    = %s,\n       row.names = %s,\n       sep       = \"\\t\",\n       as.is     = TRUE,\n       fill      = TRUE,\n       col.names = paste(\"V\", seq_len(%d), sep =\"\")\n     )\n     close(con)\n     res\n   })" (#$ . 2369))
#@102 Expand BODY according to PARAMS, return the expanded body.

(fn BODY PARAMS &optional GRAPHICS-FILE)
(defalias 'org-babel-expand-body:R #[770 "\300\301\302\303\236A\205\303\236AC\304!C\305\236A\205$\305\236AC$\306#\207" [mapconcat identity append :prologue org-babel-variable-assignments:R :epilogue "\n"] 11 (#$ . 2914)])
#@104 Execute a block of R code.
This function is called by `org-babel-execute-src-block'.

(fn BODY PARAMS)
(defalias 'org-babel-execute:R #[514 "\212\300\236A\301\236A\302!\303\304\236A\"\305\300\236\235\205\306!\211?\205)\307\236A?\2053\310\236A\311		#C\312\313\203P\314\315
\"C\316C#\202Q\317#\262\320	\321\232\206l\322\323\236A	\"\321\232\206|\322\324\236A	\"\f&?\205\206\211\266\211)\207" [:result-params :result-type org-babel-comint-use-async org-babel-R-initiate-session :session "graphics" org-babel-graphical-output-file :colnames :rownames org-babel-expand-body:R mapconcat identity append org-babel-R-construct-graphics-device-call "},error=function(e){plot(x=-1:1, y=-1:1, type='n', xlab='', ylab='', axes=FALSE); text(x=0, y=0, labels=e$message, col='red'); paste('ERROR', e$message, sep=' : ')}); dev.off()" "\n" org-babel-R-evaluate "yes" org-babel-pick-name :colname-names :rowname-names] 19 (#$ . 3257)])
#@93 Prepare SESSION according to the header arguments specified in PARAMS.

(fn SESSION PARAMS)
(defalias 'org-babel-prep-session:R #[514 "\301\"\302!\303!\204\304\305\"\210\306 \307\310\"\216rq\210\212\311\312\307\313\"\"\210,\210\207" [comint-input-filter org-babel-R-initiate-session org-babel-variable-assignments:R org-babel-comint-buffer-livep error "Buffer %s does not exist or has no process" match-data make-closure #[0 "\301\300\302\"\207" [V0 set-match-data evaporate] 3] #[257 "\300\207" [nil] 2 "\n\n(fn INPUT)"] mapc #[257 "\301\210\211c\210\302\303\304\"\210\305\300!\207" [V0 1 comint-send-input nil t org-babel-comint-wait-for-output] 4 "\n\n(fn VAR)"]] 9 (#$ . 4231)])
#@51 Load BODY into SESSION.

(fn SESSION BODY PARAMS)
(defalias 'org-babel-load-session:R #[771 "\300 \301\302\"\216\303\"r\211q\210\304\305p!!b\210\306!c\210)\211\262)\207" [current-window-configuration make-closure #[0 "\301\300!\207" [V0 set-window-configuration] 2] org-babel-prep-session:R process-mark get-buffer-process org-babel-chomp] 8 (#$ . 4934)])
#@75 Return list of R statements assigning the block's variables.

(fn PARAMS)
(defalias 'org-babel-variable-assignments:R #[257 "\300!\301\302\303\"\301\302\304#\305\306GS\"\"\"\207" [org-babel--get-vars mapcar make-closure #[257 "\301@A\302\300\236A\303\232\304\300\236A\303\232$\207" [V0 org-babel-R-assign-elisp :colnames "yes" :rownames] 7 "\n\n(fn PAIR)"] #[257 "\211\3018@\302\3018A\303\300\236A8A\304\300\236A8A#B\207" [V0 V1 org-babel-reassemble-table :colname-names :rowname-names] 8 "\n\n(fn I)"] number-sequence 0] 9 (#$ . 5301)])
#@40 Quote field S for export to R.

(fn S)
(defalias 'org-babel-R-quote-tsv-field #[257 "\211;\203\300\301\302\303\300\"\304#\300Q\207\305\306\"\207" ["\"" mapconcat identity split-string "\"\"" format "%S"] 7 (#$ . 5858)])
#@109 Construct R code assigning the elisp VALUE to a variable named NAME.

(fn NAME VALUE COLNAMES-P ROWNAMES-P)
(defalias 'org-babel-R-assign-elisp #[1028 "<\203j\303\304\305\306\"\"\211\203\307\310\"\202\311\203$\307\312\"\202%\311@<\204/C\262\313\314\"A@\315=\204A\203E\316\202F\317\203N\320\202O\321U\203^\322%\207\322	\n&\207\250\203z\322\323\324!\325P#\207\326!\203\206\322\323#\207;\203\254\322\327\330\211\203\237\331\311G\n$\210\202\247\332\311G\330$\210\266\202#\207\322\327\333!#\207" [ob-R-transfer-variable-table-with-header ob-R-transfer-variable-table-without-header org-rm-props mapcar length cl-remove-if-not sequencep apply max 0 min orgtbl-to-tsv (:fmt org-babel-R-quote-tsv-field) hline "TRUE" "FALSE" "1" "NULL" format "%s <- %s" number-to-string "L" floatp "%s <- %S" nil remove-text-properties set-text-properties prin1-to-string] 17 (#$ . 6089)])
#@75 If there is not a current R process then create one.

(fn SESSION PARAMS)
(defalias 'org-babel-R-initiate-session #[514 "\303\230?\205t\206\f\304\305\300!\205\205\306\236A?\307!\203&\211\202q\310 \311\312\"\216\313!\2036q\210\314\315!\210\316 \210\317	\206C\n!\320\321\"\203R\322!\210\202D\210\323\324!\203`\325!\202k;\203i\202k\325 !\210p)\262)\262\207" [ess-ask-for-ess-directory ess-local-process-name ess-current-process-name "none" "*R*" boundp :dir org-babel-comint-buffer-livep current-window-configuration make-closure #[0 "\301\300!\207" [V0 set-window-configuration] 2] get-buffer require ess R get-process process-get callbacks ess-wait-for-process rename-buffer bufferp buffer-name] 8 (#$ . 7028)])
#@140 Associate R code buffer with an R session.
Make SESSION be the inferior ESS process associated with the
current code buffer.

(fn SESSION)
(defalias 'org-babel-R-associate-session #[257 "\301\302!!\303 \207" [ess-local-process-name process-name get-buffer-process ess-make-buffer-current] 4 (#$ . 7779)])
#@359 An alist mapping graphics file types to R functions.

Each member of this list is a list with three members:
1. the file extension of the graphics file, as an elisp :keyword
2. the R graphics device function to call to generate such a file
3. the name of the argument to this function which specifies the
   file to write to (typically "file" or "filename")
(defvar org-babel-R-graphics-devices '((:bmp "bmp" "filename") (:jpg "jpeg" "filename") (:jpeg "jpeg" "filename") (:tikz "tikz" "file") (:tiff "tiff" "filename") (:png "png" "filename") (:svg "svg" "file") (:pdf "pdf" "file") (:ps "postscript" "file") (:postscript "postscript" "file")) (#$ . 8093))
#@66 Construct the call to the graphics device.

(fn OUT-FILE PARAMS)
(defalias 'org-babel-R-construct-graphics-device-call #[514 "\301\302!\303\304P!\236\206\305\236\306\236A\307\211A@\262\3108\262\311\312\313\"\314#\262\315\316\203>\317\202?\314	\206E\314&\207" [org-babel-R-graphics-devices (:width :height :bg :units :pointsize :antialias :quality :compression :res :type :family :title :fonts :version :paper :encoding :pagecentre :colormodel :useDingbats :horizontal) file-name-extension intern ":" :png :R-dev-args nil 2 mapconcat make-closure #[257 "\211@\300\235\203\301\302\303@!\304\305OA#\207\306\207" [V0 format ",%s=%S" symbol-name 1 nil #1=""] 6 "\n\n(fn PAIR)"] #1# format "%s(%s=\"%s\"%s%s%s); tryCatch({" ","] 16 (#$ . 8757)])
(defconst org-babel-R-eoe-indicator "'org_babel_R_eoe'")
(defconst org-babel-R-eoe-output "[1] \"org_babel_R_eoe\"")
#@285 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
(defconst org-babel-R-write-object-command "{\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\")" (#$ . 9654))
#@104 Evaluate R code in BODY.

(fn SESSION BODY RESULT-TYPE RESULT-PARAMS COLUMN-NAMES-P ROW-NAMES-P ASYNC)
(defalias 'org-babel-R-evaluate #[1799 "\203)\211\203\300&\207\301&\207\302%\207" [ob-session-async-org-babel-R-evaluate-session org-babel-R-evaluate-session org-babel-R-evaluate-external-process] 14 (#$ . 10794)])
#@268 Evaluate BODY in external R process.
If RESULT-TYPE equals `output' then return standard output as a
string.  If RESULT-TYPE equals `value' then return the value of the
last statement in BODY, as elisp.

(fn BODY RESULT-TYPE RESULT-PARAMS COLUMN-NAMES-P ROW-NAMES-P)
(defalias 'org-babel-R-evaluate-external-process #[1285 "\302\267\202\251\303\304!\305\306	\203\307\202\310\203(\203$\311\202)\307\202)\310\306\312
\"\313\314\"%\"\210\315\316\235?\205\240\317\235\204\200\320\235\204\200\321\235\204\200\322\235\204\200\323\235\204\200\324\235\204\200\325\235\204z\326\235\204z\327\235\204z\330\235\203\234\331\235\204\234\332\333\334\"r\211q\210\335\336\"\216\337!\210\340\341 \342\"*\262\202\240\343\344\"\"\207\305\"\207\345\207" [org-babel-R-command org-babel-R-write-object-command #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (value 6 output 163)) org-babel-temp-file "R-" org-babel-eval format "TRUE" "FALSE" "NA" "{function ()\n{\n%s\n}}()" org-babel-process-file-name noquote org-babel-R-process-value-result "none" "scalar" "verbatim" "html" "code" "pp" "file" "output" "raw" "org" "drawer" "table" generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205	\302\300!\207" [V0 buffer-name kill-buffer] 2] insert-file-contents org-babel-chomp buffer-string "\n" org-babel-import-elisp-from-file (16) nil] 16 (#$ . 11160)])
#@265 Evaluate BODY in SESSION.
If RESULT-TYPE equals `output' then return standard output as a
string.  If RESULT-TYPE equals `value' then return the value of the
last statement in BODY, as elisp.

(fn SESSION BODY RESULT-TYPE RESULT-PARAMS COLUMN-NAMES-P ROW-NAMES-P)
(defalias 'org-babel-R-evaluate-session #[1542 "\306\267\202b\307\310\311\"r\211q\210\312\313\"\216\314!c\210\315\316!!\317\320\317!\210,\210\321\322!\323\324\n\203:\325\202;\326\203M\203I\327\202N\325\202N\326\330\331	\332\"%#\210\333\334\235?\205\301\335\235\204\241\336\235\204\241\337\235\204\241\340\235\204\241\341\235\204\241\342\235\204\241\343\235\204\233\344\235\204\233\345\235\204\233\346\235\203\275\347\235\204\275\307\310\311\"r\211q\210\312\350\"\216\351!\210\314\352 \353\"*\262\202\301\354\355\"\"\207\356\314\357\360\317\361\362\361\363rq\210\364P\365!\204\343\366\367\"\210\370 \312\371\"\216rq\210\212\372\373C\312\374\"
B\317\375\316p!!b\210`d{\262|\266\356\314@D\353#c\210\376 \210Ab\210\212\377\201CB!\317\311#\2054\377\317\311#)\204C\201D\316p!!\210\202\375\316p!!b\210\211c\210\201E\242\")\266\202,\262*\"\"\"!\353#\207\317\207" [ess-eval-visibly-p ess-local-process-name org-babel-R-write-object-command comint-prompt-regexp comint-input-filter comint-output-filter-functions #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (value 6 output 196)) generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205	\302\300!\207" [V0 buffer-name kill-buffer] 2] org-babel-chomp process-name get-buffer-process nil ess-eval-buffer org-babel-temp-file "R-" org-babel-comint-eval-invisibly-and-wait-for-file format "TRUE" "FALSE" "NA" ".Last.value" org-babel-process-file-name noquote org-babel-R-process-value-result "none" "scalar" "verbatim" "html" "code" "pp" "file" "output" "raw" "org" "drawer" "table" #[0 "\301\300!\205	\302\300!\207" [V0 buffer-name kill-buffer] 2] insert-file-contents buffer-string "\n" org-babel-import-elisp-from-file (16) mapconcat butlast delq mapcar #[257 "\211G\300V\205\211\207" [0] 3 "\n\n(fn LINE)"] #[257 "\300\301\302\303\"@\"\203\211\304\225\305O\207\207" [string-match "^\\([>+.]\\([ ][>.+]\\)*[ ]\\)" split-string "\n" 1 nil] 6 "\n\n(fn LINE)"] "^" org-babel-comint-buffer-livep error "Buffer %s does not exist or has no process" match-data #[0 "\301\300\302\"\207" [V0 set-match-data evaporate] 3] #[257 "\300\207" [nil] 2 "\n\n(fn INPUT)"] "" #[257 "\300\211\242P\240\207" [V0] 4 "\n\n(fn TEXT)"] process-mark inferior-ess-send-input re-search-forward org-babel-R-eoe-indicator comint-last-input-end org-babel-R-eoe-output regexp-quote accept-process-output split-string] 22 (#$ . 12597)])
#@128 R-specific processing of return value.
Insert hline if column names in output have been requested.

(fn RESULT COLUMN-NAMES-P)
(defalias 'org-babel-R-process-value-result #[514 "\211\203\3001@\301ABB0\207\210\302\207\207" [(error) hline "Could not parse R result"] 5 (#$ . 15358)])
(defconst ob-session-async-R-indicator "'ob_comint_async_R_%s_%s'")
#@203 Asynchronously evaluate BODY in SESSION.
Returns a placeholder string for insertion, to later be replaced
by `org-babel-comint-async-filter'.

(fn SESSION BODY RESULT-TYPE _ COLUMN-NAMES-P ROW-NAMES-P)
(defalias 'ob-session-async-org-babel-R-evaluate-session #[1542 "\306p\307\310\311%\210\312\267\202\311\313\314!\315\316\317\"r\211q\210\320\321\"\216\310!c\210\322\323	!!\324\325!\210+\210\315\316\317\"r\211q\210\320\326\"\216\327\310\330	\203L\331\202M\332\203_\203[\333\202`\331\202`\332\334\335	\336\"%\330\n\337#D\340#c\210\322\323	!!\324\325!\210+\210\207\341\342\343\344!!!\322\323!!\315\316\317\"r\211q\210\320\345\"\216\330\n\346#c\210\340c\210c\210\340c\210\330\n\347#c\210
)\325\350\324\325!\210*\210\f))\207\325\207" [ess-local-process-name org-babel-R-write-object-command ob-session-async-R-indicator ess-eval-visibly ess-eval-visibly-tmp ess-inject-source org-babel-comint-async-register "^\\(?:[>.+] \\)*\\[1\\] \"ob_comint_async_R_\\(.+?\\)_\\(.+\\)\"$" org-babel-chomp ob-session-async-R-value-callback #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (value 15 output 128)) org-babel-temp-file "R-" generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205	\302\300!\207" [V0 buffer-name kill-buffer] 2] process-name get-buffer-process ess-eval-buffer nil #[0 "\301\300!\205	\302\300!\207" [V0 buffer-name kill-buffer] 2] mapconcat format "TRUE" "FALSE" "NA" ".Last.value" org-babel-process-file-name noquote "file" "\n" md5 number-to-string random 100000000 #[0 "\301\300!\205	\302\300!\207" [V0 buffer-name kill-buffer] 2] "start" "end" function-and-buffer user-inject-src-param] 18 (#$ . 15722)])
#@170 Callback for async value results.
Assigned locally to `ob-session-async-file-callback' in R
comint buffers used for asynchronous Babel evaluation.

(fn PARAMS TMP-FILE)
(defalias 'ob-session-async-R-value-callback #[514 "\300\301\236\235\205\302!\211?\205\303\236A\304\301\236\305\235?\205\202\306\235\204a\307\235\204a\310\235\204a\311\235\204a\312\235\204a\313\235\204a\314\235\204[\315\235\204[\316\235\204[\317\235\203~\320\235\204~\321\322\323\"r\211q\210\324\325\"\216\326!\210\327\330 \331\"*\262\202\202\332\333\"\262\334\232\206\222\335\336\236A\"\"\207" ["graphics" :result-params org-babel-graphical-output-file :colnames org-babel-R-process-value-result "none" "scalar" "verbatim" "html" "code" "pp" "file" "output" "raw" "org" "drawer" "table" generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205	\302\300!\207" [V0 buffer-name kill-buffer] 2] insert-file-contents org-babel-chomp buffer-string "\n" org-babel-import-elisp-from-file (16) "yes" org-babel-pick-name :colname-names] 10 (#$ . 17438)])
(provide 'ob-R)

Youez - 2016 - github.com/yon3zu
LinuXploit