35 | | === G.1 R Scrips === |
| 35 | === G.1 R Scripts === |
| 36 | |
| 37 | One potential way to visualize the data is making use of [http://www.r-project.org/ R], which provides a visualization language. |
| 38 | For this tutorial, we have create a set of R script, which we briefly discuss in the following. |
| 39 | |
| 40 | The first [http://emmy9.casa.umass.edu/GEC15-GIMI-Tutorial/R_script_ping.r script] creates a plot of the RTTs for each ping that's carried out in the experiment. The following code snipped shows part of the R script that is used to plot a single ping (to 192.168.2.10). |
| 41 | |
| 42 | {{{ |
| 43 | library(RSQLite) |
| 44 | con <- dbConnect(dbDriver("SQLite"), dbname = "gimi30-ping_all.sq3") |
| 45 | dbListTables(con) |
| 46 | dbReadTable(con,"pingmonitor_myping") |
| 47 | mydata <- dbGetQuery(con, "select dest_addr,rtt from pingmonitor_myping where dest_addr='192.168.4.10'") |
| 48 | rtt <- mydata$rtt |
| 49 | pdf("gimi31_ping1.pdf") |
| 50 | plot(rtt,type="o",col="red",xlab="Experiment Interval",ylab="RTT (ms)") |
| 51 | title(main="Ping Experiment to IP address 192.168.4.10", col.main="blue", font.main=4) |
| 52 | }}} |
| 53 | |
| 54 | |
| 55 | |