绘图表问题

时间:2018-10-24 18:29:21

标签: r plot histogram boxplot

当我尝试在R中键入以下代码

library(openintro)
data("email")
attach(email)

email_small <- sample(x = email$num_char, size = 100)

hist(email_small)
boxplot(x, email_small )
x = email$num_char
head(email$num_char, n=5)
mean(head(email$num_char, n=5))


xbar5 <- rep(NA, length = 100)
for (i in 1:100) {
  email5 <- sample(x = email$num_char, size = 5)
  xbar5[i] <- mean(email5)
}
mean(xbar5)

hist(xbar5)
boxplot(x, xbar5)

但是在绘图表上没有显示直方图或箱线图。为什么没有显示图形?我认为RStudio一定有问题。

0 个答案:

没有答案