get_cpu_name | R Documentation |
This function attempts to return the name of the CPU model. See Note.
get_cpu_name()
The function first detects the operating system using the
Sys.info()
function in R. Depending on the operating system, it uses
OS-specific system commands to retrieve the CPU name:
Windows (PowerShell): (Get-WmiObject Win32_Processor).Name
Linux: lscpu | grep "Model name:"
macOS: sysctl -n machdep.cpu.brand_string
For operating systems other than the above, it returns "Unknown CPU."
A character string representing the name of the CPU.
This function has only been tested in Windows 11. Users are advised to manually test this function in their specific environment to ensure it works as expected.
get_cpu_name()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.