DataEditR icon indicating copy to clipboard operation
DataEditR copied to clipboard

data_edit not saving edits

Open cmbarton opened this issue 1 year ago • 2 comments

I recently installed DataEditR and went to try it today. It is not working. The RStudio addin is not launching correctly (I'll add a different issue for that) and when I open a data.frame with data_edit() it does not save the edits.

I'm using R 4.4.1 (2024-06-14) and RStudio Version 2024.04.2+764 (2024.04.2+764) with MacOS 14.5 (ARM) I had no errors installing DataEditR or launching it.

Here is what happens.

  1. I make a copy of mtcars to test
mtc_new <- mtcars
  1. I open it with data_edit and make a change
  2. Edit the last column ("carb") of row one, changing it from 4 to 5
  3. Tab to a new line just to make sure the change sticks
  4. Click done
data_edit(mtc_new)

Listening on http://127.0.0.1:3739
> mtc_new
                     mpg cyl  disp  hp drat    wt  qsec vs am gear carb
Mazda RX4           21.0   6 160.0 110 3.90 2.620 16.46  0  1    4    4
Mazda RX4 Wag       21.0   6 160.0 110 3.90 2.875 17.02  0  1    4    4
Datsun 710          22.8   4 108.0  93 3.85 2.320 18.61  1  1    4    1
Hornet 4 Drive      21.4   6 258.0 110 3.08 3.215 19.44  1  0    3    1

I tried the same thing with the syntax to use edit()

mtc_new <- data_edit(mtc_new)

Same result. No change.

cmbarton avatar Jul 16 '24 20:07 cmbarton

Same for me, but if I click "synchronize" before "Done", it returns correctly the edited data. I think it is an unintuitive behavior, I think it would be better if clicking "Done" will return the edited data always, without the need to click "synchronize" before.

fornaeffe avatar Sep 11 '24 12:09 fornaeffe

Just tested with your work around and it seems to work. Thanks. Indeed unintuitive. But at least it works.

cmbarton avatar Sep 11 '24 17:09 cmbarton