:22 AM, "mohan.radhakrish...@polarisft.com"
wrote:
Please ignore. This works.
str_extract_all(a$Col1,"[0-9]+(,|/|)")
Mohan
From:
mohan.radhakrish...@polarisft.com
To:
arun
Cc:
R help
Date:
11/04/2013 12:22 PM
Subje
Please ignore. This works.
str_extract_all(a$Col1,"[0-9]+(,|/|)")
Mohan
From: mohan.radhakrish...@polarisft.com
To: arun
Cc: R help
Date: 11/04/2013 12:22 PM
Subject: Re: [R] Replace element with pattern
Sent by:r-help-boun...@r-project.org
Hi,
2359296
used:15857920,committed:15892480,max:50331648|"
>
> str_extract(a$Col1,"[0-9]*(,|/|)")
[1] "" ""
Thanks
From: arun
To: R help
Cc: "mohan.radhakrish...@polarisft.com"
Date: 11/01/2013 06:40 PM
Subject:Re: [R] Replace element
Hi,
Try this:
Lines1 <- readLines(textConnection("Peak Usage : init:2359296,
used:15859328, committed:15892480,max:50331648Current Usage : init:2359296
used:15857920,committed:15892480,max:50331648|---|
Peak Usage : init:2359296, used:15859328,
committed:15892480,max:50
:50331648|"
Mohan
From: jim holtman
To: mohan.radhakrish...@polarisft.com
Cc: R mailing list
Date: 11/01/2013 05:17 PM
Subject: Re: [R] Replace element with pattern
try this:
> x <- rbind("Peak Usage: init:2359296, used:15859328,
committed:1589248
try this:
> x <- rbind("Peak Usage: init:2359296, used:15859328,
> committed:15892480,max:50331648Current Usage : init:2359296,
> used:15857920,committed:15892480, max:50331648|---|")
> apply(x, 1, function(a) sub("(Current.*?[/|]).*", "\\1", a))
[1] "Peak Usage: init:235
6 matches
Mail list logo