openFilesInDirectory: Loads and combines files in a folder that match a specified...

Description Usage Arguments Value

View source: R/miscUtils.R

Description

Returns either a list containing all loaded files, or a data frame containing merged loaded files

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
openFilesInDirectory(
  dir,
  match_string,
  merge = FALSE,
  sep = ",",
  na.strings = "NA",
  header = T,
  fill = T,
  quote = "\"",
  skip = 0
)

Arguments

dir

the directory in which to search for files

match_string

all files whose names grep match this string will be loaded

merge

T/F should loaded files be merged into a data frame

sep

field separator character

na.strings

a character vector of strings whic are to be interpreted as NA values

header

a T/F value indicating whether the file contains the names of the variables as its first line. If missing, the value is determined from the file format: header is set to TRUE if and only if the first row contains one fewer field than the number of columns.

fill

T/F If TRUE then in case the rows have unequal length, blank fields are implicitly added

quote

Character indicating characters to use for quote argument in read.table

skip

the number of lines of the data file to skip before beginning to read data

Value

a list or data frame containing load data from all files matching match_string in directory


kikapp/kikapputils documentation built on May 24, 2021, 10:41 p.m.