Edited at

ランダムな文字列を発生させる

More than 3 years have passed since last update.


ランダムな文字列を発生させる

RanString <- function(strlength){

seed <- c("A","B","C","D","E","F","G","H","I","J",
"K","L","M","N","O","P","Q","R","S","T",
"U","V","W","X","Y","Z")
paste(seed[round(runif(strlength, 1, length(seed)))], collapse="")
}

RanString(1)
RanString(2)
RanString(10)