Knowledge Cow Micro Classroom: R programming language in the era of big data

Source: Internet
Author: User

The TIOBE December 2014 programming language rankings show that the R programming language is affected by big data, the industry is sought after, the market share once climbed to the top 12, and last year 38, R language is expected to be the candidate for this year's TIOBE year language.

R language is God horse East? Learn about the cow Micro class with you.

The first glimpse of R language

The R language is used for statistical analysis, drawing of the language and operating environment. R is a free, free, source-code software that belongs to the GNU system and is an excellent tool for statistical computing and statistical mapping.

R is a branch of the S language widely used in the field of statistics, which was born around 1980. You can think of R as an implementation of the S language. The S language is an interpretive language developed by the T-Bell Laboratory for data exploration, statistical analysis and mapping. The original implementation version of the S language was mainly s-plus. S-plus is a commercial software that is based on the S language and is further perfected by the Department of Statistical Science of Mathsoft Corporation. Later Robert Gentleman and Ross Ihaka and other volunteers at Auckland University developed an R system. Developed by the R Development core team. There are many similarities between the use of R and S-plus, the two languages have some compatibility. S-plus Manual, as long as a slight modification can be used as a manual of R. So some people say: R, is a "clone" of S-plus.

R is a GNU project based on the S language, and code written in the S language can be run without modification in the R environment. The syntax for r is from scheme. R language is open source, for all people is completely free, free to use, R language source code hosted on GitHub, can be run in multiple operating systems, such as Windows, Linux and UNIX.

R Language Resources:

    • Home: http://www.r-project.org

    • cran:http://cran.r-project.org

    • Domestic Mirror:

    • http://mirror.bjtu.edu.cn/cran/

    • http://mirrors.ustc.edu.cn/CRAN/

    • http://mirror.lzu.edu.cn/CRAN/

    • http://mirrors.xmu.edu.cn/CRAN/

R Advantages and Features

R is a complete set of data processing, calculation and mapping software systems, providing a wide range of statistical analysis and mapping technology environment: including linear and non-linear models, statistical testing, time series, classification, clustering and other methods. , including a number of statistical procedures and a strong variety of mathematical calculations, statistical calculation function library, users can simply specify a database and a number of parameters for a statistical analysis, but also flexible data analysis, to create a new statistical calculation method to meet the needs.

From the development history of R language, R is mainly the language that statisticians develop to solve the problem of data analysis, so R has some unique advantages:

    • Efficient data storage and processing system;

    • Operators with a complete array of arrays and matrices (especially powerful vectors, matrix operations), statisticians and cutting-edge algorithms that cover almost the entire statistical field (3700+ expansion pack);

    • A complete and coherent statistical analysis tool;

    • High-quality, extensive statistical analysis, data mining platform

    • Repetitive analysis Work (Sweave = r + Latex), with the powerful analytical ability of R language + latex perfect typesetting ability, can automatically generate analysis reports;

    • Excellent statistical drawing, drawing function, drawing has the quality of printing, but also can add mathematical symbols;

    • A fairly perfect, concise and efficient programming language: can manipulate the input and output of data, can realize branching, looping, user-definable functions;

    • R language is a completely object-oriented statistical programming language;

    • There is a good interface between r language and other programming languages and databases;

    • Open source code (free, in both senses), can be deployed in any operating system, such as Windows, Linux, Mac OS X, BSD, Unix strong community support

    • Ease of extensibility

    • The database can be connected via the appropriate interface, such as Oracle, DB2, MySQL

    • Cross-tune with Python, Java, C, C + + and other languages

    • API interface can be called, such as Google, Twitter, Weibo

    • Most other statistical software can call R, such as SAS, SPSS, Statistica, etc.

    • Even some of the more straightforward business applications, such as Oracle R Enterprise, IBM Netezza, R add-on for Teradata, SAP HANA, Sybase RAP

The functions of R can be enhanced by the user-written suite. Added features include special statistical techniques, drawing functions, as well as programming interfaces and data output/input functions. These packages are written by the R language, LaTeX, Java, and the most commonly used C language and Fortran. Several of them are more commonly used, such as economic metrology, financial analysis, humanities research, and artificial intelligence.

R is more open than Matlab

    • R is free software, MATLAB is commercial software;

    • R can be easily extended through the "package", the core of R is only 25 packages, but there are thousands of external packages can be called, of course, you can also develop their own;

    • R language is more powerful than MATLAB;

    • There is a good interface between r and other programming languages/databases, and other languages can easily invoke R's API and result objects.

    • R is commonly used in the fields of finance and statistics. Most people use r because of its statistical function, and R's interior implements a lot of classical or fashionable statistical techniques.

Effect Demo

With a simple example, make R look more intuitive.

Enter the following command in the console of R:

> install.packages (' quantmod ') # Install QUANTMOD Package

> Require (QUANTMOD) #引用quantmod包

> Getsymbols ("GOOG", src= "Yahoo", from= "2013-01-01", to= ' 2013-04-24 ') #从雅虎财经获取google的股票数据

> chartseries (goog,up.col= ' red ', dn.col= ' green ') #显示K线图 > ADDMACD () #增加MACD图

will be able to see the effect of:

Knowledge Cow Micro Classroom: R programming language in the era of big data

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.