[R] (with subject)

Felipe Carrillo mazatlanmexico at yahoo.com
Thu Sep 4 22:27:16 CEST 2008


Is this what you want?

 library(ggplot2)
rawData <- data.frame(Date = c("2008-03-01", "2008-03-21", "2008-03-23",
"2008-04-08", "2008-04-20", "2008-05-10", "2008-06-20"), y = c(4, 6,8, 5, 7, 2 ,1))
 rawData$Date <- as.Date(rawData$Date)
 qplot(Date,y,data=rawData,geom="line",xlim=c(as.Date("2008-1-1"),as.Date("2008-12-1")))

--- On Thu, 9/4/08, Dr Eberhard W Lisse <el at lisse.na> wrote:

> From: Dr Eberhard W Lisse <el at lisse.na>
> Subject: Re: [R] (with subject)
> To: r-help at r-project.org
> Cc: "Dr Eberhard W Lisse" <el at lisse.na>
> Date: Thursday, September 4, 2008, 12:15 PM
> Dirk, Gabor,
> 
> thanks for your advice, I have now tried to study these
> vignettes, but I must say, as an aging Gynecologist,
> I am facing an enormous learning curve :-)-O.
> 
> This works nicely:
> 
> rawData <- data.frame(x = c("2008-03-01",
> "2008-03-21", "2008-03-23",  
> "2008-04-08", "2008-04-20",
> "2008-05-10", "2008-06-20"), y = c(4, 6,
>  
> 8, 5, 7, 2 ,1))
> rawData[,"x"] <-
> as.Date(rawData[,"x"])
> with(rawData, plot(x, y, main="Some text",
> type='l'))
> 
> How do I make the X-Axis start on 2008-01-01, end on
> 2008-12-31,
> with tick marks for every month (ie month.abb[1:12] or
> something
> similar)?
> 
> A pointer is enough, weekend is coming up and I am off
> :-)-O
> 
> I also need to add 2 lines statements, but I reckon I can
> figure that  
> out
> by myself :-)-O
> 
> 
> greetings, el
> --
> Dr. Eberhard W. Lisse  \        / Obstetrician &
> Gynaecologist (Saar)
> el at lisse.NA el108-ARIN /   *   |   Telephone: +264 81 124
> 6733 (cell)
> PO Box 8421             \     / Please send DNS/NA-NiC
> related e-mail
> Bachbrecht, Namibia     ;____/             to
> dns-admin at na-nic.com.na
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained,
> reproducible code.



More information about the R-help mailing list