Usuari:Lixiaoxu: diferència entre les revisions

De wikiTraba
Salta a la navegació Salta a la cerca
Cap resum de modificació
Cap resum de modificació
Línia 7: Línia 7:
<Rform name="owndata">
<Rform name="owndata">
Enter your own data for a scatterplot:<br>  
Enter your own data for a scatterplot:<br>  
You can use <a href="https://spreadsheets.google.com/ccc?key=0Aic4pmEZm32xclhJZm9hNWFyZlZOV1RSV19xWXRlbmc&hl=en">the free online spreadsheet </a> of Google Docs to edit your data before pasting<br>. Just click the link, need NO login.
<textarea name="mydata" rows="8">
<textarea name="mydata" rows="8">
1.262954285  3.8739569
1.262954285  3.8739569

Revisió del 09:31, 6 jul 2009

szpku.lixiaoxu@gmail.com


  1. Regression

<Rform name="owndata"> Enter your own data for a scatterplot:
You can use <a href="https://spreadsheets.google.com/ccc?key=0Aic4pmEZm32xclhJZm9hNWFyZlZOV1RSV19xWXRlbmc&hl=en">the free online spreadsheet </a> of Google Docs to edit your data before pasting
. Just click the link, need NO login. <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>