Closed gadepallivs closed 11 months ago
Hi @gadepallivs ,
you could add your days to an arbitrary date to make date values:
``` r
library(vistime)
#> Warning: Paket 'vistime' wurde unter R Version 4.2.3 erstellt
data <- read.csv(text="group,event,start,end
Patient-1, diagnosis_window,0,15
Patient-1, treatment_windows,10,20
Patient-2, diagnosis_window,3,15
Patient-2, treatment_windows,5,20",
stringsAsFactors=FALSE)
data$start <- data$start + Sys.Date()
data$end <- data$end + Sys.Date()
gg_vistime(data) + ggplot2::scale_x_datetime(labels = NULL, breaks = NULL)
I also removed the x axis labels afterwards in this example.
Best regards sandro
my data does not have a time or date values for start and end. I have just numerical numbers for days, example below. This throws error,
is not of class 'POSIXct'
class is numeric. is there any way to approach this kind of data?