View source: R/fork-and-merge.R
mergeFork | R Documentation |
Crunch datasets include information about the dataset's revision history. This function takes the changes made on a dataset fork and adds them to the revision history of the parent dataset, like a merge of branches in a version control system.
mergeFork(dataset, fork, autorollback = TRUE, force = FALSE)
dataset |
The |
fork |
The |
autorollback |
logical If the merge fails, should |
force |
logical Attempt to push through merge conflicts by dropping all
changes to |
All modifications of a dataset record actions in its revision history. For example, if you add a variable to the dataset, that action is recorded. The sum of these records is a dataset's revision history, and it is possible to merge in the revision history of a dataset that has been forked.
This function is most often used in conjunction with forkDataset()
to
create a copy of a dataset, make some changes to that copy, and then merge
the changes back into the original dataset. For more on this workflow, see
vignette("fork-and-merge", package = "crunch")
.
dataset
with changes from fork
merged to it.
forkDataset()
## Not run:
ds <- loadDataset("My survey")
fork <- forkDataset(ds)
# Do stuff to fork
ds <- mergeFork(ds, fork)
# Now the changes you did to fork are also on ds
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.