Download presentation
Presentation is loading. Please wait.
Published byJonathan Horn Modified over 8 years ago
1
Descriptive Exploratory Data Analysis II Jagdish S. Gangolly State University of New York at Albany
2
Data Manipulation: –Matrices: bind rows ( rbind ), bind columns ( cbind ) –Arrays: rowMeans, colMeans, rowSums, colSums, rowVars, colVars,… –apply(data, dim, function,…) –attach( framename ): permits you to refer to variables without cumbersome notations. You can detach the frame when done. –function (x) { function definition } : To define your own functions –rm( comma-separated S-Plus objects ) : To remove objects
3
S-Plus Graphics motif( ) : To open a graphics window. Each time you invoke this, a new graphics window is opened. dev.off() : Close the most recent graphics device opened. graphics.off() : Close all graphics devices. plot( comma-separated variables, plot character )
4
Trellis Graphics I A matrix of graphs Example: >par(mfrow=c(2,2)) # 2 X 2 matrix of figures >x <- 1:100/100:1 >plot(x) # plot cell (1,1) >plot(x, type=“l”) # plot cell (1,2) line >hist(x) # plot cell (2,1) histogram >boxplot(x) # plot cell (2,2) boxplot
5
Trellis Graphics II Syntax: Dependent variable ~ explanatory variable |conditioning variable Data set Output: >trellis.device(motif) >dev.off() or >graphics.off()
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.