I am trying to plot a line graph in R of Roll against time with RSudio. The X and Y values are correct but the entire graph is Black
mru <- read.csv("E:/r-train/mru.txt", header = TRUE, sep = ",")
attach(mru)
plot( time, p1)
Time,r1,p1,h1,r2,p2,h2,r3,p3,h3
14:07:32,-0.08,0.41,0,-0.45,0.8145,1.4436,0.46,-0.06,0
14:07:33,-0.07,0.41,0,-0.459,0.8001,1.4436,0.46,-0.06,0
I also tried to format the time mru <- read.csv("E/r-train/mru.txt", header = TRUE, sep = ",", format='%H:%M:%S')
and got the same result.
Also tried this: and it did not work
mru <- read.csv("E:/r-train/mru.txt", header = TRUE, sep = ",", as.is = TRUE)
mru[,1] <- as.POSIXct(strptime(mru[,1],"%H:%M:%S"))
plot(Time, h1)
Because it does this:
$ Time: POSIXct, format: "2015-03-26 14:07:00" "2015-03-26 14:07:00" "2015-03-26 14:07:00" "2015-03-26 14:07:00" ...
$ r1 : chr "-0.08" "-0.07" "-0.07" "-0.07" ...