hadley/r4ds

Issue in demonstration of Environment

Opened this issue · 0 comments

The code writes

ggplot(diamonds, aes(x = carat, y = price)) +
geom_hex()I
ggsave("diamonds.png")

write_csv(diamonds, "data/diamonds.csv")

-> this is wrong as u first have to create the sub directory. hence, it should be:

ggplot(diamonds, aes(x = carat, y = price)) +
geom_hex()I
ggsave("data/diamonds.png")

write_csv(diamonds, "data/diamonds.csv")