While using rvest
package I am trying to print/show the lego_movie poster in R. I fail to do so. Here's my attempts:
library(rvest)
poster <- lego_movie %>%
html_nodes("#img_primary img") %>%
html_attr("src")
## 1st attempt
library(jpeg)
jpeg(poster)
dev.off()
## 2nd attempt
readJPEG(poster)
dev.off()
I think EBImage has display
function. This package can't be installed in R-3.1.2
. It shows the warning message: package ‘EBImage’ is not available (for R version 3.1.2)
.
The bottom line of my question is: how to see the jpeg file in R as a display without using EBImage
package?
Few related questions: