How can I limit the output of a long character in the R console?
stringr
has str_trunc
function to do return first n
characters -
stringr::str_trunc(x, 50)
#[1] "growth revenue seed fundraise customers spread ..."
For words you may use word
-
stringr::word(x, 1, 50)
#[1] "growth revenue seed fundraise customers spread 50 countries series a funds raised sequoia capital indiasan francisco july 21 2021 prnewswire multichannel sales engagement platform outplay today announced 73m series a fundraise sequoia capital india outplay funds raised invest technology hiring exceptional talent globethe outplay team celebrating announcement series a"