#' Generate Unique Identifier
#'
#' @param codeSize length of UID, default = 11
#' @details used for DATIM, author - Jason Pickering
#' @export
generateUID <- function(codeSize=11){
#Generate a random seed
runif(1)
allowedLetters<-c(LETTERS,letters)
allowedChars<-c(LETTERS,letters,0:9)
#First character must be a letter according to the DHIS2 spec
firstChar<-sample(allowedLetters,1)
otherChars<-sample(allowedChars,codeSize-1)
uid<-paste(c(firstChar,paste(otherChars,sep="",collapse="")),sep="",collapse="")
return(uid)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.