[R] plotting date data over couple of months

vamshi999 vamshi999 at gmail.com
Thu Jul 14 03:42:52 CEST 2011


i am sorry again.. 

this is my dataset.. 


'data.frame':   46376 obs. of  19 variables:
 $ scan.no  : int  24 78 61 64 64 64 65 73 79 82 ...
 $ track.no : int  5 48 105 122 124 121 123 380 1073 1093 ...
 $ blip.no  : int  70 323 514 547 549 553 558 5355 7014 7119 ...
 $ date     : chr  "2011-04-29" "2011-04-29" "2011-04-29" "2011-04-29" ...
 $ time     : chr  "18:17:56" "18:20:08" "18:24:58" "18:25:05" ...
 $ timestamp: num  1.30e+09 1.30e+09 1.30e+09 1.30e+09 1.30e+09 ...
 $ range    : int  1379 937 555 562 562 555 545 2708 593 2354 ...
 $ x        : int  -997 -487 -1 230 139 -1 223 -2362 163 2017 ...
 $ y        : int  -883 -763 -536 -491 -525 -536 -477 1123 -549 1049 ...
 $ z        : int  357 243 144 145 146 144 141 701 153 609 ...
 $ ns       : int  378 72 72 98 115 72 41 31 44 32 ...
 $ area     : int  16579 2144 1270 1750 2061 1270 710 2668 829 2394 ...
 $ int      : num  0.96 0.82 1 0.999 0.969 1 1 0.816 1 1 ...
 $ max      : num  1 0.984 1 1 1 1 1 0.933 1 1 ...
 $ aspan    : int  69 28 36 40 44 36 40 13 12 8 ...
 $ rspan    : int  8 5 2 4 4 2 2 6 5 4 ...
 $ perim    : int  670 613 125 288 206 125 108 445 221 211 ...
 $ Dir      : num  1 1 1 2 1 1 2 1 2 1 ...
 $ bearing  : num  228 213 180 155 165 ...


now previously i have not mentioned these variable because i will be
removing them eventually.... 

when i run the above code.. i am getting this error message.. 

plot(dat$date, dat$height, xaxt="n") 
>   axis(1, at=new_data2$date[c(1,46376)],
+ labels=month.abb[ 1+as.POSIXlt(new_data2$date[c(1,46376)])$mon],
+  line=2, 
+ lwd=0)

Error in axis(1, at = new_data2$date[c(1, 46376)], labels = month.abb[1 +  : 
  no locations are finite
In addition: Warning message:
In axis(1, at = new_data2$date[c(1, 46376)], labels = month.abb[1 +  :
  NAs introduced by coercion

axis(1, at=new_data2$date, labels=as.POSIXlt(new_data2$date)$mday)
Error in axis(1, at = new_data2$date, labels =
as.POSIXlt(new_data2$date)$mday) : 
  no locations are finite
In addition: Warning message:
In axis(1, at = new_data2$date, labels = as.POSIXlt(new_data2$date)$mday) :
  NAs introduced by coercion

i am looking for an output same as the plot in the image below.. 
http://r.789695.n4.nabble.com/file/n3666468/graph.jpg 
y - axis is the mean passage rate ( total no. of birds /hr) 

i have read the posting guide as you have suggested..... 

thank you .. 

--
View this message in context: http://r.789695.n4.nabble.com/plotting-date-data-over-couple-of-months-tp3666298p3666468.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list