Learn R Programming

screenshot (version 0.9.2)

install_screenshot: Install command line screenshot for Windows.

Description

Codes are from URL shown below. https://superuser.com/questions/75614/take-a-screen-shot-from-command-line-in-windows#answer-1751844 On Mac screencapture is usually available. On Linux GNOME desktop use gnome-screenshot. If not installed, run sudo apt install gnome-screenshot.

Usage

install_screenshot(bin_dir = "")

Value

   A string of installed directory.

Arguments

bin_dir

A string of directory to be installed.

Examples

Run this code
if(interactive()){

# need only on Win
if(get_os() == "win"){
  bin_dir <- fs::path_package("screenshot")
  # if you want to install another directory
  #   bin_dir <- "SET_YOUR DIRECTORY"
  install_screenshot(bin_dir)
}

}

Run the code above in your browser using DataLab