Quantcast
Channel: Unlist data frame column and pasting them together - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by Ronak Shah for Unlist data frame column and pasting them together

We can use stri_extract_all_regex from the stringi package to extract all the words which matches the pattern.library(stringi)med_pattern <- c("NOVOMIX|MIXTARD|METFORMIN|ASPART")df$MEDICATION2 <-...

View Article



Unlist data frame column and pasting them together

I have a dataframe as defined below:df <- structure(list(ID = 1:19, MEDICATION = c("0", "NOVOMIX 26 BF, 20 D", "NOVOMIX 14 D", "NOVOMIX 34 BF 22 D", "MIXTARD 52 BF 20 D", "MIXTARD 40 BF 24 D",...

View Article
Browsing latest articles
Browse All 2 View Live


Latest Images