Hello: I am very new to "R", and I am trying to plot a large data set. I would like to get a line graph. My data looks like this in a csv file (no header): 07/03/23,05:00,23 07/03/23,06:00,32 07/03/23,07:00,33 07/03/23,08:00,25 07/03/23,09:00,26 07/03/23,10:00,21 07/03/23,11:00,23 07/03/23,12:00,24 07/03/23,13:00,25 07/03/23,14:00,29 07/03/23,15:00,23 07/03/23,16:00,23 TIA
?read.csv ?paste ?as.Date ?as.dataframe library(ggplot2) ?qplot On Sat, Sep 19, 2009 at 7:19 AM, Mag Gam <magawake at gmail.com> wrote:> Hello: > > I am very new to "R", and I am trying to plot a large data set. I > would like to get a line graph. My data looks like this in a csv file > (no header): > > 07/03/23,05:00,23 > 07/03/23,06:00,32 > 07/03/23,07:00,33 > 07/03/23,08:00,25 > 07/03/23,09:00,26 > 07/03/23,10:00,21 > 07/03/23,11:00,23 > 07/03/23,12:00,24 > 07/03/23,13:00,25 > 07/03/23,14:00,29 > 07/03/23,15:00,23 > 07/03/23,16:00,23 > > > TIA > > ______________________________________________ > 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. >-- Stephen Sefick Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis
stephen sefick wrote:> ?read.csv > ?paste > ?as.Date > ?as.dataframe > library(ggplot2) > ?qplot >Also: library(zoo) ?zoo Stefan
Mag Gam wrote:> Hello: > > I am very new to "R", and I am trying to plot a large data set. I > would like to get a line graph. My data looks like this in a csv file > (no header): > > 07/03/23,05:00,23 > 07/03/23,06:00,32 > 07/03/23,07:00,33 > 07/03/23,08:00,25 > 07/03/23,09:00,26 > 07/03/23,10:00,21 > 07/03/23,11:00,23 > 07/03/23,12:00,24 > 07/03/23,13:00,25 > 07/03/23,14:00,29 > 07/03/23,15:00,23 > 07/03/23,16:00,23 > > > TIA > > ______________________________________________ > 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.Let's see... dd <- read.csv("clipboard", header=F) dd names(dd)<- c("D","TOD","Y") dd$T <- as.POSIXct(paste(dd$D, dd$TOD), format="%y/%m/%d %H:%M") plot(Y~T,data=dd, type="b") -- O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907