Skip to contents

This is an internal function that you normally don't use.

Usage

map_contributions(contributions, mapping = NULL)

Arguments

contributions

Either a URL to a (publicly vieweable) Google sheet or the path to a file, in any case holding a contributors table; or an already imported contributors table (with import_contributorTable()). If this contributors table contains an embedded matrix map, the mapping argument can be omitted.

mapping

Either a URL to a (publicly vieweable) Google sheet or the path to a file, in any case holding a matrix map; or an already imported matrix map (with CoMMaSpec_fromSpreadsheet()). This argument can be omitted if the contributors table contains an embedded matrix map.

Value

The object with mapped contributions

Examples

### First we load an included CoMMa spec repo

### Get included repo location
repoPath <-
  system.file(
    "CoMMa-spec-repo",
    "CoMMa-specs.yml",
    package = "comma"
  );

### Import repo
importedRepo <-
  comma::import_comma_repo(
    repoPath
  );

### Then we get one CoMMa spec
example_CoMMa_spec <-
  importedRepo$CoMMa_specs[[
    "comma-spec-general-systematic-review"
  ]];

### Then we produce the contribution table
contribTable <-
  comma::contributorTable_from_CoMMaSpec(
    example_CoMMa_spec
  );

### Map the contributions
mappedContribs <-
  comma::map_contributions(
    contribTable
  );

### Show how the specific items collapse
### into the generic ones:
mappedContribs$contributionsToCollapse;
#> $conceptualization
#> [1] "goals"              "exclusion_criteria" "query_development" 
#> 
#> $data_curation
#> [1] "query_execution"              "search_grey"                 
#> [3] "deduplication"                "screening"                   
#> [5] "synthesis_quality_assessment"
#> 
#> $formal_analysis
#> [1] "synthesis_plans" "synthesis"      
#> 
#> $funding_acquisition
#> [1] NA
#> 
#> $investigation
#> [1] "extraction"
#> 
#> $methodology
#> [1] "entity_drafting"     "entity_feedback"     "entity_finalization"
#> [4] "screening_procedure" "search_strategy"     "screening_packages" 
#> 
#> $project_administration
#> [1] "project_group"             "preregistration"          
#> [3] "extraction_author_contact" "presentation_prepare"     
#> [5] "presentation_present"     
#> 
#> $resources
#> [1] "data_management"
#> 
#> $software
#> [1] "query_translation"       "query_hits_merging"     
#> [3] "screening_processing"    "extraction_processing"  
#> [5] "synthesis_preprocessing"
#> 
#> $supervision
#> [1] NA
#> 
#> $validation
#> [1] "search_validation"     "screening_validation"  "extraction_validation"
#> [4] "synthesis_validation" 
#> 
#> $visualization
#> [1] "synthesis"
#> 
#> $writing_original_draft
#> [1] "manuscript_first_draft"
#> 
#> $writing_review_editing
#> [1] "manuscript_review_editing"
#>