Have a look at the Usage instructions,
You can also get screenshots of a portion of a web page using CSS selectors. If there are multiple matches for the CSS selector, it will use the first match.
webshot("https://www.r-project.org/", "r-sidebar.png", selector = ".sidebar")
If you supply multiple CSS selectors, it will take a screenshot containing all of the selected items.
webshot("https://www.r-project.org/", "r-selectors.png",
selector = c("#getting-started", "#news"))
The clipping rectangle can be expanded to capture some area outside the selected items:
webshot("https://www.r-project.org/", "r-expand.png",
selector = "#getting-started",
expand = c(40, 20, 40, 20))