Attachment 'ess-config.el'
Download 1 (require 'ess-site)
2 (require 'essd-jags)
3 (setq inferior-R-program-name "R")
4 (setq ess-ask-for-ess-directory nil)
5 (setq ess-local-process-name "R")
6 (setq comint-prompt-read-only t)
7 (setq comint-scroll-to-bottom-on-input t)
8 (setq comint-scroll-to-bottom-on-output t)
9 (setq comint-move-point-for-output t)
10 ;; (setq ansi-color-for-comint-mode 'filter)
11
12 (defun my-ess-start-R ()
13 (interactive)
14 (if (not (member "*R*" (mapcar (function buffer-name) (buffer-list))))
15 (progn
16 (delete-other-windows)
17 (setq w1 (selected-window))
18 (setq w1name (buffer-name))
19 (setq w2 (split-window w1))
20 (R)
21 (set-window-buffer w2 "*R*")
22 (set-window-buffer w1 w1name)
23 )
24 )
25 )
26
27 (defun my-ess-eval ()
28 (interactive)
29 (my-ess-start-R)
30 (if (and transient-mark-mode mark-active)
31 (call-interactively 'ess-eval-region)
32 (call-interactively 'ess-eval-line-and-step))
33 )
34
35 (add-hook 'ess-mode-hook
36 '(lambda()
37 (local-set-key [(shift return)] 'my-ess-eval)))
38
39 (add-hook 'inferior-ess-mode-hook
40 '(lambda()
41 (local-set-key [C-up] 'comint-previous-input)
42 (local-set-key [C-down] 'comint-next-input)))
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.