Browse Source

Added information on basic r syntax and paradigms

pull/77/head
jrtechs 5 years ago
parent
commit
b2b47fc238
3 changed files with 35 additions and 20 deletions
  1. +0
    -20
      blogContent/posts/data-science/R-Programming-Language.md
  2. BIN
      blogContent/posts/data-science/media/r/arrays.jpg
  3. +35
    -0
      blogContent/posts/data-science/r-programming-language.md

+ 0
- 20
blogContent/posts/data-science/R-Programming-Language.md View File

@ -1,20 +0,0 @@
R is a programming language designed for statistical analysis and graphics.
Since R has been around since 1992, it has developed a large community and has over [13 thousand packages](https://cran.r-project.org/web/packages/) publicly available.
What is really cool about R is that it is an open source [GNU](http://www.gnu.org/) project.
# Why Use R
# R Syntax
<youtube src="s3FozVfd7q4" />
# R Markdown
# Resources
- [R for Data Science(Online Book)](https://r4ds.had.co.nz/)
- [R Studio](https://www.rstudio.com/)
- [R Official Website](https://www.r-project.org/)

BIN
blogContent/posts/data-science/media/r/arrays.jpg View File

Before After
Width: 680  |  Height: 643  |  Size: 88 KiB

+ 35
- 0
blogContent/posts/data-science/r-programming-language.md View File

@ -0,0 +1,35 @@
R is a programming language designed for statistical analysis and graphics.
Since R has been around since 1992, it has developed a large community and has over [13 thousand packages](https://cran.r-project.org/web/packages/) publicly available.
What is really cool about R is that it is an open source [GNU](http://www.gnu.org/) project.
# R Syntax and Paradigms
The syntax of R is C esk with its use of curly braces.
The type system of R is similar to Python where it can infer what type you are using.
This "lazy" type system allows for "faster" development since you don't have to worry about declaring types -- this laziness makes it harder to debug and read your code.
The type system of R is rather strange and distinctly different from most other languages.
For starters, integers are represented as vectors of length 1.
These things may feel weird at first, but, R's type system is one of the things that make it a great tool for manipulating data.
![R Arrays Start at 1](media/r/arrays.jpg)
Did I mention that arrays start at 1?
Technically, the thing which we refer to as an array in C or Java is really a vector in R.
Arrays in R are data objects which can store data in more than two dimensions.
Since R tries to follow mathematical notation, indexing starts at 1 -- just like in linear algebra.
Using zero based indexing makes sense for languages like C because the index is used to get at a particular memory location from a pointer.
<youtube src="s3FozVfd7q4" />
I don't have the time to go over the basic syntax of R in a single blog post, however, I feel that this youtube video does a pretty good job.
# R Markdown
# Resources
- [R for Data Science(Online Book)](https://r4ds.had.co.nz/)
- [R Studio](https://www.rstudio.com/)
- [R Official Website](https://www.r-project.org/)

Loading…
Cancel
Save