I have a data frame having 1000 rows.I can use fix command or edit command in R to view and edit the data manually.I can't find any difference between the two. I want to know which is the efficient way of editing the data manually? Help me out in the same...
2 Answers
fix()
invokes edit on x and then assigns the new version to the same object.
Example:
fix(my_dataFrame) #now my_dataFrame is changed
In edit()
- we need to assign it to an object
my_new_dataFrame = edit(my_dataFrame)
The difference is pretty trivial:
edit
lets you edit an object and returns the new version.
fix
lets you edit an object and modifies the original.
Internally, fix
pretty much does the following:
- Retrieve the name of the variable passed to
fix
(call itname
) - Invoke
result = edit(original)
- Invoke
assign(name, result, .GlobalEnv)