#' Get growth rate from cell numbers and time
#'
#' @param cell_no,timepoints
#' @keywords Cells
#' @export
#' @examples
#' calculate_cell_growth()
calculate_cell_growth <- function(cell_no,timepoints){
# This function is to calculate growth rate from cell numbers and hours
if(length(cell_no) != length(timepoints)){
print('No of cells and timepoints dont match, try again stupid...')
slope <- c()
} else {
GROWTH <- timepoints # This is for the beauty of the output solely....
log_vals <- log(cell_no)
slope <- coef(lm(log_vals ~ GROWTH))[2]
}
return(slope)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.