read_Citavi_xlsx: Import Excel files created via Citavi Export

View source: R/read_Citavi_xlsx.R

read_Citavi_xlsxR Documentation

Import Excel files created via Citavi Export

Description

Import Excel files created via Citavi Export

Usage

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.

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.

Value

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

Examples

example_path <- example_file("3dupsin5refs.xlsx") # use this package's example xlsx file
read_Citavi_xlsx(example_path)

## Not run: 
CitDat <- read_Citavi_xlsx("data/yourCitaviExport.xlsx")

## End(Not run)


SchmidtPaul/CitaviR documentation built on Jan. 31, 2023, 5 a.m.