R/gerar_gatito.R

Defines functions gerar_gatito

Documented in gerar_gatito

#' Gerar Gatito
#'
#' @return Nào retorna nada
#' @export
#'
gerar_gatito <- function(){
  tmp <- tempfile(fileext = '.jpeg')
  utils::download.file('https://cataas.com/cat',
                       tmp, quiet = TRUE)

  tmp |>
    jpeg::readJPEG() |>
    grDevices::as.raster() |>
    graphics::plot()
}

utils::globalVariables(c('tmp'))
gerriosantos/exemGatitosR documentation built on Dec. 20, 2021, 10:41 a.m.