is.rpi: Provide information about the Operating System

View source: R/is_rpi.R

is.rpiR Documentation

Provide information about the Operating System

Description

Returns TRUE if this code is running under Raspbian or return information about the operating system.

Usage

is.rpi(onlyThis = "IsThisRPI")

Arguments

onlyThis

If no value is passed to onlyThis, is.rpi() will return a logical

If 'onlyThis' is specified, 'is.rpi()' will return the value for that field in /etc/os-release. Here are some typical values found in os-release

  • PRETTY_NAME is a concatenation of NAME, VERSION_ID, VERSION

  • NAME is the name of the OS, typically "Raspbian GNU/LINUX"

  • VERSION_ID is the version. Currently = 11

  • VERSION is a concatenation of VERSION_ID and (VERSION_CODENAME)

  • VERSION_CODENAME is the OS Name. Currently = "bullseye"

  • ID is the OS. Currently = "raspbian"

  • ID_LIKE is the OS base. Currently = "debian"

  • HOME_URL Currently = "http://www.raspbian.org"

  • SUPPORT_URL Currently = "http://www.raspbian.org/RaspbianForums"

  • BUG_REPORT Currently = "http://www.raspbian.org/RaspbianBugs"

Value

If 'onlyThis' is specified, returns that value. Otherwise returns TRUE if running Raspbian

Examples


is.rpi()
is.rpi("NAME")


mnr/rpigpior documentation built on May 3, 2024, 12:14 a.m.