Strings
paste joins, nchar counts, substr slices and toupper changes case.
Example
s <- "Hello, R"
print(nchar(s))
print(toupper(s))
print(substr(s, 1, 5))
print(paste("a", "b", sep = "-"))
print(paste0("x", 1:3))
print(sprintf("%05.1f|%d", 3.14159, 42L))Exercise
Join without a gap.
("a", "b")Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.