Reputation: 707
I need to use the MAC address in a R-script. I want to do without system()
calls, making it platform independent. Is it possible in R?
Upvotes: 2
Views: 425
Reputation: 60756
I'm reasonably sure there's no good way to do this is pure R. However if you're open to dropping into C-land you can implement something like this example. Where they create a C++ class that detects the OS and then runs the appropriate code to extract the MAC address.
While this may seem very much like using system calls, it's slightly less work than parsing all the different formats which the command line calls might return the MAC.
Upvotes: 3