read_eval: Read insteval data from directory

Description Usage Arguments Value Examples

View source: R/read_eval.R

Description

Reads all CSV-files from a given directory and returns all data in a single list

Usage

1
2
read_eval(path = NULL, names = NULL, pattern = NULL, recursive = FALSE,
  shiny = FALSE)

Arguments

path

If NULL, the user is prompted to choose the file(s) interactively; this is only available on Windows. Otherwise, a character vector containing path name(s), pointing to the CSV-files. The files probably have names ending with "evaluationen.csv". It's safer to put only those files in the directory and no other files.

names

Optional character vector supplying the names of the courses. Number of elements must match the number of files.

pattern

An optional regular expression passed to list.files. Can be used to read data only from files with a matching filename.

recursive

Logical passed to list.files. Should the file seach recurse into directories?

shiny

Logical. For internal use only.

Value

List of data frames.

Examples

1
2
3
4
5
6
7
## Not run: 
dat1 <- read_eval()

# Specify own names and read only files matching a specific pattern
dat1 <- read_eval("./data", names = c("Lab1", "Lab2"), pattern = "lab")

## End(Not run)

hplieninger/instevalR documentation built on May 17, 2019, 4:54 p.m.