It is not working yet
> last1$date <- as.Date(last1$date, format="%m/%d/%Y")
> u<- zoo(last1$r_wvht, order.by=last1$date)
> plot(u, xaxt="n")
Error in plot.window(...) : need finite 'ylim' values
In addition: Warning messages:
1: In min(x) : no non-missing arguments to min; returning Inf
2: In max
Hello,
Inline.
Em 31-07-2012 21:45, Yolande Tra escreveu:
I am sorry but I still got some errors. May be it is because of the package
zoo. Please be patient with me. Thanks.
Yolande
last1 <- read.csv(file.path(dataDir,"plot1_2008.csv"), as.is=T,stringsAsFactors
= FALSE)
library(zoo)
Attach
It does look better indeed. Thanks,
Yolande
On Tue, Jul 31, 2012 at 3:15 PM, Rui Barradas wrote:
> Hello,
>
> Adapted from the help page for plot.zoo
>
> #library(zoo)
> #z <- zoo(last$r_wvht, order.by=last$date)
> plot(z, xaxt = "n")
> tt <- time(z)
> ix <- seq(1, length(tt), length.out=8)
> a
Hello,
Adapted from the help page for plot.zoo
#library(zoo)
#z <- zoo(last$r_wvht, order.by=last$date)
plot(z, xaxt = "n")
tt <- time(z)
ix <- seq(1, length(tt), length.out=8)
axis(side = 1, at = tt[ix], labels = FALSE)
labs <- format(tt, "%Y-%b-%d")
axis(side = 1, at = tt[ix], labels = labs[ix
Thanks.
This is an irregular time series. The line plot does not look good because
of the gap between 9/11/2008 and 10/12/2009. I think two plots would be
better.
How would you include the date on the x-axis. Right now it only gives one
tick mark, 2009.
Yolande
On Tue, Jul 31, 2012 at 2:01 PM, Ru
Thank you everyone for the attempt to solve the problem
It is an irregular series and insert NAs when a date is missing
> library(zoo)
> z <- zoo(last$r_wvht, order.by=last$date)
> plot(z)
Error in plot.window(...) : need finite 'xlim' values
In addition: Warning messages:
1: In xy.coords(x, y, xla
Hello,
It only gives that error if you don't
last$date <- as.Date(last$date, format="%m/%d/%Y")
You must have dates, not character values.
Try it, then make a zoo object, then plot it.
Rui Barradas
Em 31-07-2012 18:54, Yolande Tra escreveu:
Thank you everyone for the attempt to solve the pr
Hello,
Sorry, I forgot the "time series" part of your question. You could use
instead one of
# 1. type = "l" gives a line plot
plot(r_wvht ~ date, data = last, type="l")
# 2. use time series object plot
library(zoo)
z <- zoo(last$r_wvht, order.by=last$date)
plot(z)
Rui Barradas
Em 31-07-20
On Tue, Jul 31, 2012 at 12:02 PM, Yolande Tra wrote:
> Hello,
>
> This should be pretty simple but I cannot get it right. Please point to the
> right code. Thanks.
>
>> last <- read.csv(file.path(dataDir,"plot1.csv"), as.is=T,stringsAsFactors
> = FALSE)
>> last
> dater_wvht
> 18/6
Hello,
You could use dput(), it's not your first post...
last <- structure(list(date = c("8/6/2008", "8/8/2008", "8/11/2008",
"8/13/2008", "8/14/2008", "8/18/2008", "8/20/2008", "8/27/2008",
"8/28/2008", "8/31/2008", "9/2/2008", "9/3/2008", "9/4/2008",
"9/5/2008", "9/8/2008", "9/11/2008", "10/1
Hello,
This should be pretty simple but I cannot get it right. Please point to the
right code. Thanks.
> last <- read.csv(file.path(dataDir,"plot1.csv"), as.is=T,stringsAsFactors
= FALSE)
> last
dater_wvht
18/6/2008 0.977
28/8/2008 0.773
3 8/11/2008 1.483
4 8/
11 matches
Mail list logo