Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

change "mean <- mean(data)" to "mean <- colMeans(data)". #2

Merged
merged 1 commit into from

2 participants

@Motokiy

No description provided.

@setoyama60jp setoyama60jp merged commit 806b892 into setoyama60jp:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 Chapter4/example4-8.r
View
4 Chapter4/example4-8.r
@@ -2,7 +2,7 @@ library(ggplot2)
pdf("figure4-5.pdf")
data <- read.table("simulation2.csv", header = TRUE, sep = ",")
-mean <- mean(data)
+mean <- colMeans(data)
median <- apply(data, 2, median)
max <- apply(data, 2, max)
df <- data.frame(facilities = seq(from = 1, to = 30), mean = mean, median = median, max = max)
@@ -17,4 +17,4 @@ ggplot(data = df) + scale_shape_manual(name = "Type", values=c(2,3,4)) +
scale_y_continuous("queue size") +
scale_x_continuous("number of facilities in a restroom")
-print(df)
+print(df)
Something went wrong with that request. Please try again.