Skip to contents

Flexible file import based on extension

Usage

read_input(file, consider.na = c("NA", "\"\"", ""))

Arguments

file

file name

consider.na

character vector of strings to consider as NAs

Value

tibble

Examples

read_input("https://raw.githubusercontent.com/agdamsbo/cognitive.index.lookup/main/data/sample.csv")
#>    id ab age imm vis ver att del
#> 1   1  1  74  38  35  30  29  35
#> 2   1  2  69  36  36  21  27  37
#> 3   2  1  63  32  31  26  34  38
#> 4   2  2  64  37  34  26  36  46
#> 5   3  1  69  39  33  31  47  29
#> 6   3  2  70  40  36  31  46  25
#> 7   4  1  79  44  37  20  37  36
#> 8   4  2  81  35  36  31  37  40
#> 9   5  1  77  35  26  17  20  36
#> 10  5  2  80  29  34  18  23  36
#> 11  6  1  67  47  38  29  52  40
#> 12  6  2  70  49  35  30  52  50
#> 13  7  1  69  37  36  21  28  38
#> 14  7  2  74  27  32  16  28  27
#> 15  8  1  67  26  31  24  42  38
#> 16  8  2  63  25  33  21  42  38
#> 17  9  1  73  34  31  27  40  34
#> 18  9  2  70  35  31  32  36  42
#> 19 10  1  59  43  35  29  46  38
#> 20 10  2  63  49  37  36  39  39
#> 21 11  1  62  45  37  30  54  40
#> 22 11  2  66  41  39  41  42  37
#> 23 12  1  80  47  34  32  49  42
#> 24 12  2  76  45  28  27  41  46
#> 25 13  1  69  17  30  17  23  27
#> 26 13  2  71   8  29  16  10  15
#> 27 14  1  71  42  37  26  33  41
#> 28 14  2  75  33  37  27  34  40