0
我有POSIXct fomat的數據框。我需要製作我擁有的四個柱子的盒子圖,但它不起作用。如何使用POSIXct格式的數據框製作boxplot
Site.1350 Site.1700 Site.2000 Site.2300
15:15:08 15:29:08 15:32:50 15:34:12
15:02:32 15:23:43 15:21:06 15:34:50
14:40:34 14:58:30 15:21:06 15:32:50
15:15:08 15:29:08 15:21:06 15:34:50
15:10:03 14:58:30 15:30:01 15:34:12
15:23:43 15:19:42 15:30:01 15:34:00
14:56:24 15:29:08 15:21:06 15:34:50
15:15:08 14:58:30 15:24:56 15:34:50
15:15:08 14:58:30 15:32:50 15:34:12
14:56:24 14:42:57 15:32:50 15:34:50
14:56:24 14:47:35 15:21:06 15:30:01
14:56:24 15:23:43 15:24:56 15:34:12
15:15:08 14:49:51 15:30:01 15:34:12
15:02:32 15:32:50 15:30:01 15:27:10
15:10:03 15:29:08 15:34:12 15:34:12
這裏是我使用的代碼:
DF <- read.csv2(file="Photoperiod.csv")
DF$Site.1350 <-as.POSIXct(DF$Site.1350 , format = "%H:%M:%S")
DF$Site.1700 <-as.POSIXct(DF$Site.1700 , format = "%H:%M:%S")
DF$Site.2000 <-as.POSIXct(DF$Site.2000 , format = "%H:%M:%S")
DF$Site.2300 <-as.POSIXct(DF$Site.2300 , format = "%H:%M:%S")
boxplot(DF)
https://stackoverflow.com/questions/11346880/r-plot-multiple-box-plots-using-columns-from-data-框架 –
@ s.brunel我知道如何用ggplot製作boxplot,但是我的問題與我的數據框的格式有關。 – Mori
也許這只是你的代碼:DF $ Site.1350 <-as.POSIXct(DF $ Site.1350,format =「%H:%M:%S」)由DF $ Site.1350 <-as。 POSIXct(DFSite.1350,format =「%H:%M:%S」)???那是什麼阻止你回來? –