Skip to content

Commit

Permalink
Removed sample data
Browse files Browse the repository at this point in the history
  • Loading branch information
ikosmidis committed May 21, 2018
1 parent 5734550 commit 9fce446
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 53 deletions.
6 changes: 3 additions & 3 deletions R/coerce.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
#' @examples
#' \dontrun{
#'
#' data("cran_sample", package = "cranly")
#' #' cran_db <- clean_CRAN_db()
#' ## Package directives network
#' package_network <- build_network(object = cran_sample, perspective = "package")
#' package_network <- build_network(object = cran_db, perspective = "package")
#' igraph::as.igraph(package_network)
#'
#' ## Author collaboration network
#' author_network <- build_network(object = cran_sample, perspective = "author")
#' author_network <- build_network(object = cran_db, perspective = "author")
#' igraph::as.igraph(author_network)
#'
#' }
Expand Down
6 changes: 3 additions & 3 deletions R/cranly-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ NULL
#'
#' @examples
#' \dontrun{
#' data("cran_sample", package = "cranly")
#' cran_db <- clean_CRAN_db()
#' ## Using a package directives network
#' package_network <- build_network(cran_sample)
#' package_network <- build_network(cran_db)
#' ## Find all packages containing glm in their name
#' package_with(package_network, name = "glm")
#' ## Find all authors of packages containing brglm in their name
Expand All @@ -72,7 +72,7 @@ NULL
#' linking_to(package_network, package = "RcppArmadillo", exact = TRUE)
#'
#' ## Using an author collaboration network
#' author_network <- build_network(cran_sample, perspective = "author")
#' author_network <- build_network(cran_db, perspective = "author")
#' ## Find all packages containing glm in their name
#' package_with(author_network, name = "glm")
#' ## Find all authors of packages containing brglm in their name
Expand Down
37 changes: 0 additions & 37 deletions R/data.R

This file was deleted.

8 changes: 4 additions & 4 deletions R/plot_network.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
#'
#' @examples
#' \dontrun{
#' data("cran_sample", package = "cranly")
#' package_network <- build_network(cran_sample)
#' cran_db <- clean_CRAN_db()
#' package_network <- build_network(cran_db)
#' ## The package directives network of all users with Ioannis in
#' ## their name from the CRAN database subset cran_sample
#' ## their name from the CRAN database subset cran_db
#' plot(package_network, author = "Ioannis")
#' ## The package directives network of "Achim Zeileis"
#' plot(package_network, author = "Achim Zeileis")
#'
#' author_network <- build_network(cran_sample, perspective = "author")
#' author_network <- build_network(cran_db, perspective = "author")
#' plot(author_network, author = "Ioannis", title = TRUE)
#' }
#' @export
Expand Down
6 changes: 3 additions & 3 deletions R/plot_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
#' @examples
#'
#' \dontrun{
#' data("cran_sample", package = "cranly")
#' cran_db <- clean_CRAN_db()
#' ## package network
#' package_network <- build_network(cran_sample)
#' package_network <- build_network(cran_db)
#' package_summaries <- summary(package_network)
#' plot(package_summaries, according_to = "n_imported_by", top = 30)
#' plot(package_summaries, according_to = "n_depended_by", top = 30)
#' plot(package_summaries, according_to = "page_rank", top = 30)
#'
#' ## author network
#' author_network <- build_network(cran_sample, perspective = "author")
#' author_network <- build_network(cran_db, perspective = "author")
#' author_summaries <- summary(author_network)
#' plot(author_summaries, according_to = "n_collaborators", top = 30)
#' plot(author_summaries, according_to = "n_packages", top = 30)
Expand Down
Binary file removed data/cran_sample.rda
Binary file not shown.
6 changes: 3 additions & 3 deletions tests/testthat/test-extractors.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
context("Test extractor functions")

data("cran_sample", package = "cranly")
package_network <- build_network(object = cran_sample)
author_network <- build_network(object = cran_sample, perspective = "author")
cran_db <- clean_CRAN_db()
package_network <- build_network(object = cran_db)
author_network <- build_network(object = cran_db, perspective = "author")

test_that("author_of returnes same value when applied to a package network and when applied to an author network",
expect_equal(sort(author_of(package_network, "MASS")),
Expand Down

0 comments on commit 9fce446

Please sign in to comment.