LoginSignup
2
1

More than 5 years have passed since last update.

CUIで簡易統計関数

Posted at

実験とかしているとcutとかpasteやった後に平均とか標準偏差とか見たくなりますよね。ってことでRさんの関数をエイリアスで呼び出す。

for f in mean sd max min
do
    alias $f="R --vanilla --slave -e \"x <- scan('stdin', quiet=TRUE); cat($f(x), fill=TRUE)\""
done

こんな感じで使う。

% jot 10 | mean
5.5
% jot 10 | sd
3.02765

便利。ちょっと起動に時間がかかるけど。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1