Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add note about commenting multiple existing lines #607

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion episodes/09-supp-intro-rstudio.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ window and press <kbd>Esc</kbd>; this should help you out of trouble.
## Commenting

Use `#` signs to comment. Comment liberally in your R scripts. Anything to the
right of a `#` is ignored by R. Comments remind yourself of what certain functions you write do, and it helps others understand their purpose without having to read the code. Start your comments with a `#` signs, which R takes as the sign to ignore anything to the right of it when running the code. Also remember that expressive naming of functions, arguments and variables, as well as [`#'`\-prefixed roxygen documentation](08-making-packages-R.Rmd), document your code. Consider free-form, #-comments as a last resort.
right of a `#` is ignored by R. Comments remind yourself of what certain functions you write do, and it helps others understand their purpose without having to read the code. Start your comments with a `#` signs, which R takes as the sign to ignore anything to the right of it when running the code.
To comment multiple lines in RStudio, you can select the lines you want to comment and use <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>C</kbd> to comment/uncomment.

Also remember that expressive naming of functions, arguments and variables, as well as [`#'`\-prefixed roxygen documentation](08-making-packages-R.Rmd), document your code. Consider free-form, #-comments as a last resort.


## Assignment Operator

Expand Down
Loading