2
3

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.

Rで外れ値(3σ外の値)を弾いて結果をファイル出力

Last updated at Posted at 2018-04-25

メモがわりとして

外れ値の除去

remove.R
m <- mean(x)
s <- sd(x)
removed <- x[(x>=m-3*s)&(x<=m+3*s),]

ファイルへの出力

output.R
write.csv(removed,"~/Desktop/write.csv",row.names = FALSE)

write.csv()は引数でrow.names = FALSEを渡さないと1列目を行名として扱おうとするので注意

2
3
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
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?