powered by
extrSpcText extracts/cuts text-fragments out of 'txt' following specific anchors 'cutFrom' and 'cutTo'. In case 'cutFrom' not found 'missingAs' will be returned. In case 'cutTo' not found text gets extracted with 'chaMaxEl' characters.
extrSpcText
extrSpcText( txt, cutFrom = " GN=", cutTo = " PE=", missingAs = NA, exclFromTag = TRUE, silent = FALSE, callFrom = NULL )
character vector to be treated
(character) text where to start cutting
(character) text where to stop cutting
(character) specific content of output at line/location of 'exclLi'
(logical) to exclude text given in 'cutFrom' from result
(logical) suppress messages
(character) allow easier tracking of message(s) produced
modified character vector
# NOT RUN { extrSpcText(c(" ghjg GN=thisText PE=001"," GN=_ PE=",NA,"abcd")) extrSpcText(c("ABCDEF.3-6","05g","bc.4-5"),cutFr="\\.",cutT="-") # }
Run the code above in your browser using DataLab