IP adresses on MacosX, Ubuntu or windows

x <- system("ifconfig", intern=TRUE); gsub("^(.*)[ :]([0-9\\.]+) (.*)$", "\\2", x[grep("inet ", x)])

In windows (I cannot test it):
x <- system("ipconfig", intern=TRUE); gsub(".*? ([[:digit:]])", "\\1", x[grep("IPv4", x)])

Commentaires

Posts les plus consultés de ce blog

Standard error from Hessian Matrix... what can be done when problem occurs

Multivariable analysis and correlation of iconography

stepAIC from package MASS with AICc