Hi R users. I have a problem with function strata in sampling packages.> st0 = strata(dom, stratanames="stratas", size=sample.size,method="systematic",pik, FALSE) Error in sort.list(y) : 'x' must be atomic for 'sort.list' Have you called 'sort' on a list? In previous version of R 2.9.1 and previous version of package sampling this code worked well and now I don't know what is a problem? Any ideas how to solve this problem will be very useful? Thanks in advance Andrija [[alternative HTML version deleted]]
Which version of R and sampling? Where is the reproducible code? Uwe Ligges On 11.12.2010 16:16, andrija djurovic wrote:> Hi R users. > > I have a problem with function strata in sampling packages. > >> st0 = strata(dom, stratanames="stratas", size=sample.size, > method="systematic",pik, FALSE) > Error in sort.list(y) : 'x' must be atomic for 'sort.list' > Have you called 'sort' on a list? > > In previous version of R 2.9.1 and previous version of package sampling this > code worked well and now I don't know what is a problem? > Any ideas how to solve this problem will be very useful? > > > Thanks in advance > > Andrija > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Hi, I would like to attach my answer although this question has been posted here for more than a year. I believe some people may meet the same problem. I use sampling package to do the stratified sampling as well, using strata() function. And everything goes well before I add another library: Hmisc. I need this library to handling some pre-process on data. After trouble shooting for a long time, believe me it's miserable, I finally found: There's conflict between Hmisc and sampling packages. I suggest if strata pops unusual error like this, you should check if your libraries are incompatible with each other. Hope this helpful to you:) -- View this message in context: http://r.789695.n4.nabble.com/package-sampling-tp3083392p4268215.html Sent from the R help mailing list archive at Nabble.com.