Skip to Content
Modern R Programming Cookbook
book

Modern R Programming Cookbook

by Jaynal Abedin
October 2017
Beginner to intermediate
236 pages
7h 38m
English
Packt Publishing
Content preview from Modern R Programming Cookbook

How it works…

The multiple-argument function works as it works for a single argument. After giving the name of the function, the statements within curly braces do all the internal calculation. This function takes the numeric vector as input by the numVec argument, and also, the second argument type = specifies the type of summary statistics to be calculated.

After taking the input numeric vector, the function does the following things:

  1. It internally calculates all the required statistics such as mean, standard deviation, median, and median absolute deviation.
  2. It stores all the calculated values into different objects; in this case, avg contains mean, std contains standard deviation, med contains median, and medad contains median absolute ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

R Cookbook, 2nd Edition

R Cookbook, 2nd Edition

JD Long, Paul Teetor

Publisher Resources

ISBN: 9781787129054Supplemental Content