简体   繁体   中英

function that extracts a common continuous sequence in R

Tell me please, is there the function that extracts a common continuous sequence of characters from the symbol vector. Ie, for example, from the row vector at the input: c ("mom soap frame", "sweet mom", "dad, mom, me", "`mom`ent") get the output vector c ("mom")

v <- c ("mom soap frame", "sweet mom", "dad, mom, me", "moment")

library(PTXQC)
LCSn(v, min_LCS_length = 0)

#[1] "mom"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM