我一直收到此错误"Error in seq.int(from, to, length.out = n) : 'from' must be a finite number."
我在下面发布了我的代码。
p <- seq(0, 1, .01)
qnorm(p, mean=0, sd=1)
qcauchy(p, location = 0, scale = 1)
plot(qnorm, qcauchy, main = "Normal-Cauchy", xlab="normal", ylab = "cauchy")
答案 0 :(得分:0)
您需要存储来自qnorm()
和qcauchy()
的对象。尝试:
p <- seq(0, 1, .01)
q1 <- qnorm(p, mean = 0, sd = 1)
q2 <- qcauchy(p, location = 0, scale = 1)
plot(q1, q2, main = "Normal-Cauchy", xlab = "Normal", ylab = "Cauchy")