Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. ## get n colors at once
  2.  
  3. random.colors <- function(n) {
  4. hexbot <- GET(endpoint, query=list(count=n))
  5. unlist(content(hexbot)$colors)
  6. }
  7.  
  8. ncol <- 5
  9. barplot(rep(1,ncol),col=random.colors(ncol), axes=FALSE)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement