1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ワンライナーで平均と標準偏差を計算する

Last updated at Posted at 2015-12-23

この計算のために、初めてRをインストールした。

コマンド

R -q -e "x <- read.csv(file='filename',header=F); summary(x); sd(x[ , 1])"

実行例

$ seq 1 10 | R -q -e "x <- read.csv(file='stdin',header=F); summary(x); sd(x[ , 1])"
> x <- read.csv(file='stdin',header=F); summary(x); sd(x[ , 1])
       V1       
 Min.   : 1.00  
 1st Qu.: 3.25  
 Median : 5.50  
 Mean   : 5.50  
 3rd Qu.: 7.75  
 Max.   :10.00  
[1] 3.02765
> 
> 

参考文献

1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?