[R] values in date format from .xls as label on x-line
randolf at balasus.eu
Mon Sep 7 13:19:20 CEST 2015
hello , I am very new to R, till now I was working with lineplots reading
their data from .xls files. All was working as expected,
now I want to label the data-values with "date"-values on the x line. But I
have absolute no clue how to read and interprete these values as date-values
not just only integer, I was testing and searching solutions with the
convert function. I hop I just need only one or two modifications in my
code, and all is working. Any Ideas?
this is my testcode, and the example values in the .xls, (with integer
values, all is working correctly.)
wb = loadWorkbook("C:/xlsfile.xls")
impdata = readWorksheet(wb, sheet = "Data", header = TRUE)
datec(c) <- as.Date(impdata$date, "%d.%m.%y")
plot(datec,impdata$amount, main="amount year to date",type="n", ylab="Eur",
xlab="year to date",ylim=c(1,6000))
lines(datec,impdata$amountmount, col = "steelblue")
THANX in advance for your help.
View this message in context: http://r.789695.n4.nabble.com/values-in-date-format-from-xls-as-label-on-x-line-tp4711949.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help