R में Intermediate Regular Expressions
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 में Intermediate Regular Expressions