.

R programming in big data

Introduction to R in Big Data Analytics

  • The R language serves as an interface to the languages like c, c++ and Fortran
  • It offers an tool of an interactive option to support data analysis
  • To learn R code, type the R code which aids the user to know about R syntax.
  • The comments in R are written with # symbol
  • Copy and paste the content from an internet and try it in the R tool
  • introduction to r img1
  • Consider the above code, it is probable to generate vectors with characters and numbers
  • No need to specify the type of a data in R
  • Vector can be generated with alpha numerals. The vector mixed_vec has drived numbers to char. It is visible how the data are displayed inside double quotes

The following code shows the data type of different vectors as returned by the function className.

introduction to r img2
  • 2 dimensional objects are supported in R
  • The underlying code shows an example of 2 data structures: matrix & data.frame of R
  • introduction to r img3 introduction to r img4
  • It is allowed to employ various data types in the same object as per the above example
  • Databases have data of various formats. The data can be text, char vector or other numeric’s
  • It is the task of data analyst to decide correct R type to the type of data of statistical data. The variables of statistics can be
    • Numerical
    • Ordinal and
    • Categorical or Nominal
  • The Vector classNamein R can be
    • Integer Numeric
    • Ordered Factor
    • Factor
  • For every statistical variable type , R offers a type of data

The underlying code employs an indexing concept. It works on a general operation with the identified problem of choosing sections of an object and formulating transformation on it

introduction to r img5 introduction to r img6 introduction to r img7 introduction to r img8 introduction to r img9
.