eq<-function(x){x*x}
tmp<-data.frame(x=data[,4],y=eq(data[,5]))
p<-qplot(x,y,data=tmp)
c<-stat_function(fun=eq)
print(p+c)
or
or
qplot(x, y, data=as.data.frame(curve(eq)), geom="line")
No comments:
Post a Comment