single stage cluster sample

I'm working on a single-stage cluster sample of size 1,000.
"V1" is the name of the clustering variable generated by R, as my data doesn't have a header.
how can I fix the error for:

c <- cluster(test, clustername=c("V1"), size = 1000, method = "srswor")

Error in cluster(test, clustername = c("V1"), size = 1000, method = "srswor") :
unused arguments (clustername = c("V1"), size = 1000, method = "srswor")

These arguments should work if you are indeed calling the cluster() function in the {sampling} package. Depending on the order you load your libraries, it's possible you are accidentally calling the wrong function, try with:

c <- sampling::cluster(test, clustername=c("V1"), size = 1000, method = "srswor")

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.