#id is a variable in x,x is matrix or data.frame
xm<- apply(x,2,function(y,z) tapply(y,z, mean), z=id)
xdm<- x <- x-theta*xm[id,]
Any scripts or data that you put into this service are public.
Add the following code to your website.
Copy to clipboard
For more information on customizing the embed code, read Embedding Snippets.