Skip to content
Back to formatted view

Raw Message

Message-ID: <8DC25C6D-EEFB-4E92-827E-65257AF8C492@comcast.net>
Date: 2011-12-24T17:26:09Z
From: David Winsemius
Subject: need help with a time series plotting problem
In-Reply-To: <1324736660540-4231285.post@n4.nabble.com>

On Dec 24, 2011, at 9:24 AM, vibhava wrote:

> thanks for the reply. here is subset of the data that i want to plot:
> 	date	usgs700	
> 1	10/1/2000	0.050970325			
> 2	10/2/2000	0.041059428			
> 3	10/3/2000	0.032564374			
> 4	10/4/2000	0.02775051
> .
> .

Instead of posting print-output why not post the results of  
dput(head(flow))

> > further  useless output deleted.

>
> my script again is:
>
> setwd("J:/Rstuff/flow")
> flow=read.delim("flow.dat",header=TRUE,sep="\t")
> plot(flow$usgs1500

There's no column with that name.

> ~as.Date(flow$date,
> "%m/%d/%y")

For another thing, you generally  need to use %Y for 4 digit years.

> ,type="l",xlab="date",ylab="daily discharge (m3/s)
> ",main="USGS1500",yaxs="i", xaxs="i",)

Not sure if that empty argument is going to be handled gracefully.

> i wish to plot all this data as a single time series but my program  
> is doing
> some weird stuff and the x-axis has labels Jan-dec and the long term  
> series
> is broken and plotted on yearly basis.

Your code is not reproducible.


-- 
David Winsemius, MD
West Hartford, CT