img.1 <- "fjk.jpg"
not.image(img.1)
img.2 <- "fjk.bmp"
not.image(img.2)
img.3 <- "fjk.SVG"
not.image(img.3)
# a vector of file names
v <- c("logo.png", "business process.pdf",
"front_cover.jpg", "intro.docx",
"financial_future.doc", "2022 buybacks.xlsx")
not.image(v)
# when the file name has no extension
# the function returns NA
v2 <- c("img2.jpg",NA,"northbound.xlsx","landimg")
not.image(v2)
Run the code above in your browser using DataLab