Skip to content
Snippets Groups Projects
Commit 93699242 authored by Laura A DeCicco's avatar Laura A DeCicco
Browse files

Changed name for clarity.

parent 8032d14c
No related branches found
No related tags found
1 merge request!39Overhaul of function names. Move some functionality to EGRET.
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
#' @export #' @export
#' @examples #' @examples
#' pCode <- '10' #' pCode <- '10'
#' correctPCode <- padVariable(pCode,5) #' correctPCode <- zeroPad(pCode,5)
#' pCodes <- c('100','1000','0','12345','1565465465465465') #' pCodes <- c('100','1000','0','12345','1565465465465465')
#' correctPCodes <- padVariable(pCodes,5) #' correctPCodes <- zeroPad(pCodes,5)
padVariable <- function(x,padTo){ zeroPad <- function(x,padTo){
if(padTo <= 1) return(x) if(padTo <= 1) return(x)
numDigits <- nchar(x) numDigits <- nchar(x)
padding <- padTo-numDigits padding <- padTo-numDigits
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment