numeric 170 review data frame ordered container of

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 9,563,902.00 3,205,000 4043.5457! 5 AND 0 0 0 0 0 3,491,000,000.00 84,864 41136.4065! 6 ARE 0 0 0 0 0 360,245,000,000.00 7,512,000 47955.9372! Need to: Clean up the GDP and POP by removing “,” and conver9ng to numeric; Adding la9tude and longitude for each country Review Data Structures Review: Vector •  Ordered container of literals •  Elements must be same type Weight 175 125 Ordered 105 . . . Numeric 170 Review: Data Frame •  Ordered container of vectors •  Vectors must all be the same length •  Vectors can be different types Data Frame Wireless Data •  There are 5 wireless access points in a building •  A laptop emits a signal and the strength of the signal is recorded as each access point. •  Also recorded is the loca9on of the laptop in the building. •  Measurements are taken at 254 loca9ons w = read.table("http:// www.stanford.edu/~vcs/StatData/ wireless.txt", header=TRUE)! Helpful Func9ons for finding informa9on out about the data frame > class(w) [1] "data.frame" > names(w) [1] "x" "y" "S1" "S2" "S3" "S4" "S5" > dim(w) [1] 259 7 > head(w) x 1 225.0 2 0.0 3 111.0 4 110.7 5 105.0 6  99.0 y S1 S2 S3 S4 S5! 144 -92 -78 -49 -92 -92! 144 -75 -92 -87 -47 -92! 132 -92 -92 -80 -70 -65! 132 -87 -92 -67 -67 -62! 132 -92 -92 -79 -66 -61! 132 -92 -92 -79 -70 -61! > summary(w$S1) Min. 1st Qu. -92.00 -90.00 Median -80.00 Mean 3rd Qu. -77.41 -71.00 Max. ! -33.00 ! > w[w$x > 200, c("S2")] [1] - 78 - 74 - 35 - 43 - 46 - 43 - 41 - 48 - 68 - 71 - 67 - 70 - 58 - 61 [15] - 64 - 73 - 71...
View Full Document

Ask a homework question - tutors are online