Hello All,
I need some help figuring out how to extract combinations of target words/terms
from cancer patient text medical records. I've provided some sample data and
code below to illustrate what I'm trying to do. At the moment, I'm trying to
extract sentences that contain the word "breast" p
quate?
Bert
On Jul 11, 2017 10:49 AM, "Paul Miller via R-help" wrote:
Hello All,
>
>I need some help figuring out how to extract combinations of target
>words/terms from cancer patient text medical records. I've provided some
>sample data and code below to illustr
tern <- "([^.?!]*(?=[^.?!]*\\bbreast\\b)(?=[^.?!]*\\b(metastatic|stage
> IV)\\b)(?=[\\s.?!])[^.?!]*[.?!])"
> regmatches(txt, gregexpr(pattern, txt, perl=TRUE, ignore.case=TRUE))[[1]]
[1] "Patient had stage IV breast cancer."
[2] " Metastatic and breast
Hello All,
Season's greetings!
Am trying to replicate some SAS code in R. The SAS code uses if-then-do code
blocks. I've been trying to do likewise in R as that seems to be the most
reliable way to get the same result.
Below is some toy data and some code that does work. There are some thing
Hi Gabor, Richard, and Thierry,
Thanks very much for your replies. Turns out I had already hit on Gabor's idea
of "factor out" in writing an initial draft of the code converting from SAS to
R. Below is the link Gabor sent describing this and other approaches.
https://stackoverflow.com/questio
Hello All,
Would like to keep a running total of what drugs cancer patients have taken and
what drugs have been dropped. Searched the Internet and found a way to
cumulatively paste a series of drug names. Am having trouble figuring out how
to make the paste conditional though.
Below is some s
Hello All,
Would like to be able to summarize across in dplyr using variable names and a
condition. Below is an example "have" data set followed by an example "need"
data set. After that, I've got a vector of numeric variable names. After that,
I've got the very humble beginnings of a dplyr-bas
quot;{col}_{fn}"
)) %>%
select(starts_with(vars_num) | ends_with("mean")) %>%
rename_at(vars(!starts_with(vars_num)), list(~ str_replace(., "mean$",
"prop"))) %>%
all.equal(need)
On Friday, March 26, 2021, 1:08:58 p.m. EDT, Rui Barradas
wrot
8 matches
Mail list logo