What is the optimum way for creating a data frame from a nested list.
#installing package
installed.packages("qdap")
#loading qdap package
library("qdap")
# Finding synonyms from the below function which gives a list.
data <- synonyms("power")
# Converting list to dataframe
plyr::ldply(data, cbind)
t(plyr::ldply(data, rbind))
At last, I would like to create multiple data frame. from the output of:
synonyms(c("taste","company","power"))
list output looks alike using dput()
structure(list(power.def_1 = c("ability", "capability", "capacity",
"competence", "competency", "faculty", "potential"), power.def_2 = c("brawn",
"energy", "force", "forcefulness", "intensity", "might", "muscle",
"potency", "strength", "vigour", "weight"), power.def_3 = c("ascendancy",
"authority", "bottom", "command", "control", "dominance", "domination",
"dominion", "influence", "mastery", "rule", "sovereignty", "supremacy",
"sway"), power.def_4 = c("authority", "authorization", "licence",
"prerogative", "privilege", "right", "warrant")), .Names = c("power.def_1",
"power.def_2", "power.def_3", "power.def_4"))
dput().