Rewriting the documentation for repeat would be great. I’m the guilty party for that piece of documentation and agree that it’s not very good. Rewriting it from scratch is probably a good idea.
I’m not sure I think `tile` is much better than `outer`. Maybe we should use something like `perelement` and `perslice` as the keywords? If we revise the keywords, we should also find terms to describe one additional piece of functionality I’d like to add to repeat: the ability to repeat specific elements a distinct number of times. That’s the main thing that repeat is missing that you’d get from R’s rep function. If you’re looking for good examples for the documentation, there are a bunch of tests for `repeat` you could use as inspiration: https://github.com/JuliaLang/julia/blob/b320b66db8fb97cc3b96fe4089b7b15528ab346c/test/arrayops.jl#L302 — John On Jun 12, 2014, at 6:17 AM, Patrick O'Leary <[email protected]> wrote: > On Thursday, June 12, 2014 7:57:03 AM UTC-5, Bruno Rodrigues wrote: > repeat() is much more useful that Matlab's repmat(), but the docstring is > unclear, at least for me. Unfortunately, I don't have, right now, any > proposals to correct it. Could maybe an example be added to the docstring? > Maybe it could be clearer this way. > > I think an example would help make this immediately obvious. I also wonder if > the keyword arguments could be better--I don't have a good alternative for > "inner", but "tile" seems like a good alternative to "outer". That may at > least be useful in a rework of the doc. > > Note that you don't have to supply both keyword arguments, only one, so if > you're not using the feature of "inner" you can simply omit it.
