Blog Archives

Quartiles, Deciles, and Percentiles

June 9, 2013
By

The measures of position such as quartiles, deciles, and percentiles are available in quantile function. This function has a usage,where:x - the data pointsprob - the location to measurena.rm - if FALSE, NA (Not Available) data points are not ignoredna...

Read more »

Mean and Median

June 8, 2013
By

Mean in R is computed using the function mean. Consider the scores of 20 MSU-IIT students in Stat 101 exam with a hundred items: 70, 78, 66, 65, 50, 53, 48, 88, 95, 80, 85, 84, 81, 63, 68, 73, 75, 84, 49, and 77. Compute and interpret the mean and medi...

Read more »

Matrix Operations

June 8, 2013
By

Matrix manipulation in R are very useful in Linear Algebra. Below are lists of common yet important functions in dealing operations with matrices:Transpose - tMultiplication - %*%Determinant - detInverse - solve, or ginv of MASS libraryEigenvalues and ...

Read more »

Data Class Conversion

June 6, 2013
By

Data in R can be converted from one class to the other. The function is prefixed with as. then followed by the name of the data class that we wish to convert to. Data class in R are the following:numeric - as.numericvector - as.vectorcharacter - as.cha...

Read more »

Inputting Data in Matrix Format

June 6, 2013
By

Matrix in R is formed using matrix, rbind, or cbind function. These functions have the following descriptions:matrix - used to transform a concatenated data into matrix form of compatible dimensions. rbind - short for row bind, that binds a conca...

Read more »

Basic Mathematical Functions

April 20, 2013
By

R can perform the usual mathematical operations, below are the functions:Arithmetic +    - addition-    - subtraction*    - multiplication/    - divisionTrigonometrysin    ...

Read more »

Installing, Loading, and Detaching R Packages

April 1, 2013
By

To install a package in R, the function to be used is install.packages. Let say we want to install the ggplot2 package, well simply code this withTo install more than one package, we do this byNote that in executing the above codes, a dialogue box...

Read more »

Importing Data to R

March 30, 2013
By

There are number of ways in importing data into R, and several formats are available,From Excel to R From SPSS to RFrom Stata to R, and more hereIn this post, I'm going to talk about importing common data format that we often encounter, such as Excel, ...

Read more »

Entering Data to R

March 30, 2013
By

To enter data into R, two common and easy to use R functions are utilized.The concatenate function, c; and,The data.frame function.The concatenate function, c, is use for combining data points into a single numeric R object. The usage of this function ...

Read more »

Download and Install R in Ubuntu

March 30, 2013
By
Download and Install R in Ubuntu

There are two ways to install R in Ubuntu. One is through the terminal, and the other is through the Ubuntu Software Center.Through TerminalPress Ctrl+Alt+T to open Terminal Then execute sudo apt-get update After that, sudo apt-get install r-baseT...

Read more »