Treat it as a data.frame: set.seed(1)x <- sample(30, 100, TRUE) summary(x)# Min. 1st Qu. Median Mean 3rd Qu. Max. # 1.00 10.00 15.00 16.03 23.25 30.00 summary(data.frame(x))# x # Min. : 1.00 # 1st Qu.:10.00 …
# Goals: To write functions # To write functions that send back multiple objects. # FIRST LEARN ABOUT LISTS -- X = list(height=5.4, weight=54) print("Use default printing --") print(X) print("Accessing individual elements --") cat(&quo…
Functionals “To become significantly more reliable, code must become more transparent. In particular, nested conditions and loops must be viewed with great suspicion. Complicated control flows confuse programmers. Messy code often hides bugs.” — Bjar…
Data manipulation primitives in R and Python Both R and Python are incredibly good tools to manipulate your data and their integration is becoming increasingly important1. The latest tool for data manipulation in R is Dplyr2 whilst Python relies onPa…
In two previous blog posts I discussed some techniques for visualizing relationships involving two or three variables and a large number of cases. In this tutorial I will extend that discussion to show some techniques that can be used on large datase…