1
> edit(data.frame())  

Error in dataentry(datalist, modes) : invalid device
In addition: Warning message:
In edit.data.frame(data.frame()) : unable to open X Input Method

my system is: debian6.04+R-2.15.1

what is the matter?

MvG
  • 57,380
  • 22
  • 148
  • 276
Peng Peng
  • 1,305
  • 3
  • 16
  • 20
  • 2
    works as intended for me... you may want to specify a precise editor with the `editor` parameter, or use RStudio instead. – nico Jul 21 '12 at 12:24
  • 1
    In `?edit`, it says on UNIX the default data editor is whatever is in `$EDITOR` or `$VISUAL` if these exist as environment variables in your shell - what are they? (It looks like an X error not an R error - what does `capabilities('X11')` say?) – mathematical.coffee Jul 23 '12 at 03:34

2 Answers2

2

If you are on a MAC and just installed XQuartz, you must restart your computer to get the X11 capabilities.

IUF
  • 313
  • 3
  • 10
2

I experienced exactly the same problem on linux and I noticed that it was a problem of input and locale settings. I solved by clearing the following variables in the environment

$ export XMODIFIERS=
$ export GTK_IM_MODULE=

Then it worked fine.

Hong Ooi
  • 56,353
  • 13
  • 134
  • 187