How to display comments in the RStudio console?

1

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

    
asked by anonymous 12.10.2017 / 23:18

2 answers

2

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

  • Tools
  • Global Options ...
  • Code
  • and uncheck the Execute all lines in a statement

        
    15.10.2017 / 00:25
    1

    Another option might be to link a comment to an object and issue it in the Console.

    Example with a vector ( x ) any:

    x<-1:10
    
    comment(x)<-'My vector'
    
    comment(x)
    
    [1] "My vector"
    
        
    17.11.2018 / 02:13