Nothing
benchmark02 <- function(N)
{
Subject <- 1:N
Block <- 1:2
Run <- 1:3
Trial <- 1:5
positions <- cartesian_product(c('Subject', 'Block', 'Run', 'Trial'))
M <- nrow(positions)
positions <- transform(positions, x = sample(1:20, M, replace = TRUE))
positions <- transform(positions, y = sample(1:20, M, replace = TRUE))
centroid <- function(x, y)
{
c(mean(x), mean(y))
}
iddply(positions,
equality.variables = c('Subject', 'Block', 'Run'),
upper.bound.variables = c('Trial'),
func = function (df)
{
z <- with(df, centroid(x, y))
data.frame(cx = z[1], cy = z[2])
})
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.