Frank
September 27, 2017, 8:56pm
4
Did you see this discussion?
I was watching a tutorial on something or other on youtube and the lecturer used fix() on a data frame. My mind is blown. Of course something like this exists, if it didn't, it should. My only regret is that I didn't find out about this years ago. It would have saved a lot of time doing little manual edits to my data.
For those who didn't know, or can't check it for themselves right now, it opens the data frame up in a new spreadsheet-like window, where you can edit the values.
That's all. Just trying to spread my amazement, and maybe help save a few seconds here and there.
You could do
code_for_tab <- function(){
DF = data.frame()
fix(DF)
dput(DF)
}
code_for_tab()
That will open a (base R) window to edit a table. When you close the window, code to make the table will be printed to the console. Not pretty code, admittedly. This SO Q&A might help with that, if desired.
3 Likes