Character Type
In this page:
Character Type
R's character type stores text strings, written with single or double quotes. Unlike some languages, there's no separate single-character type -- a one-letter string is still character. String concatenation and formatting typically go through paste() rather than a + operator.
Note: Single and double quotes work identically for strings in R -- pick one style and stay consistent.
Example: Character Type
name <- "Ada"
greeting <- 'Hello'
cat(class(name), "\n")
cat(greeting, name, "\n")
Login to try C/C++/Java/PHP code in the editor
🔒
Chapter Quiz — Complete all 7 topics to unlock
0/7 topics done
Complete these topics first: