-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8dea44c
commit 2666494
Showing
6 changed files
with
123 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#' @title | ||
#' Progress Bar for REDCap. | ||
#' | ||
#' @description | ||
#' Function that identifies the values for a progress bar in REDCap. | ||
#' | ||
#' @details | ||
#' A progress bar in REDCap can be created using the following code: | ||
#' \preformatted{ | ||
#' Progress: | ||
#' <div style="width:100\%;border:0;margin:0;padding:0;background-color: | ||
#' #A9BAD1;text-align:center;"><div style="width:2\%;border: 0;margin:0; | ||
#' padding:0;background-color:#8491A2"><span style="color:#8491A2">. | ||
#' </span></div></div> | ||
#' } | ||
#' where \code{width:2\%} specifies the progress (out of 100\%). | ||
#' | ||
#' @param numSurveys the number of surveys to establish progress. | ||
#' @param beginning the first value to use in the sequence. | ||
#' @param end the last value to use in the sequence. | ||
#' | ||
#' @return sequence of numbers for the progress bar in REDCap. | ||
#' | ||
#' @importFrom stats pchisq | ||
#' | ||
#' @export | ||
#' | ||
#' @examples | ||
#' redcapProgressBar(numSurveys = 6) | ||
#' redcapProgressBar(6) | ||
#' redcapProgressBar(4) | ||
#' redcapProgressBar(numSurveys = 7, beginning = 1, end = 99) | ||
|
||
redcapProgressBar <- function(numSurveys, beginning = 2, end = 99){ | ||
progressSequence <- seq( | ||
from = beginning, | ||
to = end, | ||
length.out = numSurveys) | ||
|
||
return(progressSequence) | ||
} | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.