How to view comments on Rstudio console?

Asked

Viewed 2,546 times

2

When I write a comment (preceded by the "#" symbol) in a Rstudio script, and press the 'Control+Enter' command, my comment is not displayed on the console screen. Someone would know me how to make the script comments appear on the Rstudio console?

  • Hello Arthur, It is to work the way you are doing. Which version of R and Rstudio are you using? If you don’t have the latest versions, please update and try again. Another option is to select the comment you want to display on the console and run. I hope you helped (:

  • Hi Arthur, can you comment below some doubts regarding your question?

2 answers

3

After the version 1.0.36 you will need to change a setting, so follow the steps.

  1. Tools ( )
  2. Global Options... ( Global options )
  3. Code ( Code )

and uncheck the option Execute all Lines in a statement

2

Another option may be to attach a comment to any object and add it to the Console.

Example with a vector (x) whichever:

x<-1:10

comment(x)<-'My vector'

comment(x)

[1] "My vector"

Browser other questions tagged

You are not signed in. Login or sign up in order to post.