A simple function to repeat an expression several times as an aid to simplifying simulations.
pmgRepeatTrials(expr, n = 10)
An R expression, such as
Number of times to repeat the expressions. The default is 10.
This functions aids in doing simulations. Rather than explicitly write
for loop or use
sapply this function will call
sapply on the expression.
A GUI for this appears in pmg under the Simluation tab. The "quick action" will call the function on the results of the simulation.
The output of a
sapply call can be a vector, matrix, ... If it
is a vector, it is transposed/
This function and GUI was suggested by Daniel Kaplan at useR!2007
1 2 3 4 5 6 7 8 9 10 11