Flatten all sources' Rxs trees to a wide data frame (somewhat brutally)

flattenRxsProject_to_wideDf(x, silent = metabefor::opts$get("silent"))

Arguments

x

The full Rxs Project object (i.e. the parsed Rxs files)

silent

Whether to be silent or chatty.

Value

A data frame

Examples

### Load example project
example_rxsProject_1 <- metabefor::example_rxsProject_1;

### Flatten it
exampleDf <-
  flattenRxsProject_to_wideDf(
    example_rxsProject_1
  );

### Show the result (which works because there are only two studies
### and very few entities; normally not recommended)
exampleDf
#>      rxs__source source general publicationYear  sourceAuthors
#> 1 qurid_7h50rzpq   <NA>    <NA>            2022 Tiffany Aching
#> 2 qurid_7h50rzmz   <NA>    <NA>            2021   Samuel Vimes
#>                                 sourceTitle          modeInfo methods sample
#> 1           Ten lifehacks with a frying pan Lots of more info    <NA>   <NA>
#> 2 Boots' theory of socioeconomic unfairness              <NA>    <NA>   <NA>
#>   sampleSize                             samplingStrategy       method
#> 1          1 Wandering the hillsides and collecting sheep  Qualitative
#> 2          2                       Patrolling the streets Quantitative
#>   variables                  chalk               witches               crayons
#> 1      <NA> 'chalk' & 'Continuous' 'witches' & 'Nominal' 'crayons' & 'Nominal'
#> 2      <NA>                   <NA>                  <NA>                  <NA>
#>               instruments associations
#> 1 Pans, hooks, ropes, etc         <NA>
#> 2                    <NA>         <NA>
#>                                       chalk_and_witches       filename
#> 1 'chalk_and_witches', 'chalk', 'witches', '0.8' & 'NA' qurid_7h50rzpq
#> 2                                                  <NA> qurid_7h50rzmz
#>                 criminals               cops
#> 1                    <NA>               <NA>
#> 2 'criminals' & 'Nominal' 'cops' & 'Ordinal'
#>                                         criminals_and_cops
#> 1                                                     <NA>
#> 2 'criminals_and_cops', 'criminals', 'cops', '-0.3' & 'NA'