Skip to content

Commit

Permalink
more examples
Browse files Browse the repository at this point in the history
  • Loading branch information
hrbrmstr committed Mar 4, 2016
1 parent c8339d0 commit dd88872
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions R/radviz.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#' @param width,height height & width of the widget
#' @export
#' @examples
#' # motor vehicles
#'
#' mtcars_1 <- dplyr::add_rownames(mtcars, var="car")
#'
#' radviz(mtcars_1, diameter=600, margin=100,
Expand All @@ -19,6 +21,18 @@
#' "qsec", "vs", "am", "gear", "carb")) %>%
#' add_color("cyl") %>%
#' add_tooltip("function(d) { return d.car; }")
#'
#' # motor vehicles deaths
#'
#' cardeaths <- data.frame(as.matrix(Seatbelts),
#' year=substring(zoo::as.yearmon(time(Seatbelts)), 5, 7))
#'
#' radviz(cardeaths, diameter=600, margin=100,
#' use_repulsion=FALSE, draw_links=FALSE,
#' width=600, height=500) %>%
#' add_dimensions(c("DriversKilled", "PetrolPrice", "VanKilled")) %>%
#' add_color("year") %>%
#' add_tooltip("function(d){ return d.year; }")
radviz <- function(data,
draw_links=TRUE,
zoom_factor=1,
Expand Down
14 changes: 14 additions & 0 deletions man/radviz.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dd88872

Please sign in to comment.