Computer Friends,

with the following example lines:

[107] "98-610: Cell type: S; Surv(months): 6; STATUS(0=alive, 1=dead): 1"

[108] "99-625: Cell type: S; Surv(months): 21; STATUS(0=alive, 1=dead): 1"

i want to be able to isolate the number of months of survival for each row.

is there a regular expression that can find the first instance of a ";",
delete everything in front of it-- and find the second instance of an ";"
and delete everything behind it? in python there is a function line.find(),
would be grateful to hear the R equiv; or, any other better alternatives to
get the number of months of survival stored as a variable.

Much Thank You!

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to