Blog Archives

Measure of Relative Variability

June 10, 2013
By

The measure of relative variability is the coefficient of variation (CV). Unlike measures of absolute variability, the CV is unitless when it comes to comparisons between the dispersions of two distributions of different units of measurement. In R, CV ...

Read more »

Measures of Absolute Variability

June 10, 2013
By

Measures of absolute variability deal with the dispersion of the data points. This include the following:Range - rangeInterquartile Range - IQRQuartile DeviationAverage DeviationStandard Deviation - sdThese measures of variability restrict to uniform u...

Read more »

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 »