Skip to content

Instantly share code, notes, and snippets.

makeSearchCommand({
name: "statjp",
url: "http://www.google.co.jp/search?q={QUERY}&hl=ja&ie=EUC-JP&oe=UTF-8&btnG=Google+%B8%A1%BA%F7&domains=OKADA.JP.ORG&sitesearch=OKADA.JP.ORG",
icon: "http://www.okada.jp.org/RWiki/?plugin=attach&refer=%CD%D7%CB%BE%B7%C7%BC%A8%C8%C4&openfile=R.ico",
description: "日本におけるR関連情報集約サイト",
});
CmdUtils.CreateCommand({
name: "wikipedia-ja",
takes: {search: noun_arb_text},
locale: "en-US",
homepage: "http://theunfocused.net/moz/ubiquity/verbs/",
author: {name: "Blair McBride", email: "blair@theunfocused.net"},
license: "MPL",
icon: "http://ja.wikipedia.org/favicon.ico",
description: "Searches Wikipedia for your words.",
preview: function(previewBlock, directObject) {
library("R2WinBUGS")
plot(density(rnorm(10000000)))
library(twitteR)
init <- initSession("username", "password")
followlist <- userFriends("username",init)
follow <- sapply(1:length(followlist), function(x) followlist[[x]] @ friendsCount)
follower <- sapply(1:length(followlist), function(x) followlist[[x]] @ followersCount)
status <- sapply(1:length(followlist), function(x) followlist[[x]] @ statusesCount)
name <- sapply(1:length(followlist), function(x) followlist[[x]] @ screenName)
mat <- cbind(follow, follower, status)
rownames(mat) <- name
mat <- mat[complete.cases(mat),]
(defun iedit-mode ()
"Toggle iedit mode.
If iedit mode is off, turn iedit mode on using active region as
input, off otherwise.
In iedit mode, all the occurrences of the input region are
highlighted. If one occurrence is modified, the change are
propagated to all other occurrences simultaneously.
If the region is not active, the `current-word' is used as
;;; 物理行の移動
(global-set-key "¥C-p" 'previous-window-line)
(global-set-key "¥C-n" 'next-window-line)
(defun previous-window-line (n)
(interactive "p")
(let ((cur-col
(- (current-column)
(save-excursion (vertical-motion 0) (current-column)))))
(vertical-motion (- n))
(move-to-column (+ (current-column) cur-col)))
@myuhe
myuhe / ess-R-object-popup.el
Created March 1, 2010 13:16
ess-R-object-popup.el
;; ess-R-object-popup.el
;;
;; I have defined a function, ess-R-object-popup, that when
;; invoked, will return a popup with some information about
;; the object at point. The information returned is
;; determined by which R function is called. This is controlled
;; by an alist, called ess-R-object-popup-alist. The default is
;; given below. The keys are the classes of R object that will
;; use the associated function. For example, when the function
;; is called while point is on a factor object, a table of that
(require 'ess-rutils)
(require 'ess-eldoc)
(setq ess-language "R")
(setq ess-rutils-keys t)
@myuhe
myuhe / gist:327649
Created March 10, 2010 07:44
anything-c-source-R-pkg
(defun anything-ess-marked-install (candidate)
(dolist (i (anything-marked-candidates))
(ess-execute (concat "install.packages(\"" i "\")\n") t)))
(defun anything-ess-marked-remove (candidate)
(dolist (i (anything-marked-candidates))
(ess-execute (concat "remove.packages(\"" i "\")\n") t)))
(setq anything-c-source-R-localpkg
'((name . "R-local-packages")
(setq anything-c-moccur-anything-idle-delay 0.2
anything-c-moccur-higligt-info-line-flag t
anything-c-moccur-enable-auto-look-flag t
anything-c-moccur-enable-initial-pattern nil)
(set-face-foreground 'anything-file-name "SteelBlue1")
(set-face-foreground 'anything-dir-priv "OrangeRed")
(set-face-background 'anything-dir-priv "black")