R Script to generate random dataset in 2d space

I want to analyze the effectiveness and efficiency of kernel methods for which I would require 3 different data-set in 2 dimensional space for each of the following cases:

1. BAD_kmeans: The data set for which the kmeans clustering algorithm will not perform well.
2. BAD_pca: The data set for which the Principal Component Analysis (PCA) dimension reduction method upon projection of the original points into 1-dimensional space (i.e., the first eigenvector) will not perform well.
3. BAD_svm: The data set for which the linear Support Vector Machine (SVM) supervised classification method using two classes of points (positive and negative) will not perform well.

Which packages can I use in R to generate the random 2d data-set for each of the above cases ? A sample script in R would help in understanding

• Can you clarify what these data sets are that you are trying to generate? what have you tried in R so far? Oct 21 '14 at 14:01

None of the algorithms you mention are good with data that has uniform distribution.

size <- 20             #length of random number vectors
set.seed(1)
x <- runif(size)          # generate samples from uniform distribution (0.0, 1.0)
y <-runif(size)
df <-data.frame(x,y)

# other distributions: rpois, rmvnorm, rnbinom, rbinom, rbeta, rchisq, rexp, rgamma, rlogis, rstab, rt, rgeom, rhyper, rwilcox, rweibull.