Not able to run fix() on RStudio Cloud

Executing fix() method is giving out an error as follows -

Error in .External2(C_dataentry, datalist, modes) : 
  unable to start data editor
In addition: Warning message:
In edit.data.frame(get(subx, envir = parent), title = subx, ...) :
  unable to open display

Please help!

Hi Abhinav, and welcome to community.rstudio.com!

I've just checked, and I'm able to use fix() in RStudio Cloud for functions, but when trying to fix a dataframe, I get the same error.

@EconomiCurtis, is this a known bug?

I suspect this true of using RStudio Server as well, since the editor is being opened on a remote server that does not have a display.

Let me check if there is a way to direct the editing to the IDE itself.

What I have learned is that fix is called with a data frame, it calls utils:::edit.data.frame, which will use the default edit on Unix when the GUI is unknown (it is "RStudio" in the case of rstudio.cloud and RStudio Server) or if the DISPLAY is not set (it is ":0"):

    if (.Platform$OS.type == "unix" && .Platform$GUI != "AQUA") 
        if (.Platform$GUI == "unknown" || Sys.getenv("DISPLAY") == 
            "") 
            return(edit.default(name, ...))

It will then attempt to launch an external R GUI data frame editor:

    out <- .External2(C_dataentry, datalist, modes)

Which fails in the case of rstudio.cloud and RStudio Server.

My understanding is that this known, but that editing a data frame directly is not particularly common.

I am going to move this thread over to the RStudio category.

1 Like

As @josh concluded, fix() is not supported within RStudio Server (and hence RStudio Cloud).