R/graphic_functions.R

Defines functions relsize

Documented in relsize

#' Calculates relative width and height for comparison from data.
#' 
#' @param comp Value of variable from comparison group.
#' @param ref Value of reference group, generally larger.
#' @param h Height of the reference square.
#' @param w Width of the reference square.
#' @keywords growth rate, annualized


relsize<- function(comp,ref,h,w){
  r=comp/ref
  h1=h*r
  w1=w*r
  x=c(h1,w1,r)
  return(x)
}
robkemp/robR documentation built on May 27, 2019, 11:57 a.m.