{"action":"closed","issue":{"url":"https://api.github.com/repos/STAT545-UBC/Discussion/issues/207","labels_url":"https://api.github.com/repos/STAT545-UBC/Discussion/issues/207/labels{/name}","comments_url":"https://api.github.com/repos/STAT545-UBC/Discussion/issues/207/comments","events_url":"https://api.github.com/repos/STAT545-UBC/Discussion/issues/207/events","html_url":"https://github.com/STAT545-UBC/Discussion/issues/207","id":114135713,"number":207,"title":"error when trying to open figure - part 2","user":{"login":"bdacunha","id":14184696,"avatar_url":"https://avatars.githubusercontent.com/u/14184696?v=3","gravatar_id":"","url":"https://api.github.com/users/bdacunha","html_url":"https://github.com/bdacunha","followers_url":"https://api.github.com/users/bdacunha/followers","following_url":"https://api.github.com/users/bdacunha/following{/other_user}","gists_url":"https://api.github.com/users/bdacunha/gists{/gist_id}","starred_url":"https://api.github.com/users/bdacunha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdacunha/subscriptions","organizations_url":"https://api.github.com/users/bdacunha/orgs","repos_url":"https://api.github.com/users/bdacunha/repos","events_url":"https://api.github.com/users/bdacunha/events{/privacy}","received_events_url":"https://api.github.com/users/bdacunha/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-29T20:11:09Z","updated_at":"2015-11-02T21:03:13Z","closed_at":"2015-11-02T21:03:13Z","body":"I know this is probably too late for hw05, but I still want to know what is the problem:\r\n\r\nI have tried several times to embed the figure I saved as a png with ggsave and I get this problems:\r\n1) It won't knit because it says that the file can not be fetched by pandoc\r\n2) It will knit but I get a blank box instead of the picture\r\n3) It will knit but I get a link to the rmd file instead of the picture.\r\n\r\nI tried google and they say it's a common problem, and that it can be usually fixed by adding\r\nself contained: FALSE just below output and html_document, but this takes me to error 3.\r\n\r\nI also tried changing my working directory to where my rmd file lives, but this will lead me to error 1. If I change the directory to the main page of my repo this will either give me error 1 or sometimes 2.\r\n\r\nIt seems super simple, but I really don't know what's the problem with this...\r\n\r\nThis is the code I used for the figure and for saving the plot. This is error 3.\r\n\r\n```{r}\r\np <- ggplot(gapminder, aes(x = reorder(continent, lifeExp), y = lifeExp)) + geom_boxplot(aes(color = continent)) + geom_jitter( aes(color = continent), position = position_jitter(width=0.02), alpha = 0.2) + xlab('Continent') + ylab('Life Expectancy') + ggtitle('Life Expectancy of every continent')\r\n\r\nggsave('lifeExp_boxplot_nicer.png', plot = p)\r\n```\r\n\r\nBrenda"}}