
Intro to comma
comma.RmdImporting a matrix map from a spreadsheet
googleSheets_url <-
paste0(
"https://docs.google.com/spreadsheets/d/",
#"1p8R0M68ZX-G3unLeKnhQ2wZh-tK4o4Ua2BpN4jjJT68"
"16mpIyMC1ZFiq2kLKW6_cwJKqGIaKTNz2liLJaLehAqw"
);
CoMMaSpec <-
comma::CoMMaSpec_fromSpreadsheet(
googleSheets_url
);Converting to a contributors table
comma::contributorTable_from_CoMMaSpec(
CoMMaSpec,
output = tempFileToWrite1
);Add some contributions
contributorsTable <-
openxlsx::loadWorkbook(file = tempFileToWrite1);
openxlsx::writeData(
wb = contributorsTable,
sheet = "contributor_table",
startCol = 1,
startRow = 2,
x = matrix(c("Person 1", "1", "", "", "1", "", "", "1", rep("", 20), "1",
"Person 2", "", "1", "1", "", "", "1", "", rep("", 21)),
byrow = TRUE,
nrow = 2),
colNames = FALSE
);
openxlsx::saveWorkbook(
wb = contributorsTable,
file = tempFileToWrite2,
overwrite = TRUE
);Import the completed contributors table
contributorsTable_imported <-
comma::import_contributorTable(
tempFileToWrite2
);Convert contributions to CRediT
mappedContributions <-
comma::map_contributions(
tempFileToWrite2
);Show original contributions
knitr::kable(
contributorsTable_imported$contributor_table
);| Contributor | project_group | goals | synthesis_plans | entity_drafting | entity_feedback | entity_finalization | screening_procedure | exclusion_criteria | search_strategy | query_development | query_translation | preregistration | query_execution | query_hits_merging | search_grey | search_validation | deduplication | screening_packages | screening | screening_validation | screening_processing | extraction | extraction_author_contact | extraction_validation | extraction_processing | synthesis_preprocessing | synthesis_quality_assessment | synthesis | synthesis_validation | data_management | manuscript_first_draft | manuscript_review_editing | presentation_prepare | presentation_present |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Person 1 | TRUE | FALSE | FALSE | TRUE | FALSE | FALSE | TRUE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | TRUE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE |
| Person 2 | FALSE | TRUE | TRUE | FALSE | FALSE | TRUE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE |
cat(
comma::contributionParagraph_from_contributorTable(
contributorsTable_imported
)
);Person 1 contributed to Formal Analysis (‘Synthesis plans’ & ‘Synthesis analyses’), Methodology (‘First entity draft’, ‘Entity feedback’, ‘Entity finalization’, ‘Screening procedure’, ‘Search Strategy’ & ‘Preparing screening packages’), Project administration (‘Project-group formation’, ‘Preregistration’, ‘Communicating with authors’, ‘Prepare a presentation’ & ‘Give a presentation’), and to Visualization (‘Synthesis analyses’). Person 2 contributed to Conceptualization (‘Defining research goals’, ‘Exclusion criteria’ & ‘Query development’), Formal Analysis (‘Synthesis plans’ & ‘Synthesis analyses’), and to Methodology (‘First entity draft’, ‘Entity feedback’, ‘Entity finalization’, ‘Screening procedure’, ‘Search Strategy’ & ‘Preparing screening packages’).
Show converted contributions
knitr::kable(
mappedContributions$contributor_table
);| Contributor | conceptualization | data_curation | formal_analysis | funding_acquisition | investigation | methodology | project_administration | resources | software | supervision | validation | visualization | writing_original_draft | writing_review_editing |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Person 1 | FALSE | FALSE | TRUE | FALSE | FALSE | TRUE | TRUE | FALSE | FALSE | FALSE | FALSE | TRUE | FALSE | FALSE |
| Person 2 | TRUE | FALSE | TRUE | FALSE | FALSE | TRUE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE | FALSE |
cat(
comma::contributionParagraph_from_contributorTable(
mappedContributions
)
);Person 1 contributed to Formal Analysis (‘NA’ & ‘NA’), Methodology (‘NA’, ‘NA’, ‘NA’, ‘NA’, ‘NA’ & ‘NA’), Project administration (‘NA’, ‘NA’, ‘NA’, ‘NA’ & ‘NA’), and to Visualization (‘NA’). Person 2 contributed to Conceptualization (‘NA’, ‘NA’ & ‘NA’), Formal Analysis (‘NA’ & ‘NA’), and to Methodology (‘NA’, ‘NA’, ‘NA’, ‘NA’, ‘NA’ & ‘NA’).
Show both, generic first
cat(
comma::contributionParagraph_from_contributorTable(
contributorsTable_imported
)
);Person 1 contributed to Formal Analysis (‘Synthesis plans’ & ‘Synthesis analyses’), Methodology (‘First entity draft’, ‘Entity feedback’, ‘Entity finalization’, ‘Screening procedure’, ‘Search Strategy’ & ‘Preparing screening packages’), Project administration (‘Project-group formation’, ‘Preregistration’, ‘Communicating with authors’, ‘Prepare a presentation’ & ‘Give a presentation’), and to Visualization (‘Synthesis analyses’). Person 2 contributed to Conceptualization (‘Defining research goals’, ‘Exclusion criteria’ & ‘Query development’), Formal Analysis (‘Synthesis plans’ & ‘Synthesis analyses’), and to Methodology (‘First entity draft’, ‘Entity feedback’, ‘Entity finalization’, ‘Screening procedure’, ‘Search Strategy’ & ‘Preparing screening packages’).