Function strptime() will convert the date-time character string to a POSIXct
object that you can use in your plot. In general, when posting a query to
r-help:
1. Do not use html, only plain text (see what happened to
your data below.
2. Use dput() to convert your data to a format that is easy
to import from an email message.
----------------------------------------------
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of John Jeffery
> Sent: Saturday, December 22, 2012 5:47 PM
> To: r-help at r-project.org
> Subject: [R] Character Variable in X axis scatter plot
>
>
> I am very new to R statistics.
> Have installed R-2.15.2 ; Rcmdr 1.9-2 ; RStudio 0.97.237 on Debian
> Squeeze and also windows7
>
> I can Import from Excel File OK
>
> .Workbook <-
loadWorkbook("/media/4C90-B739/Oct13-Dec21Bsl.xls")
> JJData <- readWorksheet(.Workbook, "Oct13-Dec21Bsl")
> remove(.Workbook)
>
> have a data frame with following.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> DATEEVENT
> AdjDateTime
> TIMESLOT
> EVENTTYPE
> KEY0
> BSLmmol/L
>
>
> 41195.3027777778
> 13/10/2012 7:16
> 1
> 1
> 278
> 15.44
>
>
> 41195.4909722222
> 13/10/2012 11:47
> 2
> 1
> 327
> 18.17
>
>
> 41196.3666666667
> 14/10/2012 8:48
> 1
> 1
> 246
> 13.67
>
>
> 41196.4923611111
> 14/10/2012 11:49
> 2
> 1
> 353
> 19.61
>
>
> 41196.6416666667
> 14/10/2012 15:24
> 4
> 1
> 204
> 11.33
>
>
> 41197.2965277778
> 15/10/2012 7:07
> 1
> 1
> 244
> 13.56
>
>
> 41197.2979166667
> 15/10/2012 7:09
> 1
> 1
> 237
> 13.17
>
>
>
>
>
> want to plot adjDateTime on x-axis versus BSLmmol/L on Y-axis
>
> How do I use Character variable "AdjDateTime" as X-variable axis
on
> scatter plot.
> Thanks and regards John Jeffery
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.