0
더 긴 문자열 (x의 실제 길이는 알 수 없음)을 기반으로하는 'x'문자열의 벡터가 있습니다.R : 왼쪽에서 오른쪽으로 벡터의 요소 조합을 만듭니다.
mystring <- "this is my vector"
x <- strsplit(mystring, " ")[[1]]
나는 다음과 같은 문자열을 포함하는 객체를 작성하는 우아한 방법 (예를 들어, 목록) 찾고 있어요 :
string1
string1 + string2
string1 + string2 + string3
string1 + string2 + string3 + string 4
string2
string2 + string3
etc.:
"this"
"this is"
"this is my"
"this is my vector"
"is"
"is my"
"is my vector"
"my"
"my vector"
"vector"
고마워요!