R Strings
codeaft@codeaft:~$ R
...
> "Codeaft"
[1] "Codeaft"

> print("Hello World")
[1] "Hello World"

> cat("Hello World\n")
Hello World

> length("Codeaft")
[1] 1

> nchar("Codeaft")
[1] 12

> toupper("Codeaft")
[1] "CODEAFT"

> tolower("CODEAFT")
[1] "codeaft"

> substring("Codeaft",7,12)
[1] "Window"

> paste("Koding","Window")
[1] "Koding Window"

> paste("Koding","Window",sep="")
[1] "Codeaft"

> paste("Koding","Window",sep="@@@")
[1] "Koding@@@Window"

> format("Codeaft",width=20) [1] "Codeaft " > format("Codeaft",width=20,justify="") Error in match.arg(justify) : 'arg' should be one of “left”, “right”, “centre”, “none” > format("Codeaft",width=20,justify="l") [1] "Codeaft " > format("Codeaft",width=20,justify="c") [1] " Codeaft " > format("Codeaft",width=20,justify="r") [1] " Codeaft" > format("Codeaft",width=20,justify="n") [1] "Codeaft"
Comments and Reactions