Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues in knitting on ggplots #63

Open
TeeMuchini opened this issue Aug 2, 2018 · 0 comments
Open

Issues in knitting on ggplots #63

TeeMuchini opened this issue Aug 2, 2018 · 0 comments

Comments

@TeeMuchini
Copy link

TeeMuchini commented Aug 2, 2018

i am trying to knit gpplot code to pdf file and it gives me an error.The dataframe in R is called retailyoy and the plot is to show .The code run in R Markdown give me this output.
image

but gives me problem when i am trying to knit.Below is error message:

"Error in ggplot(data = retailyoy, aes(x = retailyoy$Supplier Name, y = retailyoy$SALES_CHANGE, :
object 'retailyoy' not found
Calls: ... withCallingHandlers -> withVisible -> eval -> eval -> ggplot
Execution halted"

Below is the chunk code:

library('ggplot2')
p1=ggplot(data=retailyoy, aes(x=retailyoy$`Supplier Name`, y=retailyoy$SALES_CHANGE, fill=DEPARTMENT, coord_cartesian(xlim = c(-200, 200))))+ geom_bar(stat="identity") +  coord_flip() + scale_fill_brewer(palette="Dark2") +  labs(title="YEAR ON YEAR GROWTH OF SALES",x="SUPPLIER NAME", y = "%YOY GROWTH")
p1+ geom_boxplot()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant