I have a list that when I print in the console looks like a dataframe. I want to be able to convert this list to a dataframe (with 7 rows and 2 columns) but I am not sure how to. When I unlist this object it just starts to get even messier.
library('gmailr')
my_messages <- gm_messages(serch ="a",num_results =7)
length(my_messages)
my_messages
glimpse(my_messages)
How do I create a 7x2 dataframe that looks exactly like it does in the console from a list that's structured like it is currently?
Have you tried calling
The idea is to apply unlist an each row/message, then to convert it to a dataframe and finally to transpose the whole dataframe. Let me know, if this helps.