2 r <- read.csv("userstats-ranges.csv", stringsAsFactors = FALSE)
3 r <- melt(r, id.vars = c("date", "country"))
4 r <- data.frame(date = r$date, node = "relay", country = r$country,
5 transport = "", version = "",
6 variable = ifelse(r$variable == "maxusers", "upper", "lower"),
7 value = floor(r$value))
8 u <- read.csv("userstats.csv", stringsAsFactors = FALSE)
9 u <- melt(u, id.vars = c("date", "node", "country", "transport",
11 u <- data.frame(date = u$date, node = u$node, country = u$country,
12 transport = u$transport, version = u$version,
13 variable = ifelse(u$variable == "frac", "frac", "clients"),
16 c <- cast(c, date + node + country + transport + version ~ variable)
17 c <- c[order(c$date, c$node, c$country, c$transport, c$version), ]
18 write.csv(c, "clients.csv", quote = FALSE, row.names = FALSE, na = "")