r - Unable to convert WikipediaR package object to dataframe -


wikipediar package offers great function list page's contributors.

package configuration

install.packages("wikipediar") library (wikipediar)  

collecting contribs r'page

contribs_r_page <-  contribs(domain = "fr", page = "r") 

the problem: how convert object contribs_r_page in data.frame?

str (contribs_r_page)  list of 4  $ call        : language contribs(page = "r", domain = "fr")  $ contribs    :'data.frame':   219 obs. of  3 variables:  ..$ user     : factor w/ 143 levels "0x010c","109.213.170.237",..: 87 73  121 9 121 64 11 81 47 121 ...  ..$ userid   : factor w/ 111 levels "0","1017","1019240",..: 97 86 28 1 28 50 1 44 7 28 ...  ..$ timestamp: factor w/ 219 levels "2004-02-09t19:44:05z",..: 219 218 217 216 215 214 213 212 211 210 ...    $ page        : named chr [1:3] "0" "50889" "fr"   ..- attr(*, "names")= chr [1:3] "ns" "_idx" ""   $ testwikipage:list of 4  ..$ takeonlyfirst: logi false  ..$ redirpage    : null  ..$ test         : num 0  ..$ warnmessage  : null  - attr(*, "class")= chr "contribsclass" 

what tried:

contribs_r_page_df <- as.data.frame.list (contribs_r_page) 

from str output can see contribs_r_page list object contains data.frame named contribs, can access below:

contribs_r_page$contribs 

Comments