BiocStyle::markdown()
Last modified: r file.info("HowToUse.Rmd")$mtime
Compiled: r date()
library(GoogleImage2Array)
GoogleImage2array function provide a 4-dimensional array of images via google image search.
#Search by persian cat query <- "persian cat" CatImg <- GoogleImage2array(query) #show info str(CatImg)
Multi-byte characters (e.g. Japanese) can also be used.
#Search by ペルシャ猫 query <- "ペルシャ猫" CatImgJpn <- GoogleImage2array(query) #show info str(CatImgJpn)
display.array show a result as a tiled image.
#display CatImg display.array(CatImg)
Display = TRUE option)The images are displayed in tiles by the option of GoogleImage2array function.
#Search by Shiba inu (One line execution) DogImg <- GoogleImage2array("Shiba inu", Display = TRUE) #show info str(DogImg)
GoogleImage2array.world functionThis function retrieves images from 10 regions of the world and returns them as a single array data.
This allows more than 20 images to be acquired at a time.
query <- "Shiba inu" DogImgw <- GoogleImage2array.world(query) str(DogImgw)
#Bind two arrays to one array ImgDat <- bind.array(CatImg, DogImg) #show info str(ImgDat)
#show images display.spiral(CatImg)
library(GoogleImage2Array) library(EBImage) options(EBImage.display = "raster") img <- system.file("images", "spiral.png", package="GoogleImage2Array") EBImage::display(EBImage::readImage(files = img))
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.