Skip to content

Issues in knitting on ggplots #63

Open
@TeeMuchini

Description

@TeeMuchini

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions