Skip to content

Typo in function defintion #36

@RaymondBalise

Description

@RaymondBalise

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions