yutannihilation / gghighlight

Highlight points and lines in ggplot2

Home Page:https://yutannihilation.github.io/gghighlight/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation Example uses undefined data variable

evensolberg opened this issue · comments

The examples in the README.md use the variable d for data, but nowhere is d actually defined.

If this is just a "random" data set, perhaps the example could be reworked with actual data, such as mtcars?

Oh, good point, thanks. Currently the data is generated by this code, which I felt a bit too long to show:

gghighlight/README.Rmd

Lines 39 to 49 in 3808493

set.seed(2)
d <- purrr::map_dfr(
letters,
~ data.frame(
idx = 1:400,
value = cumsum(runif(400, -1, 1)),
type = .,
flag = sample(c(TRUE, FALSE), size = 400, replace = TRUE),
stringsAsFactors = FALSE
)
)

I don't think mtcars is a good example data for gghighlight. We need some more messy data like the current one. Feel free to suggest a nice one!

That chunk isn't that long IMHO. Especially if you just put it in a separate paragraph initially.

Imho, this is too long.

Just in case you don't notice, I included it in the getting started vignette.

https://yutannihilation.github.io/gghighlight/articles/gghighlight.html

I did not. Thanks. Perhaps a quick note about that could be placed near the top of the README? That would take care of it nicely. :-)