From eb97e57d7aadba4f62461085f1902f4813e294f7 Mon Sep 17 00:00:00 2001
From: Clare <chorscroft@users.noreply.github.com>
Date: Thu, 9 Jul 2020 02:26:52 +0100
Subject: [PATCH] Updated the example text

---
 R/LR.R                              |  4 ++--
 R/L_plus_R.R                        |  4 ++--
 R/Zalpha_BetaCDF.R                  |  4 ++--
 R/Zalpha_Zscore.R                   |  4 ++--
 R/Zalpha_all.R                      |  6 +++---
 R/Zalpha_expected.R                 |  4 ++--
 R/Zalpha_log_rsq_over_expected.R    |  4 ++--
 R/Zalpha_rsq_over_expected.R        |  4 ++--
 R/Zbeta.R                           |  4 ++--
 R/Zbeta_BetaCDF.R                   |  4 ++--
 R/Zbeta_Zscore.R                    |  4 ++--
 R/Zbeta_expected.R                  |  4 ++--
 R/Zbeta_log_rsq_over_expected.R     |  4 ++--
 R/Zbeta_rsq_over_expected.R         |  4 ++--
 R/create_LDprofile.R                |  4 ++--
 R/zalpha.R                          |  4 ++--
 man/LDprofile.Rd                    |  6 ++++--
 man/LR.Rd                           |  4 ++--
 man/L_plus_R.Rd                     |  4 ++--
 man/Zalpha_BetaCDF.Rd               |  4 ++--
 man/Zalpha_Zscore.Rd                |  4 ++--
 man/Zalpha_all.Rd                   |  6 +++---
 man/Zalpha_expected.Rd              |  4 ++--
 man/Zalpha_log_rsq_over_expected.Rd |  4 ++--
 man/Zalpha_rsq_over_expected.Rd     |  4 ++--
 man/Zbeta.Rd                        |  4 ++--
 man/Zbeta_BetaCDF.Rd                |  4 ++--
 man/Zbeta_Zscore.Rd                 |  4 ++--
 man/Zbeta_expected.Rd               |  4 ++--
 man/Zbeta_log_rsq_over_expected.Rd  |  4 ++--
 man/Zbeta_rsq_over_expected.Rd      |  4 ++--
 man/create_LDprofile.Rd             | 12 ++++++------
 man/snps.Rd                         | 10 ++++++----
 man/zalpha.Rd                       |  4 ++--
 34 files changed, 80 insertions(+), 76 deletions(-)

diff --git a/R/LR.R b/R/LR.R
index e99fd28..ac5bc5c 100644
--- a/R/LR.R
+++ b/R/LR.R
@@ -14,9 +14,9 @@
 #' ## load the snps example dataset
 #' data(snps)
 #' ## run LR over all the SNPs with a window size of 3000 bp
-#' LR(snps$positions,3000)
+#' LR(snps$bp_positions,3000)
 #' ## only return results for SNPs between locations 600 and 1500 bp
-#' LR(snps$positions,3000,X=c(600,1500))
+#' LR(snps$bp_positions,3000,X=c(600,1500))
 #'
 #' @export
 
diff --git a/R/L_plus_R.R b/R/L_plus_R.R
index ffbbf0a..848b6b2 100644
--- a/R/L_plus_R.R
+++ b/R/L_plus_R.R
@@ -16,9 +16,9 @@
 #' ## load the snps example dataset
 #' data(snps)
 #' ## run L_plus_R over all the SNPs with a window size of 3000 bp
-#' L_plus_R(snps$positions,3000)
+#' L_plus_R(snps$bp_positions,3000)
 #' ## only return results for SNPs between locations 600 and 1500 bp
-#' L_plus_R(snps$positions,3000,X=c(600,1500))
+#' L_plus_R(snps$bp_positions,3000,X=c(600,1500))
 #'
 #' @export
 
diff --git a/R/Zalpha_BetaCDF.R b/R/Zalpha_BetaCDF.R
index 69442fa..4ccfd62 100644
--- a/R/Zalpha_BetaCDF.R
+++ b/R/Zalpha_BetaCDF.R
@@ -36,10 +36,10 @@
 #' data(snps)
 #' data(LDprofile)
 #' ## run Zalpha_BetaCDF over all the SNPs with a window size of 3000 bp
-#' Zalpha_BetaCDF(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+#' Zalpha_BetaCDF(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
 #'  LDprofile$bin,LDprofile$Beta_a,LDprofile$Beta_b)
 #' ## only return results for SNPs between locations 600 and 1500 bp
-#' Zalpha_BetaCDF(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+#' Zalpha_BetaCDF(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
 #'  LDprofile$bin,LDprofile$Beta_a,LDprofile$Beta_b,X=c(600,1500))
 #'
 #' @export
diff --git a/R/Zalpha_Zscore.R b/R/Zalpha_Zscore.R
index 0f57e56..ecc0c40 100644
--- a/R/Zalpha_Zscore.R
+++ b/R/Zalpha_Zscore.R
@@ -35,10 +35,10 @@
 #' data(snps)
 #' data(LDprofile)
 #' ## run Zalpha_Zscore over all the SNPs with a window size of 3000 bp
-#' Zalpha_Zscore(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+#' Zalpha_Zscore(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
 #'  LDprofile$bin,LDprofile$rsq,LDprofile$sd)
 #' ## only return results for SNPs between locations 600 and 1500 bp
-#' Zalpha_Zscore(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+#' Zalpha_Zscore(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
 #'  LDprofile$bin,LDprofile$rsq,LDprofile$sd,X=c(600,1500))
 #'
 #' @export
diff --git a/R/Zalpha_all.R b/R/Zalpha_all.R
index b6a40be..20c6a01 100644
--- a/R/Zalpha_all.R
+++ b/R/Zalpha_all.R
@@ -36,13 +36,13 @@
 #' data(LDprofile)
 #' ## run Zalpha_all over all the SNPs with a window size of 3000 bp
 #' ## will return all 15 statistics
-#' Zalpha_all(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+#' Zalpha_all(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
 #'  LDprofile$bin,LDprofile$rsq,LDprofile$sd,LDprofile$Beta_a,LDprofile$Beta_b)
 #' ## only return results for SNPs between locations 600 and 1500 bp
-#' Zalpha_all(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+#' Zalpha_all(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
 #'  LDprofile$bin,LDprofile$rsq,LDprofile$sd,LDprofile$Beta_a,LDprofile$Beta_b,X=c(600,1500))
 #' ## will only return statistics not requiring an LD profile
-#'Zalpha_all(snps$positions,3000,as.matrix(snps[,3:12]))
+#'Zalpha_all(snps$bp_positions,3000,as.matrix(snps[,3:12]))
 #'
 #' @export
 #' @seealso \code{\link{Zalpha}} \code{\link{Zalpha_expected}} \code{\link{Zalpha_rsq_over_expected}} \code{\link{Zalpha_log_rsq_over_expected}} \code{\link{Zalpha_Zscore}} \code{\link{Zalpha_BetaCDF}} \code{\link{Zbeta}} \code{\link{Zbeta_expected}} \code{\link{Zbeta_rsq_over_expected}} \code{\link{Zbeta_log_rsq_over_expected}} \code{\link{Zbeta_Zscore}} \code{\link{Zbeta_BetaCDF}} \code{\link{LR}} \code{\link{L_plus_R}}
diff --git a/R/Zalpha_expected.R b/R/Zalpha_expected.R
index b5788ae..1112fbf 100644
--- a/R/Zalpha_expected.R
+++ b/R/Zalpha_expected.R
@@ -31,9 +31,9 @@
 #' data(snps)
 #' data(LDprofile)
 #' ## run Zalpha_expected over all the SNPs with a window size of 3000 bp
-#' Zalpha_expected(snps$positions,3000,snps$distances,LDprofile$bin,LDprofile$rsq)
+#' Zalpha_expected(snps$bp_positions,3000,snps$cM_distances,LDprofile$bin,LDprofile$rsq)
 #' ## only return results for SNPs between locations 600 and 1500 bp
-#' Zalpha_expected(snps$positions,3000,snps$distances,LDprofile$bin,LDprofile$rsq,X=c(600,1500))
+#' Zalpha_expected(snps$bp_positions,3000,snps$cM_distances,LDprofile$bin,LDprofile$rsq,X=c(600,1500))
 #'
 #' @export
 #'
diff --git a/R/Zalpha_log_rsq_over_expected.R b/R/Zalpha_log_rsq_over_expected.R
index 18a1141..9548804 100644
--- a/R/Zalpha_log_rsq_over_expected.R
+++ b/R/Zalpha_log_rsq_over_expected.R
@@ -34,10 +34,10 @@
 #' data(snps)
 #' data(LDprofile)
 #' ## run Zalpha_log_rsq_over_expected over all the SNPs with a window size of 3000 bp
-#' Zalpha_log_rsq_over_expected(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+#' Zalpha_log_rsq_over_expected(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
 #'  LDprofile$bin,LDprofile$rsq)
 #' ## only return results for SNPs between locations 600 and 1500 bp
-#' Zalpha_log_rsq_over_expected(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+#' Zalpha_log_rsq_over_expected(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
 #'  LDprofile$bin,LDprofile$rsq,X=c(600,1500))
 #'
 #' @export
diff --git a/R/Zalpha_rsq_over_expected.R b/R/Zalpha_rsq_over_expected.R
index 7e8ef5d..732c03b 100644
--- a/R/Zalpha_rsq_over_expected.R
+++ b/R/Zalpha_rsq_over_expected.R
@@ -34,10 +34,10 @@
 #' data(snps)
 #' data(LDprofile)
 #' ## run Zalpha_rsq_over_expected over all the SNPs with a window size of 3000 bp
-#' Zalpha_rsq_over_expected(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+#' Zalpha_rsq_over_expected(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
 #'  LDprofile$bin,LDprofile$rsq)
 #' ## only return results for SNPs between locations 600 and 1500 bp
-#' Zalpha_rsq_over_expected(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+#' Zalpha_rsq_over_expected(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
 #'  LDprofile$bin,LDprofile$rsq,X=c(600,1500))
 #'
 #' @export
diff --git a/R/Zbeta.R b/R/Zbeta.R
index 8b9a5f0..b4baf3c 100644
--- a/R/Zbeta.R
+++ b/R/Zbeta.R
@@ -22,9 +22,9 @@
 #' ## load the snps example dataset
 #' data(snps)
 #' ## run Zbeta over all the SNPs with a window size of 3000 bp
-#' Zbeta(snps$positions,3000,as.matrix(snps[,3:12]))
+#' Zbeta(snps$bp_positions,3000,as.matrix(snps[,3:12]))
 #' ## only return results for SNPs between locations 600 and 1500 bp
-#' Zbeta(snps$positions,3000,as.matrix(snps[,3:12]),X=c(600,1500))
+#' Zbeta(snps$bp_positions,3000,as.matrix(snps[,3:12]),X=c(600,1500))
 #'
 #' @export
 
diff --git a/R/Zbeta_BetaCDF.R b/R/Zbeta_BetaCDF.R
index 1908284..3be71e6 100644
--- a/R/Zbeta_BetaCDF.R
+++ b/R/Zbeta_BetaCDF.R
@@ -36,10 +36,10 @@
 #' data(snps)
 #' data(LDprofile)
 #' ## run Zbeta_BetaCDF over all the SNPs with a window size of 3000 bp
-#' Zbeta_BetaCDF(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+#' Zbeta_BetaCDF(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
 #'  LDprofile$bin,LDprofile$Beta_a,LDprofile$Beta_b)
 #' ## only return results for SNPs between locations 600 and 1500 bp
-#' Zbeta_BetaCDF(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+#' Zbeta_BetaCDF(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
 #'  LDprofile$bin,LDprofile$Beta_a,LDprofile$Beta_b,X=c(600,1500))
 #'
 #' @export
diff --git a/R/Zbeta_Zscore.R b/R/Zbeta_Zscore.R
index 76eda7d..9c4031c 100644
--- a/R/Zbeta_Zscore.R
+++ b/R/Zbeta_Zscore.R
@@ -35,10 +35,10 @@
 #' data(snps)
 #' data(LDprofile)
 #' ## run Zbeta_Zscore over all the SNPs with a window size of 3000 bp
-#' Zbeta_Zscore(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+#' Zbeta_Zscore(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
 #'  LDprofile$bin,LDprofile$rsq,LDprofile$sd)
 #' ## only return results for SNPs between locations 600 and 1500 bp
-#' Zbeta_Zscore(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+#' Zbeta_Zscore(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
 #'  LDprofile$bin,LDprofile$rsq,LDprofile$sd,X=c(600,1500))
 #'
 #' @export
diff --git a/R/Zbeta_expected.R b/R/Zbeta_expected.R
index 626c4e8..05bde70 100644
--- a/R/Zbeta_expected.R
+++ b/R/Zbeta_expected.R
@@ -31,9 +31,9 @@
 #' data(snps)
 #' data(LDprofile)
 #' ## run Zbeta_expected over all the SNPs with a window size of 3000 bp
-#' Zbeta_expected(snps$positions,3000,snps$distances,LDprofile$bin,LDprofile$rsq)
+#' Zbeta_expected(snps$bp_positions,3000,snps$cM_distances,LDprofile$bin,LDprofile$rsq)
 #' ## only return results for SNPs between locations 600 and 1500 bp
-#' Zbeta_expected(snps$positions,3000,snps$distances,LDprofile$bin,LDprofile$rsq,X=c(600,1500))
+#' Zbeta_expected(snps$bp_positions,3000,snps$cM_distances,LDprofile$bin,LDprofile$rsq,X=c(600,1500))
 #'
 #' @export
 #'
diff --git a/R/Zbeta_log_rsq_over_expected.R b/R/Zbeta_log_rsq_over_expected.R
index 7e8bbec..4293b5c 100644
--- a/R/Zbeta_log_rsq_over_expected.R
+++ b/R/Zbeta_log_rsq_over_expected.R
@@ -34,10 +34,10 @@
 #' data(snps)
 #' data(LDprofile)
 #' ## run Zbeta_log_rsq_over_expected over all the SNPs with a window size of 3000 bp
-#' Zbeta_log_rsq_over_expected(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+#' Zbeta_log_rsq_over_expected(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
 #'  LDprofile$bin,LDprofile$rsq)
 #' ## only return results for SNPs between locations 600 and 1500 bp
-#' Zbeta_log_rsq_over_expected(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+#' Zbeta_log_rsq_over_expected(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
 #'  LDprofile$bin,LDprofile$rsq,X=c(600,1500))
 #'
 #' @export
diff --git a/R/Zbeta_rsq_over_expected.R b/R/Zbeta_rsq_over_expected.R
index af0262d..b779188 100644
--- a/R/Zbeta_rsq_over_expected.R
+++ b/R/Zbeta_rsq_over_expected.R
@@ -34,10 +34,10 @@
 #' data(snps)
 #' data(LDprofile)
 #' ## run Zbeta_rsq_over_expected over all the SNPs with a window size of 3000 bp
-#' Zbeta_rsq_over_expected(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+#' Zbeta_rsq_over_expected(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
 #'  LDprofile$bin,LDprofile$rsq)
 #' ## only return results for SNPs between locations 600 and 1500 bp
-#' Zbeta_rsq_over_expected(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+#' Zbeta_rsq_over_expected(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
 #'  LDprofile$bin,LDprofile$rsq,X=c(600,1500))
 #'
 #' @export
diff --git a/R/create_LDprofile.R b/R/create_LDprofile.R
index 79f32a8..b599bfa 100644
--- a/R/create_LDprofile.R
+++ b/R/create_LDprofile.R
@@ -24,10 +24,10 @@
 #' ## load the snps example dataset
 #' data(snps)
 #' ## Create an LD profile using this data
-#' create_LDprofile(snps$distances,as.matrix(snps[,3:12]),0.001)
+#' create_LDprofile(snps$cM_distances,as.matrix(snps[,3:12]),0.001)
 #' ## To get the Beta distribution parameter estimates, the fitdistrplus package is required
 #' if (requireNamespace("fitdistrplus", quietly = TRUE)==TRUE) {
-#'   create_LDprofile(snps$distances,as.matrix(snps[,3:12]),0.001,beta_params=TRUE)
+#'   create_LDprofile(snps$cM_distances,as.matrix(snps[,3:12]),0.001,beta_params=TRUE)
 #' }
 #'
 #'
diff --git a/R/zalpha.R b/R/zalpha.R
index c9c1fde..3384216 100644
--- a/R/zalpha.R
+++ b/R/zalpha.R
@@ -22,9 +22,9 @@
 #' ## load the snps example dataset
 #' data(snps)
 #' ## run Zalpha over all the SNPs with a window size of 3000 bp
-#' Zalpha(snps$positions,3000,as.matrix(snps[,3:12]))
+#' Zalpha(snps$bp_positions,3000,as.matrix(snps[,3:12]))
 #' ## only return results for SNPs between locations 600 and 1500 bp
-#' Zalpha(snps$positions,3000,as.matrix(snps[,3:12]),X=c(600,1500))
+#' Zalpha(snps$bp_positions,3000,as.matrix(snps[,3:12]),X=c(600,1500))
 #'
 #' @export
 
diff --git a/man/LDprofile.Rd b/man/LDprofile.Rd
index a0ee7da..32c4719 100644
--- a/man/LDprofile.Rd
+++ b/man/LDprofile.Rd
@@ -4,14 +4,16 @@
 \name{LDprofile}
 \alias{LDprofile}
 \title{Dataset containing an example LD profile}
-\format{A data frame with 50 rows and 5 variables:
+\format{
+A data frame with 50 rows and 5 variables:
 \describe{
   \item{bin}{the lower bound of each bin}
   \item{rsq}{the expected \eqn{r^2}{r^2} value for a pair of SNPs, where the genetic distance between them falls in the given bin}
   \item{sd}{the standard deviation of the expected \eqn{r^2}{r^2} value}
   \item{Beta_a}{the first shape parameter for the Beta distribution fitted for this bin}
   \item{Beta_b}{the second shape parameter for the Beta distribution fitted for this bin}
-}}
+}
+}
 \usage{
 data(LDprofile)
 }
diff --git a/man/LR.Rd b/man/LR.Rd
index fd9d114..3f48961 100644
--- a/man/LR.Rd
+++ b/man/LR.Rd
@@ -24,9 +24,9 @@ For more information about the \code{|L||R|} diversity statistic, please see Jac
 ## load the snps example dataset
 data(snps)
 ## run LR over all the SNPs with a window size of 3000 bp
-LR(snps$positions,3000)
+LR(snps$bp_positions,3000)
 ## only return results for SNPs between locations 600 and 1500 bp
-LR(snps$positions,3000,X=c(600,1500))
+LR(snps$bp_positions,3000,X=c(600,1500))
 
 }
 \references{
diff --git a/man/L_plus_R.Rd b/man/L_plus_R.Rd
index ae4df66..0043c3b 100644
--- a/man/L_plus_R.Rd
+++ b/man/L_plus_R.Rd
@@ -24,9 +24,9 @@ For more information about the \code{L_plus_R} diversity statistic, please see J
 ## load the snps example dataset
 data(snps)
 ## run L_plus_R over all the SNPs with a window size of 3000 bp
-L_plus_R(snps$positions,3000)
+L_plus_R(snps$bp_positions,3000)
 ## only return results for SNPs between locations 600 and 1500 bp
-L_plus_R(snps$positions,3000,X=c(600,1500))
+L_plus_R(snps$bp_positions,3000,X=c(600,1500))
 
 }
 \references{
diff --git a/man/Zalpha_BetaCDF.Rd b/man/Zalpha_BetaCDF.Rd
index b44dbb6..4547af6 100644
--- a/man/Zalpha_BetaCDF.Rd
+++ b/man/Zalpha_BetaCDF.Rd
@@ -62,10 +62,10 @@ bound of the bin.
 data(snps)
 data(LDprofile)
 ## run Zalpha_BetaCDF over all the SNPs with a window size of 3000 bp
-Zalpha_BetaCDF(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+Zalpha_BetaCDF(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
  LDprofile$bin,LDprofile$Beta_a,LDprofile$Beta_b)
 ## only return results for SNPs between locations 600 and 1500 bp
-Zalpha_BetaCDF(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+Zalpha_BetaCDF(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
  LDprofile$bin,LDprofile$Beta_a,LDprofile$Beta_b,X=c(600,1500))
 
 }
diff --git a/man/Zalpha_Zscore.Rd b/man/Zalpha_Zscore.Rd
index 23e46bd..ec27b08 100644
--- a/man/Zalpha_Zscore.Rd
+++ b/man/Zalpha_Zscore.Rd
@@ -61,10 +61,10 @@ bound of the bin.
 data(snps)
 data(LDprofile)
 ## run Zalpha_Zscore over all the SNPs with a window size of 3000 bp
-Zalpha_Zscore(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+Zalpha_Zscore(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
  LDprofile$bin,LDprofile$rsq,LDprofile$sd)
 ## only return results for SNPs between locations 600 and 1500 bp
-Zalpha_Zscore(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+Zalpha_Zscore(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
  LDprofile$bin,LDprofile$rsq,LDprofile$sd,X=c(600,1500))
 
 }
diff --git a/man/Zalpha_all.Rd b/man/Zalpha_all.Rd
index ffd2767..2a57189 100644
--- a/man/Zalpha_all.Rd
+++ b/man/Zalpha_all.Rd
@@ -67,13 +67,13 @@ data(snps)
 data(LDprofile)
 ## run Zalpha_all over all the SNPs with a window size of 3000 bp
 ## will return all 15 statistics
-Zalpha_all(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+Zalpha_all(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
  LDprofile$bin,LDprofile$rsq,LDprofile$sd,LDprofile$Beta_a,LDprofile$Beta_b)
 ## only return results for SNPs between locations 600 and 1500 bp
-Zalpha_all(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+Zalpha_all(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
  LDprofile$bin,LDprofile$rsq,LDprofile$sd,LDprofile$Beta_a,LDprofile$Beta_b,X=c(600,1500))
 ## will only return statistics not requiring an LD profile
-Zalpha_all(snps$positions,3000,as.matrix(snps[,3:12]))
+Zalpha_all(snps$bp_positions,3000,as.matrix(snps[,3:12]))
 
 }
 \references{
diff --git a/man/Zalpha_expected.Rd b/man/Zalpha_expected.Rd
index 0e4ba48..b2a8ca9 100644
--- a/man/Zalpha_expected.Rd
+++ b/man/Zalpha_expected.Rd
@@ -55,9 +55,9 @@ bound of the bin.
 data(snps)
 data(LDprofile)
 ## run Zalpha_expected over all the SNPs with a window size of 3000 bp
-Zalpha_expected(snps$positions,3000,snps$distances,LDprofile$bin,LDprofile$rsq)
+Zalpha_expected(snps$bp_positions,3000,snps$cM_distances,LDprofile$bin,LDprofile$rsq)
 ## only return results for SNPs between locations 600 and 1500 bp
-Zalpha_expected(snps$positions,3000,snps$distances,LDprofile$bin,LDprofile$rsq,X=c(600,1500))
+Zalpha_expected(snps$bp_positions,3000,snps$cM_distances,LDprofile$bin,LDprofile$rsq,X=c(600,1500))
 
 }
 \references{
diff --git a/man/Zalpha_log_rsq_over_expected.Rd b/man/Zalpha_log_rsq_over_expected.Rd
index 8b996b3..8ef0f96 100644
--- a/man/Zalpha_log_rsq_over_expected.Rd
+++ b/man/Zalpha_log_rsq_over_expected.Rd
@@ -58,10 +58,10 @@ bound of the bin.
 data(snps)
 data(LDprofile)
 ## run Zalpha_log_rsq_over_expected over all the SNPs with a window size of 3000 bp
-Zalpha_log_rsq_over_expected(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+Zalpha_log_rsq_over_expected(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
  LDprofile$bin,LDprofile$rsq)
 ## only return results for SNPs between locations 600 and 1500 bp
-Zalpha_log_rsq_over_expected(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+Zalpha_log_rsq_over_expected(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
  LDprofile$bin,LDprofile$rsq,X=c(600,1500))
 
 }
diff --git a/man/Zalpha_rsq_over_expected.Rd b/man/Zalpha_rsq_over_expected.Rd
index 4aac68a..97ecd31 100644
--- a/man/Zalpha_rsq_over_expected.Rd
+++ b/man/Zalpha_rsq_over_expected.Rd
@@ -58,10 +58,10 @@ bound of the bin.
 data(snps)
 data(LDprofile)
 ## run Zalpha_rsq_over_expected over all the SNPs with a window size of 3000 bp
-Zalpha_rsq_over_expected(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+Zalpha_rsq_over_expected(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
  LDprofile$bin,LDprofile$rsq)
 ## only return results for SNPs between locations 600 and 1500 bp
-Zalpha_rsq_over_expected(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+Zalpha_rsq_over_expected(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
  LDprofile$bin,LDprofile$rsq,X=c(600,1500))
 
 }
diff --git a/man/Zbeta.Rd b/man/Zbeta.Rd
index 124953c..4302fb9 100644
--- a/man/Zbeta.Rd
+++ b/man/Zbeta.Rd
@@ -33,9 +33,9 @@ where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of
 ## load the snps example dataset
 data(snps)
 ## run Zbeta over all the SNPs with a window size of 3000 bp
-Zbeta(snps$positions,3000,as.matrix(snps[,3:12]))
+Zbeta(snps$bp_positions,3000,as.matrix(snps[,3:12]))
 ## only return results for SNPs between locations 600 and 1500 bp
-Zbeta(snps$positions,3000,as.matrix(snps[,3:12]),X=c(600,1500))
+Zbeta(snps$bp_positions,3000,as.matrix(snps[,3:12]),X=c(600,1500))
 
 }
 \references{
diff --git a/man/Zbeta_BetaCDF.Rd b/man/Zbeta_BetaCDF.Rd
index 91445ad..c0fc55f 100644
--- a/man/Zbeta_BetaCDF.Rd
+++ b/man/Zbeta_BetaCDF.Rd
@@ -62,10 +62,10 @@ bound of the bin.
 data(snps)
 data(LDprofile)
 ## run Zbeta_BetaCDF over all the SNPs with a window size of 3000 bp
-Zbeta_BetaCDF(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+Zbeta_BetaCDF(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
  LDprofile$bin,LDprofile$Beta_a,LDprofile$Beta_b)
 ## only return results for SNPs between locations 600 and 1500 bp
-Zbeta_BetaCDF(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+Zbeta_BetaCDF(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
  LDprofile$bin,LDprofile$Beta_a,LDprofile$Beta_b,X=c(600,1500))
 
 }
diff --git a/man/Zbeta_Zscore.Rd b/man/Zbeta_Zscore.Rd
index aade252..91bc7a5 100644
--- a/man/Zbeta_Zscore.Rd
+++ b/man/Zbeta_Zscore.Rd
@@ -61,10 +61,10 @@ bound of the bin.
 data(snps)
 data(LDprofile)
 ## run Zbeta_Zscore over all the SNPs with a window size of 3000 bp
-Zbeta_Zscore(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+Zbeta_Zscore(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
  LDprofile$bin,LDprofile$rsq,LDprofile$sd)
 ## only return results for SNPs between locations 600 and 1500 bp
-Zbeta_Zscore(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+Zbeta_Zscore(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
  LDprofile$bin,LDprofile$rsq,LDprofile$sd,X=c(600,1500))
 
 }
diff --git a/man/Zbeta_expected.Rd b/man/Zbeta_expected.Rd
index eec160c..7cdfd59 100644
--- a/man/Zbeta_expected.Rd
+++ b/man/Zbeta_expected.Rd
@@ -55,9 +55,9 @@ bound of the bin.
 data(snps)
 data(LDprofile)
 ## run Zbeta_expected over all the SNPs with a window size of 3000 bp
-Zbeta_expected(snps$positions,3000,snps$distances,LDprofile$bin,LDprofile$rsq)
+Zbeta_expected(snps$bp_positions,3000,snps$cM_distances,LDprofile$bin,LDprofile$rsq)
 ## only return results for SNPs between locations 600 and 1500 bp
-Zbeta_expected(snps$positions,3000,snps$distances,LDprofile$bin,LDprofile$rsq,X=c(600,1500))
+Zbeta_expected(snps$bp_positions,3000,snps$cM_distances,LDprofile$bin,LDprofile$rsq,X=c(600,1500))
 
 }
 \references{
diff --git a/man/Zbeta_log_rsq_over_expected.Rd b/man/Zbeta_log_rsq_over_expected.Rd
index 1716f1f..6513c73 100644
--- a/man/Zbeta_log_rsq_over_expected.Rd
+++ b/man/Zbeta_log_rsq_over_expected.Rd
@@ -58,10 +58,10 @@ bound of the bin.
 data(snps)
 data(LDprofile)
 ## run Zbeta_log_rsq_over_expected over all the SNPs with a window size of 3000 bp
-Zbeta_log_rsq_over_expected(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+Zbeta_log_rsq_over_expected(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
  LDprofile$bin,LDprofile$rsq)
 ## only return results for SNPs between locations 600 and 1500 bp
-Zbeta_log_rsq_over_expected(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+Zbeta_log_rsq_over_expected(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
  LDprofile$bin,LDprofile$rsq,X=c(600,1500))
 
 }
diff --git a/man/Zbeta_rsq_over_expected.Rd b/man/Zbeta_rsq_over_expected.Rd
index 883c873..6fc3ef9 100644
--- a/man/Zbeta_rsq_over_expected.Rd
+++ b/man/Zbeta_rsq_over_expected.Rd
@@ -58,10 +58,10 @@ bound of the bin.
 data(snps)
 data(LDprofile)
 ## run Zbeta_rsq_over_expected over all the SNPs with a window size of 3000 bp
-Zbeta_rsq_over_expected(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+Zbeta_rsq_over_expected(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
  LDprofile$bin,LDprofile$rsq)
 ## only return results for SNPs between locations 600 and 1500 bp
-Zbeta_rsq_over_expected(snps$positions,3000,as.matrix(snps[,3:12]),snps$distances,
+Zbeta_rsq_over_expected(snps$bp_positions,3000,as.matrix(snps[,3:12]),snps$cM_distances,
  LDprofile$bin,LDprofile$rsq,X=c(600,1500))
 
 }
diff --git a/man/create_LDprofile.Rd b/man/create_LDprofile.Rd
index c94925e..1ae2bed 100644
--- a/man/create_LDprofile.Rd
+++ b/man/create_LDprofile.Rd
@@ -7,7 +7,7 @@
 create_LDprofile(dist, x, bin_size, max_dist = NULL, beta_params = FALSE)
 }
 \arguments{
-\item{dist}{A numeric vector, or a list of numeric vectors, containing genetic distances.}
+\item{dist}{A numeric vector, or a list of numeric vectors, containing the genetic distance for each SNP.}
 
 \item{x}{A matrix of SNP values, or a list of matrices. Columns represent chromosomes; rows are SNP locations. Hence, the number of rows should equal the length of the \code{dist} vector. SNPs should all be biallelic.}
 
@@ -25,20 +25,20 @@ An LD (linkage disequilibrium) profile is a look-up table containing the expecte
 }
 \details{
 The input for \code{dist} and \code{x} can be lists. This is to allow multiple datasets to be used in the creation of the LD profile. For example, using all 22 autosomes from the human genome would involve 22 different distance vectors and SNP matrices.
-Both lists should be the same length and should correspond exactly to eachother (i.e. the distances in each element of dist should go with the SNPs in the same element of x)
+Both lists should be the same length and should correspond exactly to each other (i.e. the distances in each element of \code{dist} should go with the SNPs in the same element of x)
 
 In the output, bins represent lower bounds. The first bin contains pairs where the genetic distance is greater than or equal to 0 and less than \code{bin_size}. The final bin contains pairs where the genetic distance is greater than or equal to \code{max_dist}-\code{bin_size} and less than \code{max_dist}.
-If the \code{max_dist} is not an increment of \code{bin_size}, it will be adjusted to the next highest increment.The maximum bin will be the bin that \code{max_dist} falls into. For example, if the \code{max_dist} is given as 4.5 and the \code{bin_size} is 1, the final bin will be 4.\cr
-By default, Beta parameters are not calculated. To calcualte Beta parameters, needed for the \code{\link{Zalpha_BetaCDF}} and \code{\link{Zbeta_BetaCDF}} statistics, \code{beta_params} should be set to TRUE and the package \code{fitdistrplus} must be installed.
+If the \code{max_dist} is not an increment of \code{bin_size}, it will be adjusted to the next highest increment. The maximum bin will be the bin that \code{max_dist} falls into. For example, if the \code{max_dist} is given as 4.5 and the \code{bin_size} is 1, the final bin will be 4.\cr
+By default, Beta parameters are not calculated. To calculate Beta parameters, needed for the \code{\link{Zalpha_BetaCDF}} and \code{\link{Zbeta_BetaCDF}} statistics, \code{beta_params} should be set to TRUE and the package \code{fitdistrplus} must be installed.
 }
 \examples{
 ## load the snps example dataset
 data(snps)
 ## Create an LD profile using this data
-create_LDprofile(snps$distances,as.matrix(snps[,3:12]),0.001)
+create_LDprofile(snps$cM_distances,as.matrix(snps[,3:12]),0.001)
 ## To get the Beta distribution parameter estimates, the fitdistrplus package is required
 if (requireNamespace("fitdistrplus", quietly = TRUE)==TRUE) {
-  create_LDprofile(snps$distances,as.matrix(snps[,3:12]),0.001,beta_params=TRUE)
+  create_LDprofile(snps$cM_distances,as.matrix(snps[,3:12]),0.001,beta_params=TRUE)
 }
 
 
diff --git a/man/snps.Rd b/man/snps.Rd
index 57bf379..dd04145 100644
--- a/man/snps.Rd
+++ b/man/snps.Rd
@@ -4,10 +4,11 @@
 \name{snps}
 \alias{snps}
 \title{Dataset containing details on simulated SNPs}
-\format{A data frame with 20 rows and 12 variables:
+\format{
+A data frame with 20 rows and 12 variables:
 \describe{
-  \item{positions}{location of the SNP on the chromosome}
-  \item{distances}{genetic distance of the SNP from the start of the chromosome}
+  \item{bp_positions}{location of the SNP on the chromosome e.g. in base pairs}
+  \item{cM_distances}{genetic distance of the SNP from the start of the chromosome e.g. in centimorgans}
   \item{chrom_1}{allele of the SNP on the first example chromosome}
   \item{chrom_2}{allele of the SNP on the second example chromosome}
   \item{chrom_3}{allele of the SNP on the third example chromosome}
@@ -18,7 +19,8 @@
   \item{chrom_8}{allele of the SNP on the eighth example chromosome}
   \item{chrom_9}{allele of the SNP on the ninth example chromosome}
   \item{chrom_10}{allele of the SNP on the tenth example chromosome}
-}}
+}
+}
 \usage{
 snps
 }
diff --git a/man/zalpha.Rd b/man/zalpha.Rd
index 392f58e..efeb817 100644
--- a/man/zalpha.Rd
+++ b/man/zalpha.Rd
@@ -33,9 +33,9 @@ where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of
 ## load the snps example dataset
 data(snps)
 ## run Zalpha over all the SNPs with a window size of 3000 bp
-Zalpha(snps$positions,3000,as.matrix(snps[,3:12]))
+Zalpha(snps$bp_positions,3000,as.matrix(snps[,3:12]))
 ## only return results for SNPs between locations 600 and 1500 bp
-Zalpha(snps$positions,3000,as.matrix(snps[,3:12]),X=c(600,1500))
+Zalpha(snps$bp_positions,3000,as.matrix(snps[,3:12]),X=c(600,1500))
 
 }
 \references{
-- 
GitLab