Open RaymondBalise opened 6 years ago
In the file 15-RStudio-essentials/1-Writing-Code/sample-script.R the definition of barchart has z listed twice and the function uses z where it should use x. It should be x, z to match the video.
barchart <- function(x, z, width = 0.9) { require(ggplot2)
counts <- table(x) df <- data.frame( value = names(counts), count = as.numeric(counts) )
ggplot(df) + geom_bar(aes(x = value, y = count), stat = "identity", width = width) }
@garrettgman Could you take a look?
In the file 15-RStudio-essentials/1-Writing-Code/sample-script.R the definition of barchart has z listed twice and the function uses z where it should use x. It should be x, z to match the video.
barchart <- function(x, z, width = 0.9) { require(ggplot2)
counts <- table(x) df <- data.frame( value = names(counts), count = as.numeric(counts) )
ggplot(df) + geom_bar(aes(x = value, y = count), stat = "identity", width = width) }