When you query a MySQL db, you should use INET_ATON(ip_field) to convert a string IP to an (unsigned) int.
input numeric vector
Unfortunately, the RMySQL driver will convert these to doubles because not all unsigned ints are representable as ints. Because doubles get normalized, we can't mask subnets directly.
Instead, we can map the top half of unsigned integers to the negative half of signed ints using 2s-complement.
integer format IP addresses
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.