How to plot a list ?

I am newbie to R (sutdio).
I would like to plot the following dataframe, which contains lists for the insid variable:

The variable FixedTime is the x axis
I'd want that each id in the insid variable be plotted on th y axis.

How can i do that?
I ve been scratching my head for hours but didt find the solution.

Thanks in advance.


are you hoping to summarise the ID information in some way ? like making a histogram to count the volumes of them in each time period ?

the idea of directly plotting ID's seems highly unusual/unlikely...

I think you want to unnest your list first.


dat = tibble(
  x = c("a", "b"),
  y = list(c(1,2,3), c(2,3,4))

#> # A tibble: 2 x 2
#>   x     y        
#>   <chr> <list>   
#> 1 a     <dbl [3]>
#> 2 b     <dbl [3]>

dat |> 
  unnest(y) |> 
  ggplot(aes(x = x, y = y)) +

Created on 2021-12-13 by the reprex package (v2.0.1)

Hello nirgrahamuk.
Agree that this is no summary for the moment but this is a starting point to analyze log files for an internal software that fails sometime and we need to know why.


Hi Jack.

Thanks a lot. It works well.


This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.