-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
227 additions
and
68 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
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
% Generated by roxygen2 (4.1.0): do not edit by hand | ||
% Please edit documentation in R/streamgraph.R | ||
\name{renderStreamgraph} | ||
\alias{renderStreamgraph} | ||
\title{Widget render function for use in Shiny} | ||
\usage{ | ||
renderStreamgraph(expr, env = parent.frame(), quoted = FALSE) | ||
} | ||
\description{ | ||
Widget render function for use in Shiny | ||
} | ||
|
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
% Generated by roxygen2 (4.1.0): do not edit by hand | ||
% Please edit documentation in R/streamgraph.R | ||
\name{sg_legend} | ||
\alias{sg_legend} | ||
\title{Modify streamgraph legend properties} | ||
\usage{ | ||
sg_legend(sg, show = FALSE, label = "") | ||
} | ||
\arguments{ | ||
\item{show}{if this is \code{TRUE} and \code{interactive} is \code{TRUE} then a popup menu | ||
will be available that lists ll the keys in the data set. Selecting a key will | ||
perform the same action as hovering over the area with the mouse.} | ||
|
||
\item{label}{label for the legend (optional)} | ||
} | ||
\description{ | ||
If the \code{streamgraph} is interactive, a "legend" can be added | ||
that displays a select menu of all the stream categories. Selecting | ||
a category will highlight that stream in the graph. | ||
} | ||
\details{ | ||
TODO: legends for non-interactive streamgraphs | ||
} | ||
\examples{ | ||
\dontrun{ | ||
library(dplyr) | ||
library(streamgraph) | ||
ggplot2::movies \%>\% | ||
select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) \%>\% | ||
tidyr::gather(genre, value, -year) \%>\% | ||
group_by(year, genre) \%>\% | ||
tally(wt=value) \%>\% | ||
ungroup \%>\% | ||
mutate(year=as.Date(sprintf("\%d-01-01", year))) -> dat | ||
|
||
streamgraph(dat, "genre", "n", "year") \%>\% | ||
sg_colors("PuOr") \%>\% | ||
sg_legend(TRUE, "Genre: ") | ||
} | ||
} | ||
|
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
% Generated by roxygen2 (4.1.0): do not edit by hand | ||
% Please edit documentation in R/streamgraph.R | ||
\name{streamgraphOutput} | ||
\alias{streamgraphOutput} | ||
\title{Widget output function for use in Shiny} | ||
\usage{ | ||
streamgraphOutput(outputId, width = "100\%", height = "400px") | ||
} | ||
\description{ | ||
Widget output function for use in Shiny | ||
} | ||
|
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
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.