Created
January 4, 2020 20:52
-
-
Save agricolamz/1761f3b3a18d5bc5afba7fe392bcf1e1 to your computer and use it in GitHub Desktop.
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
```{r} | |
library(r2d3) | |
df <- data.frame(x = rnorm(20), y = rlnorm(20)) | |
df <- round(df*10)+100 | |
``` | |
```{d3 data = df} | |
svg.selectAll('circle') | |
.data(data) | |
.enter() | |
.append('circle') | |
.attr("cx", function(d) {return d.x;}) | |
.attr("cy", function(d) {return d.y;}) | |
.attr("r", 5); | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment