Some simple differences between R and Python

We provide effective and economically affordable training courses for R and Python, click here for more details and course registration ! Both R and Python are popular programming languages for data analysts. R is designed mainly for statistical data analysis, and Python may have more usage in deep learning and web application in addition to general data analysis. Although there are some common points between R and Python, i.e. they are both free and open Read more…

Test on an individual coefficient in Multiple Linear Regression model

We provide effective and economically affordable training courses for R, Python and Statistics, click here for more details and course registration ! When a multiple linear regression model is estimated, the next step is usually checking the significance of each coefficient. As the arbitrary inclusion of an unnecessary variable into the model will increase the SSR (Regression sum squares) a little, which is not warrant the reduce of the SSE (Sum of Squared Error). So Read more…

How to create a heapmap using ggplot2 in R

We provide effective and economically affordable training courses for R and Python, click here for more details and course registration ! A heatmap is just a grip type data visualization of the correlation matrix between each variable pair of a data frame. In R, if you want to create a heatmap, you will have to first create a correlation matrix using cor() function for the data frame. Then using melt() function from reshape2 package in Read more…

Using for loop through a list in Python

We provide effective and economically affordable training courses for R and Python, click here for more details and course registration ! Looping in Python provides a feasible way to deal with each element of an object for particular operations using just a single block of statements. A for loop handling a list in Python creates a temporary variable first, then do a series expected operation with the block. Although the temporary variable name can be Read more…

Introducing string variables in Python

We provide effective and economically affordable training courses for R and Python, click here for more details and course registration ! String variables in Python are data objects encapsulated in double or single quotes. For example we can create a string variable ‘msg’ and print it out in the following code. The basic function working on strings are print string with upper case, lower case, or title form. Several strings can be concatenated using plus Read more…

Introduction of S3 class in R programming

We provide effective and economically affordable training courses for R and Python, click here for more details and course registration ! S3 class system is the most used R object oriented programming mechanism. The calling of ‘S3’ comes from the third version of S, which is the ancestor of R programming language. You may not notice S3 when using R for data analysis, but actually It exists everywhere. For example, when a data frame is Read more…

Create, index and modify lists in R

We provide effective and economically affordable training courses for R and Python, click here for more details and course registration ! List is a type of data objects in R. It can store different types of data objects into one object. You can combine scalars, vectors, matrices, data frames, and even lists into a single list object. A list can be created using list() function in R. The code below shows a simple example to Read more…

How to create, index and modify data frames in R

We provide effective and economically affordable training courses for R and Python, click here for more details and course registration ! Data frame is the most widely used data object in R programming, due to the fact that a data frame can store different type of data contents (numeric, character, etc) into a tabular form. Creating a data frame is more than just simple. You can concretely combine several vectors into a data frame, as Read more…

Some useful functions for working with objects in R

We provide effective and economically affordable training courses for R and Python, click here for more details and course registration ! In this post, we will introduce and provide several useful and important functions in R. Most of them are fairly basic, and frequently used in data analysis with R programming. length() – get the length of an object dim() – to show the dimension of an object str() – to show structure of a Read more…

Using with() function to simplify your work in R

We provide effective and economically affordable training courses for R and Python, click here for more details and course registration ! with() function in R provides an alternative and often easier way to deal with data management and analysis. Say we have a data frame ‘grade’, and want to calculate the summary statistics of variable ‘Math’ and correlation between variables ‘Math’ and ‘Physics’. In the normal way, we can write the code as follows: If Read more…