Sys.info Function in R (Example) | Extract System & User Information
On this page, I’ll explain how to return system and user information using the Sys.info function in R programming.
The content of the page looks as follows:
It’s time to dive into the example.
Example: Get System & User Information Using Sys.info() Function
The following R syntax shows how to extract information about the operating system and the user by applying the Sys.info function in R.
Have a look at the following R code:
Sys.info() # Apply Sys.info function # sysname release version nodename machine login user effective_user # "Windows" "10 x64" "build 19043" "DESKTOP-FTRQE9D" "x86-64" "Joach" "Joach" "Joach"
As you can see, the previous R code has returned information such as the name of the system (i.e. Windows) and the username (i.e. Joach) to the RStudio console.
Video & Further Resources
I have recently published a video on my YouTube channel, which illustrates the contents of this page. You can find the video below.
The YouTube video will be added soon.
Furthermore, you might have a look at some of the related tutorials on my website:
- Sys.getpid Function in R
- Sys.getlocale & Sys.setlocale Functions
- System Calls & Commands
- Useful Functions in R
- The R Programming Language
At this point you should know how to extract information about the system and the user by applying the Sys.info function in the R programming language. In case you have further questions, let me know in the comments section.