आर (प्रोग्रॅमिंग भाषा)

विकिपीडिया, मुक्‍त ज्ञानकोशातून
आर

आर ही सांख्यिकीय गणन आणि आलेख यांसाठी एक मुफ्त प्रोग्रॅमिंग भाषा आणि सॉफ्ट्वेअर पर्यावरण (एन्व्हायर्नमेंट) आहे. सांख्यिकीतज्ञ आणि डेटा मायनर मध्ये ही भाषा खूप लोकप्रिय आहे आणि तिची लोकप्रियता दिवसेंदिवस वाढत आहे.

पॅकेजेस[संपादन]

आर भाषेची क्षमता पॅकेजेस (छोटे प्रोग्रॅम) लिहून आणि ती इम्पोर्ट करून वाढवता येते. कुणीही पॅकेज लिहू शकतो. आर साठी ५,५०० पॅकेजेस उपलब्ध आहेत आणि ती दिवसेंदिवस वाढतच आहेत.

युझर इंटरफेस[संपादन]

खालीलप्रमाणे अनेक मोफत जीयुआय उपलब्ध:

RGUI – comes with the pre-compiled version of R for Microsoft Windows. Tinn-R– an open source, highly capable integrated development environment featuring syntax highlighting similar to that of MATLAB. Only available for Windows Java Gui for R – cross-platform stand-alone R terminal and editor based on Java (also known as JGR). Deducer – GUI for menu driven data analysis (similar to SPSS/JMP/Minitab). Rattle GUI – cross-platform GUI based on RGtk2 and specifically designed for data mining. R Commander – cross-platform menu-driven GUI based on tcltk (several plug-ins to Rcmdr are also available). RapidMiner[28][29] RExcel – using R and Rcmdr from within Microsoft Excel. RKWard – extensible GUI and IDE for R. RStudio – cross-platform open source IDE (which can also be run on a remote linux server). Revolution Analytics <http://www.revolutionanalytics.com/> provides a Visual Studio based IDE and has plans for web based point and click interface. Weka[30] allows for the use of the data mining capabilities in Weka and statistical analysis in R. AirXCell provides a fully functional R Console at the bottom of their web-based AirXCell GUI.

इतर सॉफ्टवेअर कडून आर भाषेसाठी व्यावसायिक आधार (कमर्शिअल सपोर्ट)[संपादन]

Oracle, JMP, Mathematica, MATLAB, Spotfire, SPSS, STATISTICA, Platform Symphony, Revolution Analytics and SAS

उदाहरणे[संपादन]

> x <- c(1,2,3,4,5,6)   # Create ordered collection (vector)
> y <- x^2              # Square the elements of x
> print(y)              # print (vector) y
[1]  1  4  9 16 25 36
> mean(y)               # Calculate average (arithmetic mean) of (vector) y; result is scalar
[1] 15.16667
> var(y)                # Calculate sample variance
[1] 178.9667
> lm_1 <- lm(y ~ x)     # Fit a linear regression model "y = f(x)" or "y = B0 + (B1 * x)"
                        # store the results as lm_1
> print(lm_1)           # Print the model from the (linear model object) lm_1

Call:
lm(formula = y ~ x)

Coefficients:
(Intercept)            x
     -9.333        7.000

> summary(lm_1)          # Compute and print statistics for the fit
                         # of the (linear model object) lm_1

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_1)             # Diagnostic plot of regression model

वरील आज्ञावलीने मिळालेले परिणाम