emilyriederer / Rtistic

A hackathon-in-a-box / "cookbook" to help build an R package with custom RMarkdown themes and ggplot2 themes & palettes. This looks like a package but it is not intended to be installed as-is. It is a wireframe to be used by an individual or group to create their *own* package!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ggplot Palette Instructions

vidonne opened this issue · comments

First thanks for this template this is extremely useful.
I followed the below instruction about the creation of palette from the README but for whatever reason it is not picked up by the Roxygen and I can't figured out why.
Defining the palette

  • Make a copy of the R/gg-palette-test.R file in the same folder. Rename it as gg-palette-{theme}.R where {theme} represents something descriptive about your theme.
  • Change the definitions of the variables test_pal, test_pal_cont, and test_pal_div and rename the test prefix to something appropriate (probably the {theme} stub)
  • Update the documentation to describe your palette
  • Save your file and run it locallly
    Do I need to change something in R/infra-palette.R? Couldn't figures out where the name of the palettes come from when we call them in the scales. Anyway when I run get_rtistic_palettes() only the test_pal shows up.

Thanks for the comment!

Could you please explain a bit more about what is breaking? I'm not quite sure what the behavior is that we are trying to fix.

Also, do you happen to have your work in a GitHub repo? It might be easier for me to take a look there.

I do realize that my instructions don't provide the generic "packaging" aspect. If I understand that the problem is automatically generating the Rd files in the man/ directory, you might also need to run devtools::document()

Thanks for your reply actually after checking the package and installing the xarigan package it started to work properly. Sorry to bother and thanks again for this great project.