LoginSignup
0
0

More than 1 year has passed since last update.

R: 指数分布の関数の描画

Posted at

こちらのページを参考にしました。
Exponential Distribution in R Programming – dexp(), pexp(), qexp(), and rexp() Functions

dexp

dexp.R
write("*** 開始 ***", stderr())
x_dexp <- seq(0,1, by=0.02)
x_dexp
y_dexp <- dexp(x_dexp, rate =5)
png("./dexp.png", height = 1000, width = 1000, res = 216)
plot (y_dexp, main="dexp")
lines(y_dexp)
write("*** 終了 ***", stderr())

プログラムの実行

Rscript dexp.R

dexp.png

pexp

pexp.R
write("*** 開始 ***", stderr())
x_pexp <- seq(0,1, by=0.02)
x_pexp
y_pexp <- pexp(x_pexp, rate =5)
png("./pexp.png", height = 1000, width = 1000, res = 216)
plot (y_pexp, main="pexp")
lines(y_pexp)
write("*** 終了 ***", stderr())

プログラムの実行

Rscript pexp.R

pexp.png

qexp

qexp.R
write("*** 開始 ***", stderr())
x_qexp <- seq(0,1, by=0.02)
x_qexp
y_qexp <- qexp(x_qexp, rate =5)
png("./qexp.png", height = 1000, width = 1000, res = 216)
plot (y_qexp, main="qexp")
lines(y_qexp)
write("*** 終了 ***", stderr())

プログラムの実行

Rscript qexp.R

qexp.png

画像を連続に表示する方法

eog ./
0
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
0
0