0

I have a dat frame called crimeLARaw_tbl_final.

One of the columns called location_1.coordinates, is a ‘list’ data type column which contains a list of values:

location_1.coordinates

c(-118.3157, 34.0454)

c(-118.2717, 34.001)

c(-118.2671, 34.0294)

c(-118.4517, 33.967)

How could I bring each value in the list to its own column?

 long           lat

-118.3157      34.0454

-118.2717      34.001

-118.2671      34.0294

-118.4517      33.967

I have tried with dplyr and stringr but not getting anywhere.

Thank you

Pablo Ugarte
  • 35
  • 1
  • 8
  • 1
    `do.call(rbind, your_list)` – Sotos Sep 07 '17 at 09:54
  • @Sotos Is there anyway of doing this with dplyr and stringr? – Pablo Ugarte Sep 07 '17 at 10:02
  • I added another [link](https://stackoverflow.com/questions/2851327/convert-a-list-of-data-frames-into-one-data-frame) to the dupe. It has a lot of ways of doing it including the `bind_rows` from `dplyr` – Sotos Sep 07 '17 at 10:04

0 Answers0