1
0

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 > 関数定義 + plot() > 直線 / ロジスティック曲線

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

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

参考 http://cse.naro.affrc.go.jp/takezawa/r-tips/r/31.html

関数を作ってそれをplotしてみる。

> f<-function(x) 2*x
> y<-f(1:10)
> plot(y)

qiita.png

ロジスティック曲線が自分が欲しいサンプルデータの形に似ている。
http://www.weblio.jp/content/%E3%83%AD%E3%82%B8%E3%82%B9%E3%83%86%E3%82%A3%E3%83%83%E3%82%AF%E6%9B%B2%E7%B7%9A

> f<-function(x,a,b,c) a/(1+b*exp(-c*x))
> y<-f(1:100,0.0109069, 0.6005591, 0.1)
> plot(y)

qiita.png

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?