I have some IP addresses e.g. "92.63.194.115", "8.8.8.8", "52.32.77.100", "172.217.23.227" and many other. I save them in vector "udst" chr[1:143] Then I get command: data("iana_assignments") and I saved them to "ianaIP". I want to choose ip addresses from "udst", which are not in "iana_assignments". I tried command: ip_in_range("udst", "ianaIP"), but this command do not filtrated the right ip. I´m learning R language and a need a help with my problem. Can you help me?
Asked
Active
Viewed 35 times
0
-
1You can use `setdiff(udst, iana_assignments)` – akrun Nov 04 '19 at 21:19
-
It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Nov 04 '19 at 21:20
-
ianaIP - there are public ip addresses range. when I send command: ip_in_range("92.63.194.115","92.0.0.0/8") this return true and when i send command: ip_in_range(udst, ianaIP) this return false setdiff return me every ip [143] length of udst is 143 – Alena Sedlárová Nov 04 '19 at 21:56
-
ianaIP are e.g.: 1.0.0.0/8, 2.0.0.0/8, 3.0.0.0/8, 4.0.0.0/8, ...., 171.0.0.0/8, 172.0.0.0/8, 220.0.0.0/8, 221.0.0.0/8, ... – Alena Sedlárová Nov 05 '19 at 13:03