From f786389397b509348dd4abce92e063b890e0c14e Mon Sep 17 00:00:00 2001 From: Clare <chorscroft@users.noreply.github.com> Date: Thu, 28 May 2020 01:47:00 +0100 Subject: [PATCH] Added an example to the documentation --- R/create_LDprofile.R | 5 +++++ man/create_LDprofile.Rd | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/R/create_LDprofile.R b/R/create_LDprofile.R index 31e5a76..7fbc4f3 100644 --- a/R/create_LDprofile.R +++ b/R/create_LDprofile.R @@ -20,6 +20,11 @@ #' data(snps) #' ## Create an LD profile using this data #' create_LDprofile(snps$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) +#' } +#' #' #' @export #' @seealso \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_expected}} \code{\link{Zbeta_rsq_over_expected}} \code{\link{Zbeta_log_rsq_over_expected}} \code{\link{Zbeta_Zscore}} \code{\link{Zbeta_BetaCDF}} \code{\link{Zalpha_all}} diff --git a/man/create_LDprofile.Rd b/man/create_LDprofile.Rd index 95c51f2..30a62b8 100644 --- a/man/create_LDprofile.Rd +++ b/man/create_LDprofile.Rd @@ -33,6 +33,11 @@ By default, Beta parameters are not calculated. To calcualte Beta parameters, ne data(snps) ## Create an LD profile using this data create_LDprofile(snps$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) +} + } \references{ -- GitLab