[R] alternative way to replicate()
Johannes Hüsing
johannes at huesing.name
Wed Dec 3 11:36:00 CET 2008
Am 03.12.2008 um 09:06 schrieb Liviu Andronic:
> Dear all,
>
> I'm looking for an alternative way to replicate the "2," string for an
> x number of times, and end up with one string containing "2," x times.
> I can partly achieve this using replicate().
>> y <- rep("2,", times=3)
>> y
>>
JFTR: replicate() is a different function from rep(). See ?rep and
?replicate.
More information about the R-help
mailing list