waffle
waffle copied to clipboard
Error when running source code as my own function
Hello, I'm attempting to modify the source code to change some of the parameters. Here is what I'm doing:
- Copy full source code
- Paste into script file in R Studio
- Name the function waffle_mod <- and run the code
Here is the script with the error message at the bottom. Do you know of any way that I could address this issue?
waffle_mod(c("Male" = 6, "Female" = 4),
- rows = 1, use_glyph = "male", glyph_size = 8, colors = c("#000000","#CCCCCC"),
- xlab = "67% Agree", legend_pos = "none") Error in fa_unicode() : could not find function "fa_unicode"
The thing is that @hrbrmstr created fa_unicode with a dot before its name: .fa_unicode.
This hides its code inside the "waffle" environment in R. To see it's code use :::
That is, to make it work, use .fa_unicode <- waffle:::.fa_unicode