loop | R Documentation |
for-loop prototyping
loop(expr, ..., type = "along")
expr |
an expression of the body of a loop. |
... |
dynamic dots that include objects for the body of the loop. |
type |
the type of loop to construct. along for a sequence alona vector, row for a sequence along the rows of an object. |
x = as.list(1:5) loop({ y[[i]] <- x[[i]] + 1}, x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.