-
-
Save s-kganz/c2534666e369f8e19491bb29d53c619d to your computer and use it in GitHub Desktop.
Code to make the bullseye dataset in scutr
This file contains hidden or 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
| set.seed(1234) | |
| x <- runif(1000, min=-1, max=1) | |
| y <- runif(1000, min=-1, max=1) | |
| minor <- as.factor(ifelse(x ** 2 + y ** 2 < 0.5 ** 2, "yes", "no")) | |
| minor.inds <- c(1:length(minor))[minor == "yes"] | |
| minor[sample(minor.inds, 25)] <- "no" | |
| df <- data.frame(x, y, minor) | |
| ggplot(df, aes(x, y)) + geom_point(aes(color=minor)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment