I'm having trouble restructuring data from the rwars package into a
dataframe. Can someone help me?

Here's what I have...

library("rwars")
library("tidyverse")

# These data are json, so they load into R as a list
people <- get_all_people(parse_result = T)
people <- get_all_people(getElement(people, "next"), parse_result = T)

# Look at Anakin Skywalker's data
people$results[[1]]
people$results[[1]][1] # print his name

# To use them in R, I need to restructure them to a dataframe like they are
in dplyr
data("starwars")
glimpse(starwars)

Thanks for the help.

Cheers,
MVS
=====
Matthew Van Scoyoc
=====
Think SNOW!

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to