library(xlsx) ## 07-08 test=read.xlsx("LCRB_gaged_flows.xlsx",3) ## col 1 - year ## col 2 - Lees Ferry ## col 3 - Imperial - Lees ## col 4 - flow above Imperial ## col 5 - Upper gila ## Col 6 - Salt+Verde+tonto test[,2:6] = test[,2:6] / (10^6) ## Million AF library(Rlab) library(sm) X=test[,2] N=length(X) ncls = round(log(N,2) + 1) hplot(X,nclass=ncls,xlab="Flow (MAF)",main="Lees Ferry Flow") points(X,rep(0,length(X))) sm.density(X, add=T, col="red",positive=TRUE) ### Read as table avgPrecip = read.table('http://bechtel.colorado.edu/~caldwerj/cven6833/precipstats_new.txt', sep = ',', header = F)