O'Reilly logo

R Data Analysis Cookbook - Second Edition by Kuntal Ganguly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

There's more...

R functions such as sum, min, max, range, and prod combine their arguments into vectors:

> sum(1,2,3,4,5) 
 
[1] 15 

On the contrary, beware of functions such as mean and median that do not combine arguments into vectors and yield misleading results:

> mean(1,2,3,4,5) 
 
[1] 1 
> mean(c(1,2,3,4,5)) 
 
[1] 3 

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required