dipr provides an example of compressed fixed width file and a data dictionary. This data is from the dplyr package and contains no real personal information. These functions are modelled heavily of similar functions in the vroom package.

dipr_examples()

dipr_example(path)

Arguments

path

A path to the data file

Examples


## Get all available data files
dipr_examples()
#>  [1] "sample_hlth_dict.csv"             "starwars-csv.dat"                
#>  [3] "starwars-csv.dat.gz"              "starwars-csv2.dat"               
#>  [5] "starwars-csv2.dat.gz"             "starwars-dict-with-comments.nflt"
#>  [7] "starwars-dict.nflt"               "starwars-dict.txt"               
#>  [9] "starwars-fwf.dat"                 "starwars-fwf.dat.gz"             
#> [11] "starwars-fwf2.dat"                "starwars-fwf2.dat.gz"            

## Use that to find the path to a file
dipr_example("starwars-dict.txt")
#> [1] "/home/runner/work/_temp/Library/dipr/extdata/starwars-dict.txt"