Undo button/ ctrl functions not working

Hi guys,

I’ve just installed Rstudio for windows and i’m unable to undo a line of code in the console area using the edit buttons at the top or using ctrl z /ctrl x.

I’m a complete beginner with this and any help would be appreciated.

Thanks

What was the line of code?

If you're editing a text file, like an .Rmd or .R script, undoing typing is the same as with any text editor, just ctrl+z.

The R console works a bit differently. The console is the place where R is waiting for you to tell it what to do, and where it will show the results of a command. So to undo a command giving to the console you have to provide a command that undoes it. For example, below I assign 1 to a, and then undo that.

a <- 1
a
#> [1] 1
rm(a)
a
#> Error in eval(expr, envir, enclos): object 'a' not found

Created on 2022-02-09 by the reprex package (v2.0.0)

For more information about the console, check out RStudio's docs.

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.