R Strings

Strings in the R programming language are surrounded by single or double quotes. Let us see how to create a string and multiline strings in R with examples.

Create a String

In the below example, we will create a string and enclose it with double quotes:

Output

In the next example, we will create a string and enclose it with single quotes:

Output

Create Multiline Strings

To create a multiline string, you need to only mention the string as we saw above. No need to add any new quote or keyword. Let us see an example:

Output

If you liked the tutorial, spread the word and share the link and our website Studyopedia with others.


For Videos, Join Our YouTube Channel: Join Now


Read More:

R - Decision Making Statements
R String Operations
Studyopedia Editorial Staff
contact@studyopedia.com

We work to create programming tutorials for all.

No Comments

Post A Comment

Discover more from Studyopedia

Subscribe now to keep reading and get access to the full archive.

Continue reading