Description Usage Arguments Value Examples
Takes a new set of publication records populated and updates with previously recorded (often manually acquired) data.
1 2 | update_data(empty, populated, match_cols, replace_cols, approx_match = FALSE,
string_dist = 1, min_length = 20, simplify_match = TRUE)
|
empty |
The new set of publication records |
populated |
Previously recorded publication data |
match_cols |
Column(s) that will be used to match
|
replace_cols |
Column(s) to replace in |
approx_match |
Whether to use string distances or exact values when matching records. |
string_dist |
When using approximate matching, the string distance cutoff at which records will be matched. |
min_length |
The minimum string length for |
simplify_match |
Whether to perform matching on strings composed from
|
An updated version of empty
, which will be updated where
matches to populated
(based on match_cols
) are made.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
empty <- data.frame(a = c("Apples", "Oranges", "Bananas"),
b = c("Granny", "Florida", "Chiquita"),
c = c("", "", ""),
d = c("", "", ""),
stringsAsFactors = FALSE)
update <- data.frame(a = c("Apples", "Oranges"),
b = c("Granny", "Florida"),
c = c("Red", ""),
d = c("Green", ""),
stringsAsFactors = FALSE)
update_data(empty, update, c("a", "b"), min_length = 5)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.