-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add extra comments in the examples (#11)
- Loading branch information
Showing
12 changed files
with
246 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,55 @@ | ||
#' @examples | ||
#' # on file system | ||
#' ## on file system | ||
#' | ||
#' # create a directory | ||
#' root <- tempfile("git2rdata-") | ||
#' dir.create(root) | ||
#' | ||
#' # store a dataframe | ||
#' write_vc(iris[1:6, ], "iris", root, sorting = "Sepal.Length") | ||
#' # list the available data and the files | ||
#' list_data(root) | ||
#' list.files(root, recursive = TRUE) | ||
#' | ||
#' # remove all .tsv files with an associated .yml file | ||
#' rm_data(root, path = ".") | ||
#' # check the removal of the data | ||
#' list.files(root, recursive = TRUE) | ||
#' list_data(root) | ||
#' | ||
#' # remove dangling meta data files | ||
#' prune_meta(root, path = ".") | ||
#' # check the removal of the meta data | ||
#' list.files(root, recursive = TRUE) | ||
#' list_data(root) | ||
#' | ||
#' # on git repo | ||
#' | ||
#' ## on git repo | ||
#' | ||
#' # initialise a git repo using git2r | ||
#' repo_path <- tempfile("git2rdata-repo-") | ||
#' dir.create(repo_path) | ||
#' repo <- git2r::init(repo_path) | ||
#' git2r::config(repo, user.name = "Alice", user.email = "alice@example.org") | ||
#' | ||
#' # store a dataframe | ||
#' write_vc(iris[1:6, ], "iris", repo, sorting = "Sepal.Length", stage = TRUE) | ||
#' # check that the dataframe is stored | ||
#' status(repo) | ||
#' list_data(repo) | ||
#' | ||
#' # commit the current version and check the git repo | ||
#' commit(repo, "add iris data", session = TRUE) | ||
#' status(repo) | ||
#' | ||
#' # remove the data files from the repo | ||
#' rm_data(repo, path = ".") | ||
#' # check the removal | ||
#' list_data(repo) | ||
#' status(repo) | ||
#' | ||
#' # remove dangling meta data | ||
#' prune_meta(repo, path = ".") | ||
#' # check the removal | ||
#' list_data(repo) | ||
#' status(repo) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.