Skip to content
'gwordtree': Rendering a Word Tree using R + Google Charts Library.
R JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R
data
inst
man
.Rbuildignore
.gitattributes
.gitignore
DESCRIPTION
LICENSE
LICENSE.md
NAMESPACE
README.md
_pkgdown.yml
gwordtree.Rproj

README.md

gwordtree

Rendering a word tree using Google Chart.

Origin code: Word Trees  |  Charts  |  Google Developers

Installation

You can install this package from GitHub:

devtools::install_github("czxa/gwordtree")

Example

This is a basic example:

data(worddf)
gwordtree(word = worddf$word, firstword = "cats")

Using gwordtree within Shiny applications

Here is a very simple shiny example:

library(shiny)
library(gwordtree)
data(worddf)
ui <- fluidPage(
    titlePanel("Example for using gwordtree within Shiny applications"),
    mainPanel(
      gwordtree::gwordtreeOutput("shinytest", height = "500px")
    )
)
server <- function(input, output) {
    output$shinytest <- gwordtree::renderGwordtree({
        gwordtree::gwordtree(word = worddf$word, firstword = "cats")
    })
}
shinyApp(ui = ui, server = server)

And a example with text input:

dir <- system.file("examples", "gwordtree", package = "gwordtree")
setwd(dir)
shiny::shinyAppDir(".")

License

MIT © czxa.top

You can’t perform that action at this time.