R Comments

Comments in R programming provide extra details about various aspects of a program. They are usually included at the start of a program to indicate its purpose, author, and the date on which it was written. They also provide clarification about complicated statements in the program. On executing the program, R will not consider it a program statement and will ignore it.

Single-line Comments

The # (hash) is used in R for single-line comments. Let us see an example to learn how to implement single-line comments in R:

Output

Multi-line Comments

The # (hash) can be used in Python for multiline comments. Just add a # before every comment:

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:

First R Program
R Variables
Studyopedia Editorial Staff
Studyopedia Editorial Staff
[email protected]

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