The filename argument must be a string in quotes. Here, myplot.png is unquoted, causing an error.
Step 2: Verify other parts
The plot object p is defined, PNG is supported, and library(ggplot2) is loaded, so no other errors.
Final Answer:
Missing quotes around filename 'myplot.png' -> Option D
Quick Check:
Filename must be quoted string [OK]
Hint: Always put quotes around filenames in ggsave() [OK]
Common Mistakes:
Forgetting quotes around filename
Assuming ggsave needs extra libraries
Thinking PNG format is unsupported
5. You want to save two different ggplot objects, p1 and p2, as PNG files with different sizes. Which code correctly saves p1 as 6x4 inches and p2 as 8x6 inches?