Hi,
I am really confused how ddply work, so maybe you can help me.
I created a function that sorts a vector etc.
fn - function(x){
x1 - sort(x)
x2 - seq(length(x))
x3 - x2/max(x2)
df - data.frame(x1,x2,x3)
df
}
Probably this is not the best form of the
Hi Johannes ,
Try this:
var1 - rep(c(a,b),c(100,100))
var2 - runif(200,1,50)
df.test - data.frame(var1,var2)
fn - function(x){
x - x$var2
x1 - sort(x)
x2 - seq(length(x))
x3 - x2/max(x2)
df - data.frame(x1,x2,x3)
df
}
require(plyr)
2 matches
Mail list logo