Jun 15, 2015

Writing R Functions

R has a very easy way to make functions. In this post, we will learn some simple R functions.

Graphics in R

To do basic graphics in R, I would suggest to download ggplot2 package.

In this post, we will learn how to dowload package and create histograms, scatterplot, boxplots.

Reading file in R

The best way to read data from a csv file is using read.table.

Here in this example, I have shown how to read the online csv file and later show the top and bottom rows of data.

Jun 14, 2015

Data Frames in R

Data Frames in R

NA and NULL in R

NA and NULL values are something you will always find in every statistical project.

NA is when any value is missing whereas NULL is absence of anything.

Functions in R

Functions in any language are very powerful. Here we have run some of the functions in Rstudio.

Advanced vectors in R

Some more advanced operations on vectors in R are given below:

Vectors in R

A vector is a collection of elements of same type. Example : a(1,4,3,2,5,1) , b("Python", "R", "java", "excel") are vectors.

The advantage of vectors are that operations are applied to all elements of vector automatically.

Jun 11, 2015

Data Types in R

There are many data types in R that store various kinds of data. the 4 main types are given below:

  1. Numeric
  2. Character
  3. Date(POSIXct)
  4. Logical

Variables Assignment in R

Variables are an integral part of any programming language. in R, we have a lot of flexibility in terms of variables.

Below in R studio, I have shown in a simplest manner how to use variables in R.

Basic R functions

To start running the basic R functions, you should have R downloaded and installed.
I am using R studio which can be downloaded from http://www.rstudio.com/.

In the next post, we will cover Variables assignment.

Related Post

Related Posts Plugin for WordPress, Blogger...