R studio expected', 'after expression

Asked 2 years ago, Updated 2 years ago, 153 views

On the R studio script, you must type in the line where you should type a comma, for example:
On the leftmost side of the line, a blank mark appears.
If you hover your cursor over this button, you will see "R studio expected', 'after expression'
The error appears.

 m<-rbind(
x Revenue
xexpenses
xprofit.1000
xprofit.margin
    good.months
  )

If you type a line-by-line comma, you won't get any errors, but you can put them all together on multiple lines. Is there no way to hit it?

r rstudio

2022-09-30 21:42

1 Answers

RStudio has many convenient shortcuts!

The function you mentioned can be done in an instant with the multi-line cursor function.

While pressing Alt/Option, use your mouse to trace any part of the line marked x.
The cursor flashes on multiple lines.

If you just move the cursor to the far right, a comma will be entered into all displayed cursors.

Enter a description of the image here


2022-09-30 21:42

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.