Korisnik:Oknedar/Prevod

S Vikipedije, slobodne enciklopedije
R
Model2.9.2
Pojavio se1993 [1]
Autor(i)R Development Core Team
Dizajner(i)Ross Ihaka and Robert Gentleman
Aktuelna verzijaThrough SVN
Datum aktuelne verzije24. avgust 2009. god.; pre 14 godina (2009-08-24)
UticajiS
Operativni sistemiCross-platform
LicencaGNU General Public License
Veb-sajthttp://www.r-project.org/

U računarstvu, R je programski jezik i programsko okruženje za statističke izračune i grafike. On je izvedba S programskog jezika sa leksičkom semantikom inspirisanom Scheme (programski jezik)om. R su stvorili Ros Ihaka i Robert Džentlmen[2] na Aukland univerzitetu (University of Auckland), Novi Zeland, a sad ga razvija R Development Core Team. Nazvan je djelimično prema imenima autora, a djelom kao igra riječi na ime S.[3]

R jezik je postao standard među statističarima koji razvijaju statistički softver,[4][5] i široko je korišćen za razvoj statističkog softvera i analizu podataka.[5]

R je dio GNU projekta.[6] Njegov izvorni kod je slobodan i pod uslovima koje daje GNU-ova opšta javna licenca, a prekompilirane binarne verzije su obezbjeđene za različite operativne sisteme. R koristi interfejs komandne linije, kroz više grafičkih korisničkih okruženja.

Osobine[uredi | uredi izvor]

R obezbjeđuje širok izbor statističkih (linearnih i nelinearnih modela, klasičnih statističkih testova, analiza vremenskih serija, klasifikacija, klasteri, i ostalo) i grafičkih tehnika. R, je slično kao S, projektovan kao pravi programski jezik, i omogućava korisnicima dodatnu funkcionalnost definisanjem novih funkcija. Postoji više važnih razlika, ali dosta koda može biti iskorišten kao S, nepromjenjen. Mnogo R-ovog sistema je takođe pisana u ovom jeziku, što ga čini lakšim za korisnike pri formiranju algoritama. Kod zahtjevnih zadataka, C, C++ i Fortran kod može biti povezan i pokrenut. Napredni korisnici mogu pisati C kod za manipulisanje R-ovih objekata direktno.

R može biti proširen, kroz pkete obezbjeđene od korisnika, za specifične funkcije ili specifične oblasti proučavanja. Zbog svog S nasleđa, R ima bolju podršku za Objektno-orjentisano programiranje nego ostali statistički programski jezici. Proširivost R-a je olakšana i njegovim popustljivim jezičkim opsegom.[7]

Sljedeća prednost R-a su njegove grafičke mogućnosti, koje obezbjeđuju grafike kvaliteta dovoljno dobrog za publikovanje koji uključuju matematičke simbole. R ima sopstveni LaTeX-oliki format dokumenata, koji se koristi za predstavljanje sveobuhvatne dokumentacije, preko interneta u brojnim formatima ili kao štampana kopija.

Iako je R pretežno korišten od statističara i praktičara koji zahtjevaju okruženje za statističke proračune i razvoj softvera, takođe može biti korišten kao opšti alat za izračunavanje matrica učinka uporedivog sa onim od GNU Oktav i njegovog vlasničkog konkurenta, MATLAB.[8] RWeka[9] sučelje je dodato popularnom softveru za izlučivanje podataka Weka koje dozvoljava mogućnost upisa i čitanja u arff formatu koji dalje omogućava korištenje mogućnosti programa.

Primjeri[uredi | uredi izvor]

Sljedeći primjeri ilustruju osnove sintakse jezika i korištenje komandne linije.

Diagnostic graphs produced by plot.lm() function. Features include mathematical notation in axis labels, as at lower left.
> x <- c(1,2,3,4,5,6)   # Create ordered collection
> y <- x^2              # Square the elements of x
> mean(y)               # Calculate arithmetic mean of y
[1] 15.16667
> var(y)                # Calculate sample variance
[1] 178.9667
> summary(lm(y ~ x))    # Fit a linear regression model

Call:
lm(formula = y ~ x)

Residuals:
1       2       3       4       5       6
3.3333 -0.6667 -2.6667 -2.6667 -0.6667  3.3333

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept)  -9.3333     2.8441  -3.282 0.030453 *
x             7.0000     0.7303   9.585 0.000662 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 3.055 on 4 degrees of freedom
Multiple R-squared: 0.9583,	Adjusted R-squared: 0.9478
F-statistic: 91.88 on 1 and 4 DF,  p-value: 0.000662

> par(mfrow=c(2, 2))    # Request 2x2 plot layout
> plot(lm(y ~ x))       # Diagnostic plot of regression model

Paketi[uredi | uredi izvor]

The capabilities of R are extended through user-submitted packages, which allow specialized statistical techniques, graphical devices, as well as programming interfaces and import/export capabilities to many external data formats. These packages are developed in R, LaTeX, Java, and often C and Fortran. A core set of packages are included with the installation of R, with a total of 1862 (as of June 2009) available at the Comprehensive R Archive Network (CRAN). Notable packages by subject area are listed along with comments on the official R Task View pages.

Razvoj[uredi | uredi izvor]

The bioconductor project, which started in the fall of 2001, provides R packages for the analysis of genomic data, such as Affymetrix and cDNA microarray object-oriented data handling and analysis tools.

The Gnumeric developers have cooperated with the R project to improve the accuracy of Gnumeric.[10]

Milestones[uredi | uredi izvor]

The full list of changes is maintained in the NEWS file. Some highlights are listed below.

  • Version 0.16 – This is the last alpha version developed primarily by Ihaka and Gentleman. Much of the basic functionality from the "White Book" (see S history) was implemented. The mailing lists commenced on April 1, 1997.
  • Version 0.49 – April 23, 1997 – This is the oldest available source release, and compiles on a limited number of Unix-like platforms. CRAN is started on this date, with 3 mirrors that initially hosted 12 packages. Alpha versions of R for Microsoft Windows and Mac OS are made available shortly after this version.
  • Version 1.0.0 – February 29, 2000 – Considered by its developers stable enough for production use [11].
  • Version 1.4.0 – S4 methods are introduced and the first version for Mac OS X is made available soon after.
  • Version 2.0.0 – Introduced lazy loading, which enables fast loading of data with minimal expense of system memory.
  • Version 2.9.0 – Package 'Matrix' is now a recommended package contained in the basic R distribution.

Productivity tools[uredi | uredi izvor]

There are various interfaces to R.

Grafičko sučelje[uredi | uredi izvor]

  • Java Gui for R - cross-platform stand-alone R terminal and editor based on Java (also known as JGR)
  • R Commander - cross-platform menu-driven GUI based on tcltk (several plug-ins to Rcmdr are also available)
  • RExcel - Using R and Rcmdr from within Microsoft Excel
  • rggobi, an interface to GGobi for visualization of matrices
  • RKWard - based on the KDE libraries
  • Sage - web browser interface as well as rpy support
  • Statistical Lab
  • nexusBPM - Automation Tool for R, eclipse plug-in to create R process flows and run R in parallel

Editors and IDEs[uredi | uredi izvor]

Text editors and Integrated development environments (IDEs) with some support for R include Bluefish,[12] Crimson Editor, ConTEXT, Eclipse, Emacs (Emacs Speaks Statistics), Geany, jEdit,[13] Kate,[14] Syn, TextMate, Tinn-R, Vim, gedit, SciTE, Smultron, WinEdt (R Package RWinEdt), and Inference for R.

Sweave is a document processor that can execute R code embedded within LaTeX code and convert both the source and results (including graphical output) into LaTeX source code. One may also use LyX to create and compile Sweave documents. The odfWeave package enables similar processing of R code embedded within word processing documents in OpenDocument format (ODF), and has experimental support for spreadsheets and presentations.

Skriptni jezici[uredi | uredi izvor]

R functionality has been made accessible from several scripting languages such as Python (by the RPy[15] interface package) and Perl (by the Statistics::R[16] module). Scripting in R itself is possible via littler[17] as well as via Rscript which has been part of the R core distribution since release 2.5.0.

Vidi još[uredi | uredi izvor]

Reference[uredi | uredi izvor]

  1. ^ A Brief History R : Past and Future History, Ross Ihaka, Statistics Department, The University of Auckland, Auckland, New Zealand, available from the CRAN website
  2. ^ „Robert Gentleman's home page”. Pristupljeno 20. 07. 2009. 
  3. ^ Hornik, Kurt. The R FAQ: Why is R named R?. ISBN 978-3-900051-08-2. Pristupljeno 29. 01. 2008. 
  4. ^ Fox, John and Andersen, Robert (januar 2005). „Using the R Statistical Computing Environment to Teach Social Statistics Courses” (PDF). Department of Sociology, McMaster University. Pristupljeno 2006-08-03. 
  5. ^ a b Vance, Ashlee (06. 01. 2009). „Data Analysts Captivated by R's Power”. New York Times. Pristupljeno 28. 04. 2009. „R is also the name of a popular programming language used by a growing number of data analysts inside corporations and academia. It is becoming their lingua franca... 
  6. ^ „What is R?”. Pristupljeno 28. 04. 2009. 
  7. ^ Jackman, Simon (proleće 2003). „R For the Political Methodologist” (PDF). The Political Methodologist. Political Methodology Section, American Political Science Association. 11 (1): 20—22. Pristupljeno 2006-08-03. 
  8. ^ „Speed comparison of various number crunching packages (version 2)”. SciView. Pristupljeno 03. 11. 2007. 
  9. ^ „RWeka: An R Interface to Weka. R package version 0.3-17”. Kurt Hornik, Achim Zeileis, Torsten Hothorn and Christian Buchta. Pristupljeno 2009.  Proverite vrednost paramet(a)ra za datum: |access-date= (pomoć)
  10. ^ Gnumeric, Team (2004-12-19). „Gnumeric 1.4 is Here!”. The GNOME Project. Pristupljeno 2006-04-30.  Proverite vrednost paramet(a)ra za datum: |date= (pomoć)
  11. ^ Dalgaard, Peter. „R-1.0.0 is released”. Pristupljeno 06. 06. 2009. 
  12. ^ Customizable syntax highlighting based on Perl Compatible regular expressions, with subpattern support and default patterns for..R, tenth bullet point, Bluefish Features, Bluefish website, retrieved 9 July 2008.
  13. ^ Jose Claudio Faria. „R syntax”. Pristupljeno 03. 11. 2007. 
  14. ^ „Syntax Highlighting”. Kate Development Team. Pristupljeno 09. 07. 2008. 
  15. ^ RPy home page
  16. ^ Statistics::R page on CPAN
  17. ^ littler web site

Spoljašnje veze[uredi | uredi izvor]