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

> library(Mangrove)

> data(exampleORs)

> class(exampleORs)
[1] "MangroveORs" "data.frame" 

> print(exampleORs)
  rsID RiskAllele ORhet ORhom Freq
1 SNP1          A   1.5  2.25 0.20
2 SNP2          C   1.3  1.69 0.40
3 SNP3          C   1.4  1.96 0.60
4 SNP4          A   2.0  4.00 0.01

> summary(exampleORs)
A Mangrove Odds Ratios object:
Number of variants:4
Mean absolute het OR: 1.55
Mean absolute hom OR: 2.475
Mean risk allele frequency: 0.302
For a common (10%) disease, these variants explain 3.85% of variance
For a rare (0.5%) disease, these variants explain 1.77% of variance

> plot(exampleORs)

> summary(exampleORs, K = 0.02)
A Mangrove Odds Ratios object:
Number of variants:4
Mean absolute het OR: 1.55
Mean absolute hom OR: 2.475
Mean risk allele frequency: 0.302
Given a prevalence of 2% these variants explain 2.44% of variance

> plot(exampleORs, K = 0.02)

> data(ccped)

> class(ccped)
[1] "MangrovePed" "data.frame" 

> head(ccped)
      Family    ID Mother Father Sex Phenotype SNP1.1 SNP1.2 SNP2.1 SNP2.2
ID106 FAM106 ID106      0      0   2         2      A      C      A      A
ID110 FAM110 ID110      0      0   2         2      C      C      C      C
ID170 FAM170 ID170      0      0   1         2      C      C      C      C
ID189 FAM189 ID189      0      0   2         2      C      C      A      A
ID200 FAM200 ID200      0      0   2         2      C      C      A      A
ID331 FAM331 ID331      0      0   2         2      C      C      C      A
      SNP3.1 SNP3.2 SNP4.1 SNP4.2
ID106      C      C      G      G
ID110      A      C      G      G
ID170      C      C      G      G
ID189      A      C      G      G
ID200      C      C      G      G
ID331      A      C      G      G

> summary(ccped)
A Mangrove pedigree.
Number of individuals: 20000
Number of genotyped individuals: 20000
Number of affecteds: 10000
Number of markers: 4
Allele counts:
     SNP1               SNP2               SNP3               SNP4          
 Length:20000       Length:20000       Length:20000       Length:20000      
 Class :character   Class :character   Class :character   Class :character  
 Mode  :character   Mode  :character   Mode  :character   Mode  :character  

> ccrisk <- calcORs(ccped, exampleORs)

> class(ccrisk)
[1] "MangroveRiskPreds"

> plot(ccrisk)

> boxplot(log(ccrisk) ~ ccped[, 6])

> ccprob <- applyORs(ccrisk, K = 0.02)

> summary(ccprob)
    Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
0.008499 0.015362 0.019879 0.020964 0.024583 0.060052 

> boxplot(ccprob ~ ccped[, 6])

> selcases <- names(head(sort(ccrisk[ccped[, 6] == 2]), 
+     1000))

> selcontrols <- names(tail(sort(ccrisk[ccped[, 6] == 
+     1]), 1000))

> boxplot(list(ctrl = log(ccrisk[selcontrols]), cases = log(ccrisk[selcases])))

> data(exampleBetas)

> class(exampleBetas)
[1] "MangroveBetas" "data.frame"   

> summary(exampleBetas)
A Mangrove Betas object:
Number of variants:179
Mean absolute beta: 0.035
Mean risk allele frequency: 0.474
These variants explain 8.84% of variance

> data(contped)

> class(contped)
[1] "MangrovePed" "data.frame" 

> predbetas <- calcBetas(contped, exampleBetas)

> contpreds <- applyBetas(predbetas, 162, 6.4)

> summary(contpreds)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  156.5   160.7   162.0   162.0   163.2   167.4 

> hist(contped[, 6] - contpreds)

> data(famped)

> summary(famped)
A Mangrove pedigree.
Number of individuals: 19
Number of genotyped individuals: 9
Number of affecteds: 3
Number of markers: 4
Allele counts:
     SNP1               SNP2               SNP3               SNP4          
 Length:9           Length:9           Length:9           Length:9          
 Class :character   Class :character   Class :character   Class :character  
 Mode  :character   Mode  :character   Mode  :character   Mode  :character  

> library(kinship2)

  When sourcing 'Mangrove.R':
Error: there is no package called 'kinship2'
Execution halted

  'Mangrove.Rnw'... failed