Skip to content
Prev 278364 / 398506 Next

Frequency table

Hi,

I think you can try the function rep().

Example:
# this means rep 1 once, 2 twice and 3 three times
[1] 1 2 2 3 3 3

# this means rep "A", "B", "C", until it reaches length of 10
[1] "A" "B" "C" "A" "B" "C" "A" "B" "C" "A"

you can try more example by type:
?rep

hope this helps~

--
View this message in context: http://r.789695.n4.nabble.com/Frequency-table-tp4101612p4102614.html
Sent from the R help mailing list archive at Nabble.com.