How would I write the following in R? -


"red", "red", "red", "green", "green", "blue" 

i have tried using rep, etc can 1 colors.

use rep and/or c, twice @ most, each max of 2 arguments.

rep(c("red", "green", "blue"), c(3, 2, 1)) 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -