Skip to content
Prev 295053 / 398506 Next

default plot, but stripes appear (and other plot problems)

On May 19, 2012, at 12:36 PM, bets wrote:

            
Below you offer two examples of console output without naming the  
objects from which they came or the code you are attempting to us.  
(Also in the all-to-typical manner of those posting through Nabble  
youexpect us to refer to early postings rather than including context.  
Presumably you are making implicit reference to an effort to using  
this code:

plot(ID, settlepw$T.local, type="l",ylab="Temperature(?C)", xlab="")
There is no "ID" variable, so that coe should fail. If the goal were  
to use that first columns as a Date field then you would need to  
convert it to a date class.

settlepw$ID <- as.Date(settlepw$Datum, "%y/%m/%d")
plot(day, hatch$T.local, type="l", ylab="", ylim=c(15,25), xlab=" ")

That one may require that you present an appropriate vector of month  
abbreviations for you language. I am a langauge weenie and only have  
English and a bit of German in my repetoire. My installation of R only  
has the built-in variable:

  month.abb
  [1] "Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" "Sep" "Oct"  
"Nov" "Dec"

Maybe there is a format that will do what you need. See:

?strptime

Reading that help page suggests there may be support for locale- 
specific abbreviations, so you could try:

hatch$day2 <- as.Date(hatch$datum, "%d-%b-%y")
--


David Winsemius, MD
West Hartford, CT