Statistical Analysis: an Introduction using R/R/Plotting

From Wikibooks, open books for an open world
Jump to: navigation, search

Plotting[edit]

One advantage of using objects is that R knows how to deal with them. For instance, plotting
Crystal Clear app terminal.png Input:

Invalid language.

You need to specify a language like this: <source lang="html4strict">...</source>

Supported languages for syntax highlighting:

6502acme, 68000devpac, abap, actionscript, actionscript3, ada, algol68, apache, applescript, arm, asm, asp, autohotkey, autoit, avisynth, awk, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, cadlisp, cfm, cil, clojure, cmake, cobol, coffeescript, cpp, csharp, css, d, delphi, diff, dos, dot, e, ecmascript, eiffel, email, erlang, euphoria, fortran, freebasic, fsharp, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, html4strict, html5, ini, io, j, java, java5, javascript, jquery, latex, ldif, lisp, llvm, locobasic, lolcode, lua, make, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, oberon2, objc, ocaml, octave, oobas, oorexx, oracle11, oracle8, oz, parigp, pascal, pcre, perl, perl6, php, pic16, pli, plsql, povray, powershell, progress, prolog, properties, purebasic, pycon, python, q, qbasic, reg, rexx, robots, rsplus, ruby, sas, scala, scheme, scilab, smalltalk, sparql, sql, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, urbi, vala, vb, vbnet, verilog, vhdl, visualfoxpro, visualprolog, whois, winbatch, xml, xpp, yaml, zxbasic


plot(table(replicate(1000, max(table(sample(1:6, 5, TRUE))))))
Crystal Clear app kscreensaver.png Result:
Graph here
This is only a very brief introduction to the graphical capabilities of R