Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in function defintion #36

Open
RaymondBalise opened this issue Feb 24, 2018 · 1 comment
Open

Typo in function defintion #36

RaymondBalise opened this issue Feb 24, 2018 · 1 comment

Comments

@RaymondBalise
Copy link

RaymondBalise commented Feb 24, 2018

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)
}

@carneybill
Copy link
Contributor

@garrettgman Could you take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants