;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\207" [require ess-custom ess-inf] 2) #@172 Function to call within R to print information on objects. The last line of this string should be the instruction to call the function which prints the output for rdired. (defvar ess-rdired-objects "{.rdired.objects <- function(objs) {\n if (length(objs)==0) {\n \"No objects to view!\"\n } else {\n mode <- sapply(objs, function(my.x) {\n eval( parse( text=sprintf('data.class(get(\"%s\"))', my.x))) })\n length <- sapply(objs, function(my.x) {\n eval( parse( text=sprintf('length(get(\"%s\"))', my.x))) })\n size <- sapply(objs, function(my.x) {\n eval( parse( text=sprintf('format(object.size(get(\"%s\")), units=\"auto\")', my.x))) })\n d <- data.frame(mode, length, size)\n\n var.names <- row.names(d)\n\n ## If any names contain spaces, we need to quote around them.\n quotes = rep('', length(var.names))\n spaces = grep(' ', var.names)\n if (any(spaces))\n quotes[spaces] <- '\"'\n var.names = paste(quotes, var.names, quotes, sep='')\n row.names(d) <- paste(' ', var.names, sep='')\n d\n }\n}; cat('\n'); print(.rdired.objects(ls()))}\n" (#$ . 160)) #@42 Name of buffer for displaying R objects. (defvar ess-rdired-buffer "*R dired*" (#$ . 1255)) (defvar ess-rdired-mode-map (byte-code "\301 \302\303\304\305#\203\306\307\303#\210\306\310\311#\210\306\312\313#\210\306\314\315#\210\306\316\317#\210\306\320\321#\210\306\322\323#\210\306\324\325#\210\306\326\327#\210\306\330\331#\210\306\332\333#\210\306\334\335#\210\306\336\337#\210\306\340\341#\210\306\342\337#\210\306\343\341#\210\306\344\345#\210\306\346\347#\210\306\350\351#\210\306\352\337#\210\306\353\341#\210\306\354\355#\210\306\356\357#\210)\207" [ess-rdired-mode-map make-sparse-keymap require hide-lines nil t define-key "/" "?" ess-rdired-help "d" ess-rdired-delete "u" ess-rdired-undelete "x" ess-rdired-expunge "v" ess-rdired-view "V" ess-rdired-View "p" ess-rdired-plot "s" ess-rdired-sort "r" ess-rdired-reverse "q" ess-rdired-quit "y" ess-rdired-type " " ess-rdired-next-line [backspace] ess-rdired-previous-line "" "" "" ess-rdired-switch-process "" ess-switch-to-ESS "" ess-switch-to-end-of-ESS [down] [up] "g" revert-buffer [mouse-2] ess-rdired-mouse-view] 4)) #@259 Major mode for output from `ess-rdired'. `ess-rdired' provides a dired-like mode for R objects. It shows the list of current objects in the current environment, one-per-line. You can then examine these objects, plot them, and so on. \{ess-rdired-mode-map} (defalias 'ess-rdired-mode #[nil "\305\300!\210\306\307 !\210\310\311 P\312\313!\207" [revert-buffer-function ess-rdired-mode-map major-mode ess-local-process-name mode-name make-local-variable ess-rdired-revert-buffer use-local-map ess-rdired-mode "RDired " run-mode-hooks ess-rdired-mode-hook] 2 (#$ . 2378)]) #@38 Run upon entering `ess-rdired-mode'. (defalias 'ess-rdired-mode-hook #[nil "\300\207" ["Run upon entering `ess-rdired-mode'."] 1 (#$ . 2957)]) (defvar ess-rdired-sort-num nil) #@132 Run dired-like mode on R objects. This is the main function. See documentation for `ess-rdired-mode' though for more information! (defalias 'ess-rdired #[nil "\306 !\307\f\n\"\210\310 J\n\"\210r\nq\210 \311 \210eb\210e\312 T|\210\313\314\212eb\210\313y\210`)d\"\210\315)\316\n!*\207" [ess-local-process-name ess-rdired-buffer buff proc ess-rdired-objects ess-local-customize-alist get-buffer-create ess-command ess-setq-vars-local ess-rdired-mode point-at-eol 1 ess-rdired-insert-set-properties t pop-to-buffer ess-rdired-sort-num buffer-read-only] 3 (#$ . 3140) nil]) #@89 Return name of object on current line. Handle special case when object contains spaces. (defalias 'ess-rdired-object #[nil "\212\301 \210\302u\210\303\304!\203\305\2028\303\306!\203*\305`\307u\210\310\306!\210\311`\")\2028\305`\310\304!\210\311`S\"))\207" [beg beginning-of-line 2 looking-at " " nil "\"" 1 search-forward buffer-substring-no-properties] 3 (#$ . 3724)]) #@33 Edit (fix) the object at point. (defalias 'ess-rdired-edit #[nil "\301 \302\303\304Q!)\207" [objname ess-rdired-object ess-command "edit(" ")\n"] 4 (#$ . 4111) nil]) #@27 View the object at point. (defalias 'ess-rdired-view #[nil "\301 \302\303!\304\305#)\207" [objname ess-rdired-object ess-execute ess-rdired-get nil "R view"] 4 (#$ . 4285) nil]) #@198 Generate R code to get the value of the variable NAME. This is complicated because some variables might have spaces in their names. Otherwise, we could just pass the variable name directly to *R*. (defalias 'ess-rdired-get #[(name) "\301\302!\303Q\207" [name "get(" ess-rdired-quote ")"] 3 (#$ . 4472)]) #@35 Quote NAME if not already quoted. (defalias 'ess-rdired-quote #[(name) "\301\302O\303\232\203 \207\303\303Q\207" [name 0 1 "\""] 3 (#$ . 4783)]) #@110 View the object at point in its own buffer. Like `ess-rdired-view', but the object gets its own buffer name. (defalias 'ess-rdired-View #[nil "\301 \302\303!\304\305P#)\207" [objname ess-rdired-object ess-execute ess-rdired-get nil "R view "] 5 (#$ . 4939) nil]) #@34 Plot the object on current line. (defalias 'ess-rdired-plot #[nil "\301 \302\303\304\305!\"!)\207" [objname ess-rdired-object ess-eval-linewise format "plot(%s)" ess-rdired-get] 5 (#$ . 5211) nil]) #@109 Run the mode() on command at point. Named type because of similarity with the dired command bound to y key. (defalias 'ess-rdired-type #[nil "\302 \303\304!\211\205'\305\306\307 !\310Q\"\210q\210\311 \312\313e\\dS{Q!\210\314!*\207" [tmpbuf objname ess-rdired-object get-buffer-create "**ess-rdired-mode**" ess-command "mode(" ess-rdired-get ")\n" message ": " 4 kill-buffer] 6 (#$ . 5418) nil]) #@118 Mark the current (or next ARG) objects for deletion. If point is on first line, all objects are marked for deletion. (defalias 'ess-rdired-delete #[(arg) "\301\302\"\207" [arg ess-rdired-mark "D"] 3 (#$ . 5826) "p"]) #@100 Unmark the current (or next ARG) objects. If point is on first line, all objects will be unmarked. (defalias 'ess-rdired-undelete #[(arg) "\301\302\"\207" [arg ess-rdired-mark " "] 3 (#$ . 6051) "p"]) #@73 Mark the object, using MARK-CHAR, on current line (or next ARG lines). (defalias 'ess-rdired-mark #[(mark-char arg) "\304\211e\212\305 \210`)=\203`\306y\210\307`d\"\n\310V\2036m\2046\nS\305 \210 c\210\311\306!\210\306y\210\202\205<b*\207" [move buffer-read-only arg mark-char nil beginning-of-line 1 count-lines 0 delete-char] 3 (#$ . 6259)]) #@98 Delete the marked objects. User is queried first to check that objects should really be deleted. (defalias 'ess-rdired-expunge #[nil "\302\303\212eb\210\304y\210\305e`\"\305ed\"W\203/\306 \210\307\310!\203)T \311 \312Q\304y\210\202 )\303V\203a \303 G\313ZO\314P\315\316\317\211\304V\203N\320\202O\321#!\205d\322 \323\211\211\324%\210\325 \202d\326\327!*\207" [count objs "rm(" 0 1 count-lines beginning-of-line looking-at "^D " ess-rdired-object ", " 2 ")\n" yes-or-no-p format "Delete %d %s " "objects" "object" ess-eval-linewise nil wait ess-rdired message "no objects set to delete"] 6 (#$ . 6623) nil]) #@26 Quit the R dired buffer. (defalias 'ess-rdired-quit #[nil "\301!\207" [ess-rdired-buffer kill-buffer] 2 (#$ . 7252) nil]) #@110 Update the buffer list (in case object list has changed). Arguments IGNORE and NOCONFIRM currently not used. (defalias 'ess-rdired-revert-buffer #[(ignore noconfirm) "\300 \207" [ess-rdired] 1 (#$ . 7382)]) #@34 Show help for `ess-rdired-mode'. (defalias 'ess-rdired-help #[nil "\300\301!\207" [describe-function ess-rdired-mode] 2 (#$ . 7595) nil]) #@105 Sort the rdired output according to one of the columns. Rotate between the alternative sorting methods. (defalias 'ess-rdired-sort #[nil "T\304\212eb\210\305y\210`)d\306V\203\305\307\267\202?\310\305\n #\202@\310\311\n #\202@\312\313\n #\202@\312\306\n #\202@\304+\207" [ess-rdired-sort-num end beg buffer-read-only nil 1 4 #s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (1 31 2 39 3 47 4 55)) sort-fields 2 sort-numeric-fields 3] 4 (#$ . 7740) nil]) #@33 Reverse the current sort order. (defalias 'ess-rdired-reverse #[nil "\303\212eb\210\304y\210`)d\305 \"+\207" [end beg buffer-read-only nil 1 reverse-region] 3 (#$ . 8250) nil]) #@112 Move down lines then position at object. Optional prefix ARG says how many lines to move; default is one line. (defalias 'ess-rdired-next-line #[(arg) "y\210\301 \207" [arg ess-rdired-move-to-object] 1 (#$ . 8438) "p"]) #@110 Move up lines then position at object. Optional prefix ARG says how many lines to move; default is one line. (defalias 'ess-rdired-previous-line #[(arg) "\206\301[y\210\302 \207" [arg 1 ess-rdired-move-to-object] 1 (#$ . 8666) "p"]) #@31 Put point at start of object. (defalias 'ess-rdired-move-to-object #[nil "\300 \210\301u\207" [beginning-of-line 2] 1 (#$ . 8908)]) #@55 In rdired, visit the object on the line you click on. (defalias 'ess-rdired-mouse-view #[(event) "\303\211\212\304\n!\211@\262\305\304\n!!\306 !\204\307\310!\210\311 !q\210b\210\312 +\207" [pos window event nil event-end posn-point windowp error "No file chosen" window-buffer ess-rdired-view] 3 (#$ . 9046) "e"]) #@67 Add mouse highlighting to each object name in the R dired buffer. (defalias 'ess-rdired-insert-set-properties #[(beg end) "\212b\210` W\205 \302 \210\303`\212\304\305!\210`S)\306#\210\307y\210\202)\207" [beg end ess-rdired-move-to-object add-text-properties search-forward " " (mouse-face highlight help-echo "mouse-2: view object in other window") 1] 4 (#$ . 9374)]) #@243 Switch to examine different *R* process. If you have multiple R processes running, e.g. *R*, *R:2*, *R:3*, you can use this command to choose which R process you would like to examine. After switching to a new process, the buffer is updated. (defalias 'ess-rdired-switch-process #[nil "\300 \210\301 \207" [ess-switch-process ess-rdired] 1 (#$ . 9753) nil]) (provide 'ess-rdired)