Usuari:Lixiaoxu

De wikiTraba
Salta a la navegació Salta a la cerca

szpku.lixiaoxu@gmail.com

  1. Regression


<Rform name="owndata"> Enter your own data for a scatterplot:
<textarea name="mydata" rows="8"> 1.262954285 3.8739569 -0.326233361 1.0400041 1.329799263 2.0161824 1.272429321 2.8284819 0.414641434 2.1324980 -1.539950042 0.4565291 -0.928567035 1.6093698 -0.294720447 0.9723025 -0.005767173 2.5310696 2.404653389 2.7861843 </textarea> <input type="submit" value=" Submit "> </Rform>

<R output="display" name="owndata" iframe="height:500px;"> if (exists("mydata")) {

 main <- "Data from user"
 x <- readdataSK(mydata, format="txt") 

} else {

 main <- "Default data"
 set.seed(0);
 x<-matrix(rnorm(20),10,2);
 x[,2]=2.1+x[,1]*.8+x[,2];

}

pdf(rpdf, width=6, height=6) plot(x, cex=2, main=main) abline(lm(x[,2]~x[,1]))

</R>