R Strings
kodingwindow@kw:~$ R
...
> "Kodingwindow"
[1] "Kodingwindow"

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

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

> length("Kodingwindow")
[1] 1

> nchar("Kodingwindow")
[1] 12

> toupper("Kodingwindow")
[1] "KODINGWINDOW"

> tolower("KODINGWINDOW")
[1] "kodingwindow"

> substring("Kodingwindow",7,12)
[1] "window"

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

> paste("Koding","window",sep="")
[1] "Kodingwindow"

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

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