Skip to content

Commit 5a68a5a

Browse files
committed
Document utils as internal
1 parent 57d1899 commit 5a68a5a

11 files changed

+16
-0
lines changed

R/input-time.R

+1
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ shinyTimeExample <- function() {
192192
#' App to test the input with a variety of options
193193
#'
194194
#' @importFrom shiny runApp
195+
#' @keywords internal
195196
shinyTimeDebug <- function() {
196197
runApp(system.file('debug', package='shinyTime', mustWork=T), display.mode='normal')
197198
}

R/utils.R

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#' @param inputId The `input` slot
66
#' @param label The label text
77
#' @return A label tag
8+
#' @keywords internal
89
shinyInputLabel <- function (inputId, label = NULL)
910
{
1011
tags$label(label, class = "control-label", class = if (is.null(label))
@@ -38,19 +39,22 @@ dateToTimeList <- function(value){
3839
#' Convert a list to a time object
3940
#' @param value A list with the hour, minute and second components
4041
#' @return A time object
42+
#' @keywords internal
4143
timeListToDate <- function(value) {
4244
timeStringToDate(paste(c(value$hour, value$min, value$sec), collapse = ':'))
4345
}
4446

4547
#' Convert a string to a time object
4648
#' @param string A string with the time in the format "HH:MM:SS"
4749
#' @return A time object
50+
#' @keywords internal
4851
timeStringToDate <- function(string) {
4952
strptime(string, format = "%T")
5053
}
5154

5255
#' Get the default time
5356
#' @return A time object with the value "00:00:00"
57+
#' @keywords internal
5458
getDefaultTime <- function(){
5559
timeStringToDate("00:00:00")
5660
}
@@ -60,6 +64,7 @@ getDefaultTime <- function(){
6064
#' @param x A time object
6165
#' @param tol The tolerance for rounding
6266
#' @return A time object rounded to the nearest minute
67+
#' @keywords internal
6368
is.wholenumber <- function(x, tol = .Machine$double.eps^0.5){
6469
abs(x - round(x)) < tol
6570
}
@@ -68,6 +73,7 @@ is.wholenumber <- function(x, tol = .Machine$double.eps^0.5){
6873
#' @param time A time object
6974
#' @param minutes The number of minutes to round to
7075
#' @return A time object rounded to the nearest minute
76+
#' @keywords internal
7177
roundTime <- function(time, minutes) {
7278
stopifnot(any(class(time) %in% c("POSIXt", "hms")))
7379
stopifnot(is.wholenumber(minutes))

man/dateToTimeList.Rd

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/dropNulls.Rd

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/getDefaultTime.Rd

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/is.wholenumber.Rd

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/roundTime.Rd

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/shinyInputLabel.Rd

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/shinyTimeDebug.Rd

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/timeListToDate.Rd

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/timeStringToDate.Rd

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)