Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Comments | Basic Syntax and Operations
course content

Contenido del Curso

R Introduction: Part I

CommentsComments

When you've written an extensive script for research and find you need to revisit it later for updates or improvements, remembering the purpose of each line of code can be challenging. That’s where annotations within the code, known as comments, become invaluable.

A comment is a portion of code that isn't executed. To signal to the interpreter which parts should not be processed, we use the # symbol. For instance, we can add comments in two ways: as a standalone line, and alongside a computation:

The console will only show the result of 11+3.

Note

While not mandatory, the inclusion of comments is widely regarded as a best practice for maintaining clarity and readability in your code.

Comments are useful not just for clarification, but also for debugging purposes, allowing you to deactivate certain lines of code without deleting them.

Tarea

The code provided is not executable due to an error. Apply the hash # symbol to correct the code.

¿Todo estuvo claro?

Sección 1. Capítulo 3
toggle bottom row
course content

Contenido del Curso

R Introduction: Part I

CommentsComments

When you've written an extensive script for research and find you need to revisit it later for updates or improvements, remembering the purpose of each line of code can be challenging. That’s where annotations within the code, known as comments, become invaluable.

A comment is a portion of code that isn't executed. To signal to the interpreter which parts should not be processed, we use the # symbol. For instance, we can add comments in two ways: as a standalone line, and alongside a computation:

The console will only show the result of 11+3.

Note

While not mandatory, the inclusion of comments is widely regarded as a best practice for maintaining clarity and readability in your code.

Comments are useful not just for clarification, but also for debugging purposes, allowing you to deactivate certain lines of code without deleting them.

Tarea

The code provided is not executable due to an error. Apply the hash # symbol to correct the code.

¿Todo estuvo claro?

Sección 1. Capítulo 3
toggle bottom row
some-alt