Errors in running code in vignettes:
when running code in 'SDaA_using_survey.Rnw'

> options(width = 65)

> library(SDaA)

> library(survey)
Loading required package: grid
Loading required package: Matrix
Loading required package: survival

Attaching package: 'survey'

The following object is masked from 'package:graphics':

    dotchart


> agsrsDesign <- svydesign(ids = ~1, weights = ~1, data = agsrs)

> svyratio(numerator = ~acres92, denominator = ~acres87, 
+     design = agsrsDesign)
Ratio estimator: svyratio.survey.design2(numerator = ~acres92, denominator = ~acres87, 
    design = agsrsDesign)
Ratios=
          acres87
acres92 0.9865652
SEs=
            acres87
acres92 0.006053015

> plot(I(acres92/10^6) ~ I(acres87/10^6), xlab = "Millions of Acres Devoted to Farms (1987)", 
+     ylab = "Millions of Acres Devoted to Farms (1992) ..." ... [TRUNCATED] 

> abline(lm(I(acres92/10^6) ~ 0 + I(acres87/10^6), data = agsrs), 
+     col = "red", lwd = 2)

> seedlings <- data.frame(tree = 1:10, x = c(1, 0, 8, 
+     2, 76, 60, 25, 2, 1, 31), y = c(0, 0, 1, 2, 10, 15, 3, 2, 
+     1, 27))

> names(seedlings) <- c("tree", "x", "y")

> plot(y ~ x, data = seedlings, xlab = "Seedlings Alive (March 1992)", 
+     ylab = "Seedlings That Survived (February 1994)")

> pf <- data.frame(photo = c(10, 12, 7, 13, 13, 6, 17, 
+     16, 15, 10, 14, 12, 10, 5, 12, 10, 10, 9, 6, 11, 7, 9, 11, 
+     10, 10), field = c(15, .... [TRUNCATED] 

> recacr87 <- agsrs$acres87

> recacr87[recacr87 > 0] <- 1/recacr87[recacr87 > 0]

> model1 <- lm(acres92 ~ 0 + acres87, weights = recacr87, 
+     data = agsrs)

> summary(model1)

Call:
lm(formula = acres92 ~ 0 + acres87, data = agsrs, weights = recacr87)

Weighted Residuals:
    Min      1Q  Median      3Q     Max 
-369.88  -22.09   -5.74   10.76  311.71 

Coefficients:
        Estimate Std. Error t value Pr(>|t|)    
acres87 0.986565   0.004844   203.7   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 46.1 on 298 degrees of freedom
Multiple R-squared:  0.9929,	Adjusted R-squared:  0.9928 
F-statistic: 4.149e+04 on 1 and 298 DF,  p-value: < 2.2e-16


> wtresid <- resid(model1)/sqrt(agsrs$acres87)

> plot(wtresid ~ I(agsrs$acres87/10^6), xlab = "Millions of Acres Devoted to Farms (1987)", 
+     ylab = "Weighted Residuals")

> boxplot(acres92/10^6 ~ region, xlab = "Region", ylab = "Millions of Acres", 
+     data = agstrat)

> GPA <- cbind(expand.grid(1:4, 1:5), gpa = c(3.08, 
+     2.6, 3.44, 3.04, 2.36, 3.04, 3.28, 2.68, 2, 2.56, 2.52, 1.88, 
+     3, 2.88, 3.44, 3.64, 2 .... [TRUNCATED] 

> names(GPA)[1:2] <- c("person_num", "cluster")

> GPA$pwt <- 100/5

> clusterDesign <- svydesign(ids = ~cluster, weights = ~pwt, 
+     data = GPA)

> svytotal(~gpa, design = clusterDesign)
     total     SE
gpa 1130.4 67.167

> plot(volume ~ clutch, xlim = c(0, 200), pch = 19, 
+     data = coots, xlab = "Clutch Number", ylab = "Egg Volume")

> plot(volume ~ clutch, xlim = c(0, 200), pch = 19, 
+     data = coots, xlab = "Clutch Number", ylab = "Egg Volume")

> data(statepop)

> statepop$psi <- statepop$popn/255077536

> plot(phys ~ psi, data = statepop, xlab = expression(paste(Psi[i], 
+     " for County")), ylab = "Physicians in County (in thousands)")

> data(htpop)

> popecdf <- ecdf(htpop$height)

> plot(popecdf, do.points = FALSE, ylab = "F(y)", xlab = "Height Value, y")

> minht <- min(htpop$height)

> breaks <- c(minht - 1, seq(from = minht, to = max(htpop$height), 
+     by = 1))

> hist(htpop$height, ylab = "f(y)", breaks = breaks, 
+     xlab = "Height Value, y", freq = FALSE)

> data(htsrs)

> hist(htsrs$height, ylab = "Relative Frequency", xlab = "Height (cm)", 
+     freq = FALSE)

> data(htstrat)

> hist(htstrat$height, ylab = "Relative Frequency", 
+     xlab = "Height (cm)", freq = FALSE)

> minht <- min(htstrat$height)

> breaks <- c(minht - 1, seq(from = minht, to = max(htstrat$height), 
+     by = 1))

> hist(htstrat$height, ylab = expression(hat(f)(y)), 
+     breaks = breaks, xlab = "Height Value, y", freq = FALSE)

> stratecdf <- ecdf(htstrat$height)

> plot(stratecdf, do.points = FALSE, ylab = expression(hat(F)(y)), 
+     xlab = "Height Value, y")

> data(syc)

> hist(syc$age, freq = FALSE, xlab = "Age")

> sycdesign <- svydesign(ids = ~psu, strata = ~stratum, 
+     data = syc, weights = ~finalwt)

> oo <- options(survey.lonely.psu = "certainty")

> svyboxplot(age ~ factor(stratum), design = sycdesign)

> options(oo)

> library(ggplot2)

  When sourcing 'SDaA_using_survey.R':
Error: there is no package called 'ggplot2'
Execution halted

  'SDaA_using_survey.Rnw' using 'UTF-8'... failed