Skip to content

Commit

Permalink
R CMD CHECK
Browse files Browse the repository at this point in the history
  • Loading branch information
graemeblair committed May 25, 2017
1 parent d6e0756 commit 72644ae
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 7 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ importFrom(dplyr,left_join)
importFrom(dplyr,summarize)
importFrom(dplyr,summarize_)
importFrom(estimatr,difference_in_means)
importFrom(fabricatr,describe_variable)
importFrom(fabricatr,fabricate_data)
importFrom(lazyeval,as.lazy)
importFrom(lazyeval,call_modify)
Expand Down
6 changes: 3 additions & 3 deletions R/declare_design.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#'
#' @importFrom lazyeval lazy_dots lazy_eval
#' @importFrom dplyr bind_rows
#' @importFrom fabricatr describe_variable
#' @export
#'
#' @examples
Expand Down Expand Up @@ -262,9 +263,8 @@ print.design <- function(x, ...) {

#' Text Summary of a Design
#'
#' @param object
#'
#' @param ...
#' @param object a design object created by \code{\link{declare_design}}
#' @param ... optional arguments to be sent to summary function
#'
#' @examples
#'
Expand Down
2 changes: 1 addition & 1 deletion R/declare_sampling.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' @export
#' @details
#'
#' While declare_sampling can work with any sampling_function that takes data and returns data, most random sampling procedures can be easily implemented with randomizr. The arguments to \code{\link{draw_rs}} can include N, strata_var, clust_var, n, prob, strata_n, and strata_prob. The arguments you need to specify are different for different designs. Check the help files for \code{\link{complete_rs}}, \code{\link{strata_rs}}, \code{\link{cluster_rs}}, or \code{\link{strata_and_cluster_ra}} for details on how to execute many common designs.
#' While declare_sampling can work with any sampling_function that takes data and returns data, most random sampling procedures can be easily implemented with randomizr. The arguments to \code{\link{draw_rs}} can include N, strata_var, clust_var, n, prob, strata_n, and strata_prob. The arguments you need to specify are different for different designs. Check the help files for \code{\link{complete_rs}}, \code{\link{strata_rs}}, \code{\link{cluster_rs}}, or \code{\link{strata_and_cluster_rs}} for details on how to execute many common designs.
#' @examples
#'
#' my_population <- declare_population(N = 100, female = rbinom(N, 1, .5))
Expand Down
12 changes: 12 additions & 0 deletions R/diagnose_design.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,23 @@ diagnose_design <- function(..., diagnosands = default_diagnosands, sims = 500)

}

#' Get the diagnosands data frame from a diagnosis
#'
#' @param diagnosis A diagnosis object created by \code{\link{diagnose_design}}.
#'
#' @return a \code{data.frame} of the diagnosand values from a diagnosis
#'
#' @export
get_diagnosands <- function(diagnosis){
diagnosis$diagnosands
}

#' Get the simulations data frame from a diagnosis
#'
#' @param diagnosis A diagnosis object created by \code{\link{diagnose_design}}.
#'
#' @return a \code{data.frame} of the simulations from a diagnosis
#'
#' @export
get_simulations <- function(diagnosis){
diagnosis$simulations
Expand Down
2 changes: 1 addition & 1 deletion man/declare_sampling.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions man/get_diagnosands.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions man/get_simulations.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/summary.design.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 72644ae

Please sign in to comment.