Supporting R in SQL Server

SQL Server R Services in version 2017, because of added Python support renamed to Machine Learning Services, combines the power and flexibility of the open source R language with enterprise-level tools for data storage and management, workflow development, reporting,  and visualization. This chapter introduces R Machine Learning Services globally and the R language. R is developing quite fast, so it is worth mentioning that the R version used in this book is 3.2.2 (2015-08-14).

In the first section, you will learn about the free version of the R language and engine. You will also become familiar with the basic concepts of programming in R.

When developing an advanced analytical solution, you spend the vast majority of time with data. Typically, data is not in a shape useful for statistical and other algorithms. Data preparation is not really glamorous but is an essential part of analytical projects. You will learn how to create a new, or use an existing, dataset and learn about basic data manipulation with R in the second section of this chapter.

The data preparation part of an analytical project is interleaved with the data understanding part. You need to gather in-depth knowledge of your data and data values before you can analyze it. Showing data graphically is a very efficient and popular method of data understanding. Fortunately, R support for data visualization is really comprehensive. However, sometimes numbers tell us more, in a more condensed way, than graphs. Introductory statistics, like descriptive statistics, provide you with the numbers you need to understand your data. Again, R support for introductory statistics is astonishing.

Open source products also have some disadvantages. For example, scalability might be an issue. SQL Server 2016 and 2017 bring R support inside the database engine. With this support, many of your problems are solved. You get many scalable procedures and enhanced security for your R applications.

This chapter will cover the following points:

  • R—basics and concepts
  • Core elements of the R language
  • R data structures
  • Basic data management
  • Simple visualizations
  • Introductory statistics
  • SQL Server R (ML) Services architecture
  • Creating and using scalable R solutions in SQL Server
  • Using the new T-SQL PREDICT function
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.44.229