Fix check errors introduced by last commit

1. Keep "k" as the number of clusters and initial centers
2. Error in as.matrix(init) : object 'init' not found, when k is just
a number