# \donttest{
# download 2 image from the nature category
genRandImg(fp = tempdir(),n = 2)
# download 4 random images with width = 600px and height 100px
genRandImg(
fp = tempdir(),
w.px = 600,
h.px = 100)
# download 10 random images with extension png
genRandImg(fp = tempdir(),n = 10, ext = "png")
# download 200 random images from category of school
# Note that maximum download is 99, so the function will only download 99
genRandImg(fp = tempdir(), n = 121)
# download 5 random images with extension jif and return paths
genRandImg(fp = tempdir(), n = 5, ext = "jpg", paths = TRUE)
# }
Run the code above in your browser using DataLab