similar to: USGS stream flow data automatic download R

Displaying 20 results from an estimated 8000 matches similar to: "USGS stream flow data automatic download R"

2009 Oct 05
2
Parsing Files in R (USGS StreamFlow data)
http://waterdata.usgs.gov/nwis/uv?format=rdb&period=7&site_no=021973269 I would like to be able to parse this file up: I can do this x <- read.table("http://waterdata.usgs.gov/nwis/uv?format=rdb&period=7&site_no=021973269", skip=26) but If I add another gauge to this x <-
2010 May 18
2
Function that is giving me a headache- any help appreciated (automatic read )
note: whole function is below- I am sure I am doing something silly. when I use it like USGS(input="precipitation") it is choking on the precip.1 <- subset(DF, precipitation!="NA") b <- ddply(precip.1$precipitation, .(precip.1$gauge_name), cumsum) DF.precip <- precip.1 DF.precip$precipitation <- b$.data part, but runs fine outside of the function: days=7
2009 Oct 06
1
ggplot2 applying a function based on facet
Look at the bottom of the message for my question #here is a little function that I wrote USGS <- function(input="discharge", days=7){ library(chron) library(gsubfn) #021973269 is the Waynesboro Gauge on the Savannah River Proper (SRS) #02102908 is the Flat Creek Gauge (ftbrfcms) #02133500 is the Drowning Creek (ftbrbmcm) #02341800 is the Upatoi Creek Near Columbus (ftbn) #02342500 is
2010 Jul 14
2
qplot in ggplot2 not working any longer - (what did I do?)
This is the first time that I have tried to update packages with a tinkered around with .Rprofile. I start R with R --vanilla and it does not load my .Rprofile, but when I issue the command update.packages() R downloads the packages as expected, but then seems to load .Rprofile before compiling the packages sources. What am I doing wrong? kindest regards, Stephen Sefick see- Session info
2009 Dec 15
1
for loop for automatic pdf generation
I know this is not reproducible, but I don't want to clog up mail boxes with the data frame. I would be happy to send this off list. I am sure that I am missing something simple. The plotting works if I just paste the call to qplot into R and replace the [i] with a number. Thanks for all of your help in advance. #loop to spit out PDFs list.names <-
2009 Aug 11
0
Line of Organic Correlation (help with writing function)
I would like to calculate the line of organic correlation, so that I can use it for record extension for a stream gauging station. Below is a description (1) and then my first attempt with R code (2). Thanks in advance for any help. Stephen Sefick The LOC minimizes the sum of the areas of right triangles formed by horizontal and vertical lines extending from observations to the fitted line
2009 Oct 06
2
ggplot cumsum refined question (?)
OK, so maybe last night was a little too much at one throw, so I have reduced the data to two stations- one that has precipitation and one that does not. This is going to be in the context of a larger data set. I would like to be able to issue a ggplot command and have cum sum just act on the facets (factors) to apply this. library(chron) library(ggplot2) DF <- structure(list(date_time =
2009 Aug 21
5
splitting a string up
x <- "1041281__2009_08_20_.lev" I would like to split this string up and only extract the leading numbers. 1041281 to use as a label for a data column in a bigger for loop function to read in data. regards, -- Stephen Sefick Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us
2009 Jan 15
3
Bar Plot ggplot2 Filling bars with cross hatching
#I am putting a test together for an introductory biology class and I would like to put different cross hatching inside of each bar for the bar plot below color <- c("Brightly Colored", "Dull", "Neither") lizards <- c(277, 70, 3) liz.col <- data.frame(color, lizards) qplot(color, lizards, data=liz.col, geom="bar", ylab="Observed Matings",
2009 Aug 13
3
split number in a vector and then make a chron object out of it
These are date and times in the format YYYYMMDDhhmmss. I would like to take this column and make a chron object form them. I have tried a couple of the split family of functions but they need character input here is the data: date.time <- c(19851001001500, 19851001003000, 19851001004500, 19851001010000, 19851001011500, 19851001013000, 19851001014500, 19851001020000, 19851001021500,
2008 Dec 02
2
ggplot2 45deg axis labels
I would like to rotate the axis labels 45 deg. -- Stephen Sefick Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis
2008 Aug 18
4
Multiple Plotting help (lines don't always connect)
d <- structure(c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, NA, NA, NA, 14), .Dim = c(14L, 2L ), .Dimnames = list(NULL, c("a", "b"))) plot(d, type="b") This is simplified, but Is there an option I am missing that will force all of the points to be joined by a line? Stephen Sefick -- Let's not spend our time and resources
2009 Nov 30
2
Ubuntu tcl/tk problems
Error in firstlib(which.lib.loc, package) : Tcl/Tk support is not available on this system Error : package 'tcltk' could not be loaded Ubuntu 9.10 I have both the 8.5 and 8.4 tcl and tk regular and dev libraries installed. I need both of these because some of my GIS software requires the 8.4 libraries. Should I remove the 8.5 libraries, or ... All help is greatly appreciated!
2009 Jul 31
2
another automation question
This code works: x<-letters[1:6] ycols<-23:28 xcols<-rep(c(3,4,5,8),each=length(ycols)) somertime<-function(i,j)somers2(Pred_pres_a_indpdt[,i,,], population[,j]) results<-mapply(somertime,xcols,ycols) How can I make variable "h" work? x<-letters[1:6] ycols<-23:28 xcols<-rep(c(3,4,5,8),each=length(ycols))
2010 Feb 18
3
row indexes from logical statment
Is there any easy way to pull out the row indexes for a logical matching statment? #################example code######################################### foo <- data.frame(name=c(rep("A", 25), rep("B", 25), rep("C", 25), rep("A", 25)), stuff=rnorm(100), and=rnorm(100), things=rnorm(100)) #this is what I want but I would like the row indexes
2008 Jun 25
2
I want to install a package on Max OS X from a local file
I can't figure this one out- I am the administrator, The file that I want to install is a .tar.gz which is located on my desktop. How do I get it into my packages directory- through the GUI or through brute force? thanks stephen -- Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel
2008 Sep 20
1
fitting a hyperbole
I have got a data set that is Gross Primary Productivity ~ Total Suspended Solids it is a hyperbola just like: plot(1/c(1:1000)) how do I model this relationship so that I can get all of the neat things that lm gives residuals etc. etc. so that I can see if my eyeball model stands up. Thanks for any help, pointers, or good things to read. -- Stephen Sefick Research Scientist Southeastern
2008 Aug 28
1
abline of an lm fit not correct
mac osx 10.5.4 R 2.7.1 I have fit a model d<-lm(y~x) with an R^2 of 0.963 but when I issue the command abline(d) the line is below where it ought to be. Looks like the right slope, but not the right intercept. thanks -- Stephen Sefick Research Scientist Southeastern Natural Sciences Academy Let's not spend our time and resources thinking about things that are so little or so large
2008 Oct 23
1
Reversing xlim qplot
I would like to be able to reverse the xlim on qplot this is the code that I am using qplot(a[,"River.Mile"], a[,26] ,ylab=colnames(a)[26], xlab="RiverMile", xlim=rev(c(60, 216)))+geom_smooth()+scale_x_continuous(breaks=c(215,202,198,190,185,179,148,119,61),
2008 Oct 29
1
Macro stuff to work on up through august 2007
Title says it all remember cast() with sum as the aggregation function -- Stephen Sefick Research Scientist Southeastern Natural Sciences Academy Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being