is there a way to extend LETTERS past 26 characters e.g., AA, AB, AC…?

前端 未结 9 1725
情书的邮戳
情书的邮戳 2020-12-03 00:52

I use LETTERS most of the time for my factors but today I tried to go beyond 26 characters:

LETTERS[1:32]

Expecting there to be an automati

9条回答
  •  臣服心动
    2020-12-03 01:36

    Yet another option:

    l2 = c(LETTERS, sort(do.call("paste0", expand.grid(LETTERS, LETTERS[1:3]))))
    

    Adjust the two instances of LETTERS inside expand.grid to get the number of letter pairs you'd like.

提交回复
热议问题