Displaying 1 result from an estimated 1 matches for "3ksfi8nd".
2010 Jun 21
5
Replacing elements of a list over a certain threshold
..., 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)
threshold=5
<magic code goes here>
example=(1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1).
I have written a crude script that achieves this but it's very slow. Is
there a way to do this using some R function?
Crude script: http://pastebin.com/3KSfi8nD