plotStrata2d.RdPlots a 2d graph showing obtained strata
plotStrata2d (x,outstrata,domain,vars,labels)
| x | the sampling frame |
|---|---|
| outstrata | the optimized strata |
| domain | a domain in the frame |
| vars | vars to appear in x and y axis |
| labels | labels to appear in x and y axis |
A formatted output containing information on the strata in the given domain
if (FALSE) { library(SamplingStrata) data("swissmunicipalities") swissmunicipalities = swissmunicipalities[swissmunicipalities$REG==1,] data("errors") swissmunicipalities$id <- c(1:nrow(swissmunicipalities)) swissmunicipalities$domain = 1 frame <- buildFrameDF(swissmunicipalities, id = "id", domainvalue = "REG", X = c("Surfacesbois","Surfacescult"), Y = c("Pop020", "Pop2040") ) solution <- optimStrata (method = "continuous", errors = errors,, framesamp = frame, nStrata = 8, iter = 25, pops = 10) p <- plotStrata2d(solution$framenew, solution$aggr_strata, domain = 1, vars = c("X1","X2"), labels = c("Surfacesbois","Surfacescult")) p }