In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
What is the development of R language and its extension? aiming at this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.
Brief introduction
R is a language and environment mainly used for statistical analysis and drawing, and it is an implementation of S language, but the syntax of R comes from Scheme, which is an object-oriented functional scripting language that supports reflection.
R was originally developed by Ross Ihaka and Robert Gentleman from the University of Auckland in New Zealand, then became one of the GNU projects and is now developed by the R development core team. R now supports multiple platforms, including GNU/Linux, FreeBSD, Windows, and MacOS.
Working environment
Different from other business statistics software, the main user interface of R is R parser. Users can interact with R as flexibly as they can with shell, or they can submit jobs to R through scripts. R provides libR.so shared objects, and developers can design and connect to the GUI front end, so that they can provide both R parser interface and rich menu functions and other modes of operation.
On * nix, vim and (x) emacs are two famous editors. Accordingly, developers provide interactive support for R:
ESS (Emacs Speaks Statistics)
Vim-r
As a native program for KDE desktop, RKWard provides a good IDE experience!
Use
Here we recommend that readers refer to R's official reference manual.
Why use R
Why use R? Leaving aside the fact that R is free software, there are also the following reasons:
R has gradually become the de facto standard of statistical software, and has caught up with or even surpassed commercial software such as SAS and SPSS in many ways.
The grammar of R is simple and clear.
R is very efficient (mainly depends on the implementation of BLAS)
CRAN has a rich expansion pack
In addition to the native C interface, R also has good language bindings, such as Clipper Java, which makes it easy for users to design their own computing-sensitive programs.
R supports parallel foundations such as OpenMP and OpenMPI, and is suitable for computing-sensitive situations.
Write an extension
As mentioned above, R has a good language binding, in which the expansion package Rcpp makes it convenient for users to use C++ to develop extensions. We use Rcpp to develop two experimental projects, RcppKmeans and RcppNaiveBayes, for data mining research.
Create a Rcpp-based extension
Obviously, we need to install Rcpp, and be careful to make sure that the development environment for GCC and R is complete:
Install.packages ("Rcpp")
Transfer to your working directory
Library (Rcpp) Rcpp.package.skeleton ("MyProjectName")
OK! The skeleton of MyProjectName is built, start writing code! Wait, I suggest you follow the instructions of Read-and-delete-me in the catalog.
RcppKmeans
It is a simple kmeans clusterer for text. Through the application of OpenMP technology, it takes advantage of parallelism on multi-core platform.
Installation
Git clone git://github.com/ucweb/RcppKmeans.git R CMD INSTALL RcppKmeans example
1 library (RcppKmeans) 2 # 9 points 3 s
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.