Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Comments | Section
Essential R Programming for Absolute Beginners - 1768563985826

bookComments

Note
Definition

Comments are notes written inside the code that are not executed.

They are used to explain the purpose of code, provide context, or temporarily deactivate lines during debugging.

Creating Comments

To add a comment, use the # symbol. Everything after # on the same line will be ignored by R.

Example

12
# A standalone comment 11 + 3 # Adding eleven and three
copy

In this example, the console displays only the result of 11 + 3 and ignores the comments.

Best Practices

  • Use comments to clarify complex parts of the code;
  • Avoid over-commenting, as it can clutter the script;
  • Use comments to disable lines temporarily during debugging.
Aufgabe

Swipe to start coding

This code mixes plain-text descriptions and R commands. Disable the non-executable text lines by prefixing them with #, leaving only the valid R commands active.

Lösung

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 4
single

single

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

close

bookComments

Swipe um das Menü anzuzeigen

Note
Definition

Comments are notes written inside the code that are not executed.

They are used to explain the purpose of code, provide context, or temporarily deactivate lines during debugging.

Creating Comments

To add a comment, use the # symbol. Everything after # on the same line will be ignored by R.

Example

12
# A standalone comment 11 + 3 # Adding eleven and three
copy

In this example, the console displays only the result of 11 + 3 and ignores the comments.

Best Practices

  • Use comments to clarify complex parts of the code;
  • Avoid over-commenting, as it can clutter the script;
  • Use comments to disable lines temporarily during debugging.
Aufgabe

Swipe to start coding

This code mixes plain-text descriptions and R commands. Disable the non-executable text lines by prefixing them with #, leaving only the valid R commands active.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 4
single

single

some-alt