Skip to content

Instantly share code, notes, and snippets.

@vladiim
Created June 28, 2016 04:36
Show Gist options
  • Select an option

  • Save vladiim/86daa6f0083d199dc9a7d7660800a943 to your computer and use it in GitHub Desktop.

Select an option

Save vladiim/86daa6f0083d199dc9a7d7660800a943 to your computer and use it in GitHub Desktop.
set.seed(1)
x=matrix(rnorm(200),100,2)
xmean=matrix(rnorm(8,sd=4),4,2)
which=sample(1:4,100,replace=T)
x=x+xmean[which,]
plot(x,col=which,pch=19)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment