Skip to content

Commit

Permalink
fix utils & methods for CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
bthieurmel committed Jan 31, 2016
1 parent 1b7b2ed commit d9c76b5
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ Imports: htmlwidgets,
htmltools,
jsonlite,
magrittr,
utils
utils,
methods
License: MIT + file LICENSE
Suggests: knitr,
igraph
Expand Down
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ import(htmltools)
import(htmlwidgets)
importFrom(jsonlite,fromJSON)
importFrom(magrittr,"%>%")
importFrom(methods,findFunction)
importFrom(utils,browseURL)
importFrom(utils,getAnywhere)
2 changes: 2 additions & 0 deletions R/visIgraph.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@
#'\link{visPhysics} for control physics, \link{visInteraction} for interaction, \link{visNetworkProxy} & \link{visFocus} & \link{visFit} for animation within shiny,
#'\link{visDocumentation}, \link{visEvents}, \link{visConfigure} ...
#'
#' @importFrom methods findFunction
#'
#'@export

visIgraph <- function(igraph,
Expand Down
2 changes: 2 additions & 0 deletions R/visIgraphLayout.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
#'\link{visPhysics} for control physics, \link{visInteraction} for interaction, \link{visNetworkProxy} & \link{visFocus} & \link{visFit} for animation within shiny,
#'\link{visDocumentation}, \link{visEvents}, \link{visConfigure} ...
#'
#' @importFrom utils getAnywhere
#'
#'@export

visIgraphLayout <- function(graph,
Expand Down
2 changes: 2 additions & 0 deletions R/visSave.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#'
#' @examples
#'
#'\dontrun{
#'nodes <- data.frame(id = 1:3, group = c("B", "A", "B"))
#'edges <- data.frame(from = c(1,2), to = c(2,3))
#'
Expand All @@ -20,6 +21,7 @@
#'# same as
#'visSave(network, file = "network.html")
#'
#'}
#' @export
visSave <- function(graph, file, selfcontained = TRUE) {
htmlwidgets::saveWidget(graph, file, selfcontained)
Expand Down
3 changes: 3 additions & 0 deletions man/visSave.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ include it's dependencies in an adjacent directory or can bundle all
dependencies into the HTML file (via base64 encoding).
}
\examples{
\dontrun{
nodes <- data.frame(id = 1:3, group = c("B", "A", "B"))
edges <- data.frame(from = c(1,2), to = c(2,3))
Expand All @@ -30,5 +31,7 @@ network
network \%>\% visSave(file = "network.html")
# same as
visSave(network, file = "network.html")
}
}

0 comments on commit d9c76b5

Please sign in to comment.