Skip to content
Prev 285111 / 398502 Next

Assigning a function to the 'times' argument of rep()

On Sun, Feb 12, 2012 at 07:56:48PM -0800, z2.0 wrote:
Hi.

Working solutions were suggested by others. The answer
to your question is that "times" argument should either
be a single number or a vector of the same length as the
first argument. However,

  "0" has length 1

  5 - nchar(as.character(perry_frame$zip))
  [1] 0 0 0 1 2 0 0

Hope this helps.

Petr Savicky.