Hi, I have log data in which one of the columns have IP ranges and the next column is corresponding ports. Eg: IPRange Port 10.78.64.0-10.78.66.255 D, A, C I need to expand the IPRange column into a list of network blocks till 3rd octet: IPRange IP Port 192.100.176.0-192.100.179.255 192.100.176.0/24 A, B, C 192.100.176.0-192.100.179.255 192.100.177.0/24 A, B, C 192.100.176.0-192.100.179.255 192.100.178.0/24 A, B, C 192.100.176.0-192.100.179.255 192.100.179.0/24 A, B, C How do I do this data transformation in R? Please assist. Thanks Amit [[alternative HTML version deleted]]
" list of network blocks till 3rd octet:" This is incomprehensible to me. If that is so for others, also, I suggest that you provide a reproducible example (see posting guide) to explain what you mean. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Aug 24, 2018 at 9:41 AM Amit Govil <amit.cs03 at gmail.com> wrote:> Hi, > > I have log data in which one of the columns have IP ranges and the next > column is corresponding ports. Eg: > > > IPRange Port > 10.78.64.0-10.78.66.255 D, A, C > > I need to expand the IPRange column into a list of network blocks till 3rd > octet: > > IPRange IP Port > 192.100.176.0-192.100.179.255 192.100.176.0/24 A, B, C > 192.100.176.0-192.100.179.255 192.100.177.0/24 A, B, C > 192.100.176.0-192.100.179.255 192.100.178.0/24 A, B, C > 192.100.176.0-192.100.179.255 192.100.179.0/24 A, B, C > > How do I do this data transformation in R? > > Please assist. > > Thanks > Amit > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
Hello, Cross-posting is not very well seen by R-Help. Please wait for an answer to one of your posts before posting somewhere else. https://stackoverflow.com/questions/52008756/how-to-get-a-list-of-ip-addresses-from-an-ip-range-using-r Rui Barradas On 24/08/2018 17:34, Amit Govil wrote:> Hi, > > I have log data in which one of the columns have IP ranges and the next > column is corresponding ports. Eg: > > > IPRange Port > 10.78.64.0-10.78.66.255 D, A, C > > I need to expand the IPRange column into a list of network blocks till 3rd > octet: > > IPRange IP Port > 192.100.176.0-192.100.179.255 192.100.176.0/24 A, B, C > 192.100.176.0-192.100.179.255 192.100.177.0/24 A, B, C > 192.100.176.0-192.100.179.255 192.100.178.0/24 A, B, C > 192.100.176.0-192.100.179.255 192.100.179.0/24 A, B, C > > How do I do this data transformation in R? > > Please assist. > > Thanks > Amit > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >--- This email has been checked for viruses by AVG. https://www.avg.com