Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

minor changes to readme,md for highlighting, and noting dependencies #3

Closed
wants to merge 3 commits into from

1 participant

@tbates

When I first ran the package, I needed to install json, and a newer than CRAN version of knitr... adding notes to that effect.

Also added ```S to highlight the examples

@tbates

just adding the rjson and df2json packages to imports... great package!

@tbates tbates closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 21, 2013
  1. @tbates

    add ```S to highlight code; add note that json and new knitr are requ…

    tbates authored
    …ired to avoid consternation
  2. @tbates
  3. @tbates

    just adding the missing "df3 <- matrix(rnorm(200), ncol = 8, nrow = 25)"

    tbates authored
    also normalising spacing around "="
This page is out of date. Refresh to see the latest.
Showing with 18 additions and 9 deletions.
  1. +3 −1 DESCRIPTION
  2. +15 −8 README.md
View
4 DESCRIPTION
@@ -8,7 +8,9 @@ Description: The default interactivity comes from the D3 javascript library.
Imports:
knitr,
yaml (>= 2.1.7),
- stringr
+ stringr,
+ rjson,
+ df2json
Suggests:
testthat,
stringr,
View
23 README.md
@@ -12,38 +12,46 @@ Want to learn more? [See the wiki](https://github.com/nachocab/clickme/wiki).
You can install clickme by running this in your R session:
-```
+```S
install.packages("devtools") # In case you don't have it already installed
library(devtools)
install_github("clickme", "nachocab")
```
-Now you can try the examples:
+Other packages you might need include [rjson][] and a new version of [knitr][]
+```S
+install.packages("rjson")
+install.packages("knitr", repos = "http://www.rforge.net/", type = "source")
```
+
+Now you can try the examples.
+
+Your browser will open a new tab for each example. The first one should look something like [this](http://bl.ocks.org/nachocab/5178583).
+
+```S
library(clickme)
# visualize a force-directed interactive graph
items <- paste0("GENE_", 1:40)
n <- 30
-df1 <- data.frame(a=sample(items, n, replace=TRUE), b=sample(items, n, replace=TRUE), type=sample(letters[1:3], n, replace=TRUE))
+df1 <- data.frame(a = sample(items, n, replace = TRUE), b = sample(items, n, replace = TRUE), type = sample(letters[1:3], n, replace = TRUE))
clickme(df1, "force_directed")
# visualize a line plot that allows zooming along the x-axis
n <- 30
cities <- c("Boston", "NYC", "Philadelphia")
-df2 <- data.frame(name=rep(cities, each=n), x=rep(1:n,length(cities)), y=c(sort(rnorm(n)),-sort(rnorm(n)),sort(rnorm(n))))
+df2 <- data.frame(name = rep(cities, each = n), x = rep(1:n, length(cities)), y = c(sort(rnorm(n)), -sort(rnorm(n)), sort(rnorm(n))))
clickme(df2, "line_with_focus")
# visualize an interactive heatmap alongside a parallel coordinates plot
+df3 <- matrix(rnorm(200), ncol = 8, nrow = 25)
rownames(df3) <- paste0("GENE_", 1:25)
colnames(df3) <- paste0("sample_", 1:8)
clickme(df3, "longitudinal_heatmap") # you will need to have a local server running for this example to work
```
-Your browser will open a new tab for each example. The first one should look something like [this](http://bl.ocks.org/nachocab/5178583).
-
## Acknowledgements
Thank you **Mike Bostock** for creating the [D3.js][] library. Being able to use it more effectively is the main reason why I developed clickme.
@@ -55,5 +63,4 @@ If you can see the potential of clickme as a bridge between the R and JS worlds,
[D3.js]: http://d3js.org
[Raphaël.js]: http://raphaeljs.com
[knitr]: http://yihui.name/knitr/
-
-
+[rjson]: http://cran.r-project.org/web/packages/rjson/index.html
Something went wrong with that request. Please try again.