So I have the following data. In this dataframe I have a username, date, and a list of packages. My goal is to transform that column packages into a format I can analyze.
> print(data_example)
# A tibble: 4 x 3
username date packages
<chr> <chr> <chr>
1 John 1/5/2015 "compiler 4.1.2, magrittr 2.0.1, ellipsis 0.3.2, tools 4.1.2, pillar 1.6.4"
2 Karen 1/5/2015 "compiler 4.1.2, tools 4.1.2\""
3 Mike 1/5/2015 "evaluate 0.14, highr 0.9, httr 1.4.2, pillar 1.6.4, rlang 0.4.12"
4 Zoe 1/6/2015 "httr 1.4.2, viridisLite 0.4.0, jsonlite 1.7.2, splines 4.1.2"
I tried doing something like this but this doesn't really give me much value.
packages <- as.list(parsed_log$packages)
My goal would be to try doing a "pivot longer" and get an outcome like this? I'm not sure if this is the best way to analyze this kind of data.
username date packages
John 1/5/2015 compiler 4.1.2
John 1/5/2015 magrittr 2.0.1
John 1/5/2015 ellipsis 0.3.2
John 1/5/2015 tools 4.1.2
ect...