Skip to content

Instantly share code, notes, and snippets.

View daroczig's full-sized avatar

Gergely Daróczi daroczig

View GitHub Profile
@hadley
hadley / gist:837414
Created February 21, 2011 17:50
which-encoding.r
all <- iconvlist()
names(all) <- all
tries <- llply(all[330:350], function(cur) iconv(song$artist, cur, "UTF-8"))
vapply(tries, function(x) sum(is.na(x)), integer(1))
;; Via http://blogisticreflections.wordpress.com/2009/10/01/r-object-tooltips-in-ess/
;;
;; ess-R-object-tooltip.el
;;
;; I have defined a function, ess-R-object-tooltip, that when
;; invoked, will return a tooltip 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-tooltip-alist. The default is
;; given below. The keys are the classes of R object that will
;; ESS: Emacs Speaks Statistics
(load "~/elisp/vendor/ess/lisp/ess-site.el")
;; Use shift-enter to split window & launch R (if not running), execute highlighted
;; region (if R running & area highlighted), or execute current line
;; (and move to next line, skipping comments). Nice.
;; See http://www.emacswiki.org/emacs/EmacsSpeaksStatistics,
;; FelipeCsaszar. Adapted to spilit vertically instead of
;; horizontally.