R 중급 정규 표현식
Angelo Zehr
Data Journalist
usernames <- c("Adam", "Betty", "Cora", "David")
glue_collapse(usernames)
AdamBettyCoraDavid가 출력됩니다
glue_collapse(
usernames,
sep = ", ",
last = ", and ",
width = 27
)
Adam, Betty, Cora, and Dav...가 출력됩니다
glue(
"Hello {users}.",
users = glue_collapse(
usernames,
sep = ", ",
last = ", and "
)
)
Hello Adam, Betty, Cora, and David.가 출력됩니다
데이터 프레임 df
x y
1 4
2 5
3 6
glue_collapse(df$x)는 123을 출력합니다
R 중급 정규 표현식