Skip to content

line_df not defined in README.md #12

Description

@trashbirdecology

The dataframe used to plot the example, line_df is not defined.

Perhaps create an example df and save to the package, or provide code in .md to create line_df.

Activity

  1. hlj-datacamp commented on Mar 28, 2019

    @hlj-datacamp

    The line_df dataframe is a filtered down version of the gapminder dataset. This comes with an R install and can be accessed by putting library(gapminder) at the top of your code :)

  2. trashbirdecology commented on Mar 29, 2019

    @trashbirdecology
    Author

    Thanks for the clarification. It may be useful to, in README.md, define the line_df, as whatever subset of gapminder you prefer, such that the "typical workflow" code chunk can be run directly. May also be useful to rename line_df --> my_line_plot.

    E.g. 👍
    line_df = gapminder %>% filter(country == "Afghanistan")
    my_line_plot <- ggplot(line_df, aes(x = year, y = lifeExp)) +
    geom_line(colour = "#007f7f", size = 1) +
    geom_hline(yintercept = 0, size = 1, colour="#333333") +
    bbc_style()
    finalise_plot(plot_name = my_line_plot, source = "Source: ONS", save_filepath = "filename_that_my_plot_should_be_saved_to-nc.png", width_pixels = 640, height_pixels = 550)

    Just a thought. Thanks for the pkg!

  3. trashbirdecology commented on Mar 29, 2019

    @trashbirdecology
    Author

    I now see that someone has submitted a pr; (#2), so I will close this:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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