Skip to content

Commit

Permalink
test and fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
timelyportfolio committed Jun 13, 2017
1 parent 96100ba commit dcea0c1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion inst/examples/example_ngram.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
\dontrun{
# use sunburst to analyze ngram data from Peter Norvig
# http://norvig.com/mayzner.html

Expand Down Expand Up @@ -28,7 +29,6 @@ ngrams2 %>>%
) %>>%
sunburst

\dontrun{

library(htmltools)

Expand Down
9 changes: 5 additions & 4 deletions inst/examples/example_replicate.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@
library(sunburstR)

# read in sample visit-sequences.csv data provided in source
# only use first 200 rows to speed package build and check
# https://gist.github.com/kerryrodden/7090426#file-visit-sequences-csv
sequences <- read.csv(
system.file("examples/visit-sequences.csv",package="sunburstR")
,header = FALSE
,stringsAsFactors = FALSE
)
)[1:100,]

sunburst(sequences)

\dontrun{

# explore some of the arguments
sunburst(
sequences
,count = TRUE
)

\dontrun{

sunburst(
sequences
# apply sort order to the legendS
# apply sort order to the legends
,legendOrder = unique(unlist(strsplit(sequences[,1],"-")))
# just provide the name in the explanation in the center
,explanation = "function(d){return d.data.name}"
Expand Down
11 changes: 6 additions & 5 deletions man/sunburst.Rd

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

0 comments on commit dcea0c1

Please sign in to comment.