Does anyone know of an R function that is able to retrieve one’s own IP address (of the PC you’re working on)? It would be very helpful! Many thanks in advance.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can issue a
system()command to your operating system:ipconfigifconfigFor example, on Windows try calling
system()with the argumentintern=TRUEto return the results to R:This returns:
Now you can use
grepto find the lines withIPv4:And to extract just the ip address: