# Tag Archive: R-stat

## R cheat sheet for working with normal distribution

This article presents a bunch of code snippets that you can use as a reference when dealing with normal distribution. R makes it easy to run stats. Use, improve and share your comments please.   #the 68-96-99.7% rule for the…

## Big Data boosting salary in IT jobs in 2014

Why learn Statistics? 2014 Salary Guides from Robert Half Technology and The Creative Group presents us with some exciting data for the “Data Scientists”, if you look carefully. IT professionals with high level of skills in big data manipulation are…

## R-loops: Repeat, While and For: Simple Code Examples

> i=20 > repeat {if (i > 100) break else {print(i); i = i + 5;}} [1] 20 [1] 25 [1] 30 [1] 35 [1] 40 [1] 45 [1] 50 [1] 55 [1] 60 [1] 65 [1] 70 [1] 75…

> #Lets learn about log in R > ?log log computes logarithms, by default natural logarithms (log base e) log10 computes common (i.e., base 10) logarithms log2 computes binary (i.e., base 2) logarithms. > #The general form log(x, base) computes…

> # Let’s check how R treats addition of vectors > a=c(1,2,3,4) > a [1] 1 2 3 4 > b=c(5,6,7,8) > b [1] 5 6 7 8 > #notice a and b both has same length > length(a) [1]…

## na.rm=T in R

Follow the example to see the use of na.rm=T in R > x=c(0, 1, 1, 2, 3, 5, 8) #vector > x [1] 0 1 1 2 3 5 8 > mean(x) [1] 2.857143 Now, introduce a NA value in…

## Newborn Age vs Weight in R-statistical Program.

Follow My code > newbornAgeMonths=c(0,1,2,3,4,5,6,7,8,9,10,11) > newbornWeightMonths=c(7.16,9.15,10.91,12.56,14,15.43,16.53,17.64,18.74,19.62,20.28,21.05) > mean(newbornWeightMonths) [1] 15.25583 > cor(newbornAgeMonths,newbornWeightMonths) [1] 0.9883767 > plot(newbornAgeMonths,newbornWeightMonths) > table=rbind(newbornAgeMonths,newbornWeightMonths) > table [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] newbornAgeMonths 0.00 1.00 2.00 3.00 4 5.00 6.00 7.00…

## Top 20 commands for R-statistical software for new users

Top 20 commands for R-statistical software. What is R? ·        R is a programming language. ·        A program that can do cool statistics. ·        Modeled after S and S-Plus. ·        R project was started by Robert Gentleman and Ross Ihaka of the statistics Department of the University of Auckland · The R –…