hostname2ip | R Documentation |
Converts a hostname (or vector of hostnames) to
hostname2ip(hosts)
hosts |
A vector of hostnames as strings (or just one). |
Only IPv4 addresses will be returned. If only IPv6 addresses exist (and if
that is the case, allow me to be the first to greet you, person from the
distant future) then NA
is returned for that hostname.
The function uses getaddrinfo()
on *NIX systems, and
gethostbyname()
on Windows.
A list of vectors of IP's. Each IP is stored as a string.
library(getip)
hosts = c("www.google.com", "localhost", "www.yahoo.com")
hostname2ip(hosts)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.