1
2

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 > データ操作 > データ作成 > approx() + jitter() > 線形補間 + ノイズ付加

Last updated at Posted at 2016-09-23
動作環境
RStudio 0.99.903 on Windows 7 pro
R version 3.3.1

R機能マップ http://qiita.com/7of9/items/0f911bcb95d3a8bbd703

スプライン補間ではどうも欲しいサンプルデータを作るのが難しい。

線形補間してノイズを足すことにした。

線形補間はapprox
https://stat.ethz.ch/R-manual/R-devel/library/stats/html/approxfun.html

> x<-c(153,289,575,623,728,733,808,812,894)
> y<-c(653,453,349,454,453,525,526,607,622)
> plot(x,y)

qiita.png

> z<-approx(x,y,n=100)
> plot(z)

qiita.png

> zz<-jitter(z$y, factor=1000)
> plot(z$x,zz)

qiita.png

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?