Import Excel files created via Citavi Export

read_Citavi_xlsx(
  path = NULL,
  keepMarksCols = TRUE,
  useYearDerived = TRUE,
  setSuggestedColOrder = TRUE,
  setSuggestedColTypes = TRUE,
  ...
)

Arguments

path

Path to the xls/xlsx file created with Citavi via export to Excel.

keepMarksCols

If TRUE (default) it will keep and rename the first three nameless columns of the imported excel file. These columns are automatically created by the Citavi export and contain information about the attachment/paper-clip marker, the red flag marker and the blue circle marker. If kept, the columns are renamed has_attachment, red_flag and blue_circle. If FALSE, these three columns are deleted.

useYearDerived

If TRUE (default) the special column "Year derived" (DE: "Jahr ermittelt") is renamed to "Year" and thus replaces the original basic column "Year" which may have also been created via the Citavi export.

setSuggestedColOrder

If TRUE (default) columns a reordered in a suggested order.

setSuggestedColTypes

If TRUE (default) the col_types = argument of readxl::read_excel() is used. Each column's col_types is automatically determined by matching its name via an internal dataset (data-raw/field_translations.xlsx). Especially when the first entries of any column are empty, this can prevent the issue that occurs when column guessing goes wrong.

...

Other arguments passed to the readxl::read_excel() function.

Value

A tibble containing the information of the xls/xlsx file that was created with Citavi via export to Excel.

Details

[Maturing]
Currently this only works for files that were generated while Citavi was set to "English" so that column names are "Short title" etc.

Examples

example_path <- example_file("3dupsin5refs.xlsx") # use this package's example xlsx file read_Citavi_xlsx(example_path)
#> # A tibble: 5 x 19 #> ID Title Year `Short title` Author Categories Groups Abstract `DOI name` #> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> #> 1 7e04d~ Estim~ 2019 Schmidt, Har~ Schmi~ 1 catA Googl~ Broad-s~ 10.2135/c~ #> 2 2481c~ Herit~ 2019 Schmidt, Har~ Schmi~ 1 catA Googl~ In plan~ 10.1534/g~ #> 3 db3ab~ Herit~ 2019 Schmidt, Har~ Schmi~ 2 catB PubMed In plan~ NA #> 4 ba575~ Hrita~ 2019 Schmidt, Har~ Schmi~ 1 catA TypoDB In plan~ 10.1534/g~ #> 5 fa402~ More,~ 2018 Schmidt, Möh~ Schmi~ 2 catB Googl~ Traditi~ 10.2135/c~ #> # ... with 10 more variables: PubMed ID <chr>, Online address <chr>, #> # Periodical <chr>, Volume <chr>, Number <chr>, Page range <chr>, #> # Locations <chr>, has_attachment <lgl>, red_flag <lgl>, blue_circle <lgl>
if (FALSE) { CitDat <- read_Citavi_xlsx("data/yourCitaviExport.xlsx") }