Select current line shortcut

Hi,

Very new on R and long user of stata. I am still familiarizing myself with R word.

Is there an equivalent of ctrl+l on R i.e. selecting the whole line so that you don't have to use your mouse to select the last command you just enter?

Thanks

In console you can press "Up" arrow to choose the last line you've entered.

Also, I'm not sure why you need to select the whole line to run it? Would Ctrl/Cmd/Shift/Alt + Enter do what you want instead? Each variation does something slightly different, but they all run line that your cursor is currently on.

Ok thanks. I think what I was looking for is ctrl+alt+b which runs from the beggining to where your cursor is. It is pretty useful.

Around the same topic, is there a command that interrupts the script from going/running further down ? On stata, it would be "exit" or "e".

Thanks

I found this answer on SO:

But can you describe why you would want to do something like that? It might look like an overkill, but for any reasonably-sized R project I would highly recommend creating a package. Doing that in R is not difficult at all and there is this book that I found extremely useful - https://r-pkgs.org/.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.