Revision: 505 http://rpy.svn.sourceforge.net/rpy/?rev=505&view=rev Author: lgautier Date: 2008-04-28 03:09:16 -0700 (Mon, 28 Apr 2008)
Log Message: ----------- - Moved style for R code and output to CSS - Edited layout of R code (to have shorter lines) Modified Paths: -------------- trunk/htdocs/rpy_demo.data trunk/htdocs/style.css Modified: trunk/htdocs/rpy_demo.data =================================================================== --- trunk/htdocs/rpy_demo.data 2008-04-28 09:56:55 UTC (rev 504) +++ trunk/htdocs/rpy_demo.data 2008-04-28 10:09:16 UTC (rev 505) @@ -17,9 +17,9 @@ <p>The following Python code (<a href="faithful.py">faithful.py</a>): <table> -<tr bgcolor="yellow"> +<tr> <td> -<pre> +<pre class="rcode"> from rpy import * faithful_data = {"eruption_duration":[], @@ -54,7 +54,8 @@ r.png('faithful_ecdf.png',width=733,height=550) r.library('stepfun') r.plot(r.ecdf(long_ed), do_points=0, verticals=1, col="blue", - main="Empirical cumulative distribution function of Old Faithful eruptions longer than 3 seconds") + main=paste("Empirical cumulative distribution function", + " of Old Faithful eruptions longer than 3 seconds") x = r.seq(3,5.4,0.01) r.lines(r.seq(3,5.4,0.01),r.pnorm(r.seq(3,5.4,0.01),mean=r.mean(long_ed), sd=r.sqrt(r.var(long_ed))), lty=3, lwd=2, col="red") @@ -68,14 +69,17 @@ r.library('ctest') print -print "Shapiro-Wilks normality test of Old Faithful eruptions longer than 3 seconds" +print("Shapiro-Wilks normality test of Old Faithful eruptions" +\ + " longer than 3 seconds") sw = r.shapiro_test(long_ed) print "W = %.4f" % sw['statistic']['W'] print "p-value = %.5f" % sw['p.value'] print -print "One-sample Kolmogorov-Smirnov test of Old Faithful eruptions longer than 3 seconds" -ks = r.ks_test(long_ed,"pnorm", mean=r.mean(long_ed), sd=r.sqrt(r.var(long_ed))) +print("One-sample Kolmogorov-Smirnov test of Old Faithful eruptions" +\ + " longer than 3 seconds" +ks = r.ks_test(long_ed,"pnorm", mean=r.mean(long_ed), + sd=r.sqrt(r.var(long_ed))) print "D = %.4f" % ks['statistic']['D'] print "p-value = %.4f" % ks['p.value'] print "Alternative hypothesis: %s" % ks['alternative'] @@ -88,10 +92,10 @@ <p>produces the following output: <table> -<tr bgcolor="yellow"> +<tr> <td> -<pre> +<pre class="rcode"> Summary of Old Faithful eruption duration data Mean: 3.488 Median: 4.000 Modified: trunk/htdocs/style.css =================================================================== --- trunk/htdocs/style.css 2008-04-28 09:56:55 UTC (rev 504) +++ trunk/htdocs/style.css 2008-04-28 10:09:16 UTC (rev 505) @@ -125,3 +125,10 @@ text-align: center; font-size: small; } + +pre.rcode +{ + background-color: #ededf0; + padding: 1em; + border: solid 1px #909090; +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list