Skip to contents

Import a contributors table from a spreadsheet

Usage

import_contributorTable(
  x,
  localBackup = NULL,
  exportGoogleSheet = TRUE,
  xlsxPkg = c("openxlsx", "rw_xl", "XLConnect"),
  silent = comma::opts$get("silent")
)

Arguments

x

The URL or path to a file.

localBackup

If not NULL, a valid filename to write a local backup to.

exportGoogleSheet

If x is a URL to a Google Sheet, instead of using thr googlesheets4 package to download the data, by passing exportGoogleSheet=TRUE, an export link will be produced and the data will be downloaded as Excel spreadsheet.

xlsxPkg

Which package to use to work with Excel spreadsheets.

silent

Whether to be silent or chatty.

Value

The contribution table

Examples

### Locate the example file
exampleContribTable <-
  system.file(
    "extdata",
    "contributor-matrix---example.ods",
    package = "comma"
  );

### Import the contribution table
contribTable <-
  comma::import_contributorTable(
    exampleContribTable
  );

### Show some contributions
contribTable$contributor_table[, 1:10];
#>                       Contributor project_group goals synthesis_plans
#> 1                   PhD Candidate          TRUE  TRUE            TRUE
#> 2                    Supervisor 1          TRUE  TRUE            TRUE
#> 3                    Supervisor 2          TRUE  TRUE            TRUE
#> 4 Supervisor 3 (daily supervisor)          TRUE  TRUE            TRUE
#>   entity_drafting entity_feedback entity_finalization screening_procedure
#> 1            TRUE           FALSE                TRUE                TRUE
#> 2           FALSE            TRUE               FALSE                TRUE
#> 3           FALSE            TRUE               FALSE                TRUE
#> 4           FALSE            TRUE                TRUE                TRUE
#>   exclusion_criteria search_strategy
#> 1               TRUE            TRUE
#> 2               TRUE            TRUE
#> 3               TRUE            TRUE
#> 4               TRUE            TRUE