Description Usage Arguments Value Examples
Copies an object file from one repository to another and creates a new entry in the index of the destination repository. Supports tags and multiple names.
1 |
destrepo |
An object of class repo (will copy to it) |
name |
The name (or list of names) of the item/s to copy |
tags |
If not NULL, copy all items matching tags. NULL by default. |
replace |
What to do if item exists in destination repo (see put). F by default. |
confirm |
If F, don't ask for confirmation when multiple items are involved. F by default. |
Used for side effects.
1 2 3 4 5 6 7 8 9 10 11 12 | ## Repository creation
rp_path1 <- file.path(tempdir(), "example_repo1")
rp1 <- repo_open(rp_path1, TRUE)
rp1$put(0, "item1", "A sample item", "tag1")
rp_path2 <- file.path(tempdir(), "example_repo2")
rp2 <- repo_open(rp_path2, TRUE)
rp1$copy(rp2, "item1")
## wiping temporary repo
unlink(rp_path1, TRUE)
unlink(rp_path2, TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.