In R, hist
is a great function to create histograms from data.
It counts data, compute frequency, and show a histogram.
Then how can I get histograms from frequency data that I already have?
I wasn’t able to find nicer solution, so wrote this.
Month: July 2014
ファイルを番号順にソートする
連番が含まれるような名前のファイルがあったときに
$ ls
10.txt 11.txt 12.txt 13.txt 14.txt 15.txt 1.txt 2.txt 3.txt 4.txt 5.txt 6.txt 7.txt 8.txt 9.txt
という要領でアルファベット順にソートされてしまうが,
$ ls -v
1.txt 2.txt 3.txt 4.txt 5.txt 6.txt 7.txt 8.txt 9.txt 10.txt 11.txt 12.txt 13.txt 14.txt 15.txt
とすれば自然な順序になる.べんり.
man
曰く,
-v natural sort of (version) numbers within text
Emacs 24 でクリップボードとの連携が上手くいかなくなった
というわけで Emacs 24 に晴れてバージョンアップすることになった.
M-; emacs-version
=> "24.3.1"
一応そんなに破壊的な変更は無いと見ていたし,実際ほとんど .emacs に変更は必要なかったが,X 周りは若干変わった点があったので注意が必要.
Emacs: git-gutter が便利過ぎる
あまりに感動したのでつい.
SublimeText にある GitGutter という拡張の Emacs Lisp 版が git-gutter.el である.
簡単に言うと git リポジトリ内で編集中のファイルのどの行が変更されたのかなどを常に表示しておいてくれる.
たぶん git-gutter.el – Emacs JP とかを見れば分かる.
▲左側の緑色の “+” のところね.
Graphviz で subgraph が無視される
Graphviz の subgraph を明示的に描画させるには subgraph の名前を cluster で始めないといけない.
このへん (The DOT Language | Graphviz – Graph Visualization Software) に
If the name of the subgraph begins with cluster, Graphviz notes the subgraph as a special cluster subgraph.
と書いてある.
関係ないけれど subgraph と subgraph の間にエッジを設定したい場合は dot ではなく fdp を使えば良い.
Proudly powered by WordPress.
Theme: Flat by YoArts.