Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data_edit not saving edits #71

Open
cmbarton opened this issue Jul 16, 2024 · 2 comments
Open

data_edit not saving edits #71

cmbarton opened this issue Jul 16, 2024 · 2 comments

Comments

@cmbarton
Copy link

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.

@fornaeffe
Copy link

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.

@cmbarton
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants