PageRenderTime 15ms CodeModel.GetById 10ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/pkg/R/tableplot_checkFromTo.R

https://code.google.com/
R | 15 lines | 9 code | 0 blank | 6 comment | 7 complexity | b94a8a6226e607414def3d54114dd612 MD5 | raw file
 1#' Function to check the tableplot arguments: from and to.
 2#'
 3#' @aliases tableplot_checkFromTo
 4#' @param from from
 5#' @param to to
 6#' @export
 7tableplot_checkFromTo <- function(from, to)
 8{
 9	if (class(from)[1]!="numeric") stop("<from> is not numeric")
10	if (class(to)[1]!="numeric") stop("<to> is not numeric")
11	if (from < 0 && from > 100) stop("<from> is not a number in [0, 100]")
12	if (to < 0 && to > 100) stop("<to> is not a number in [0, 100]")
13	if (from >= to) stop("<from> is not smaller than <to>")
14	return()
15}