Learn R Programming

strvalidator (version 1.5.2)

import: Import Data.

Description

Import text files and apply post processing.

Usage

import(folder = TRUE, extension = "txt", suffix = NA, prefix = NA,
  import.file = NA, folder.name = NA, file.name = TRUE,
  time.stamp = TRUE, separator = "\t", ignore.case = TRUE,
  auto.trim = FALSE, trim.samples = NULL, trim.invert = FALSE,
  auto.slim = FALSE, slim.na = TRUE, debug = FALSE)

Arguments

folder
logical, TRUE all files in folder will be imported, FALSE only selected file will be imported.
extension
string providing the file extension.
suffix
string, only files with specified suffix will be imported.
prefix
string, only files with specified prefix will be imported.
import.file
string if file name is provided file will be imported without showing the file open dialogue.
folder.name
string if folder name is provided files in folder will be imported without showing the select folder dialogue.
file.name
logical if TRUE the file name is written in a column 'File.Name'. NB! Any existing 'File.Name' column is overwritten.
time.stamp
logical if TRUE the file modified time stamp is written in a column 'Time'. NB! Any existing 'Time' column is overwritten.
separator
character for the delimiter used to separate columns (see 'sep' in read.table for details).
ignore.case
logical indicating if case should be ignored. Only applies to multiple file import option.
auto.trim
logical indicating if dataset should be trimmed.
trim.samples
character vector with sample names to trim.
trim.invert
logical indicating if samples should be keept (TRUE) or removed (FALSE).
auto.slim
logical indicating if dataset should be slimmed.
slim.na
logical indicating if rows without data should remain.
debug
logical indicating printing debug information.

Value

  • data.frame with imported result.

Details

Imports text files (e.g. GeneMapper results exported as text files) as data frames. Options to import one or multiple files. For multiple files it is possible to specify prefix, suffix, and file extension to create a file name filter. The file name and/or file time stamp can be imported. NB! Empty strings ("") and NA strings ("NA") are converted to NA. See list.files and read.table for additional details.

See Also

trim, slim, list.files, read.table