Learn R Programming

reader (version 1.0.6)

Suite of Functions to Flexibly Read Data from Files

Description

A set of functions to simplify reading data from files. The main function, reader(), should read most common R datafile types without needing any parameters except the filename. Other functions provide simple ways of handling file paths and extensions, and automatically detecting file format and structure.

Copy Link

Version

Install

install.packages('reader')

Monthly Downloads

3,237

Version

1.0.6

License

GPL (>= 2)

Maintainer

Nicholas Cooper

Last Published

January 3rd, 2017

Functions in reader (1.0.6)

classify.ext

Classify file types readable by standard R I/O functions.
cat.path

Simple and robust way to create full-path file names.
conv.fixed.width

Convert a matrix or dataframe to fixed-width for nice file output
force.vec

returns a vector if 'unknown.data' can in anyway relate to such:
file.ncol

Find the number of columns (lines) in a file.
force.frame

returns a dataframe if 'unknown.data' can in anyway relate to such:
column.salvage

Change column name in different form to desired form.
find.file

Search for a directory to add to the path so that a file exists.
find.id.col

Find which column in a dataframe contains a specified set of values.
file.nrow

Find the number of rows (lines) in a file.
get.delim

Determine the delimiter for a text data file.
get.ext

Get the file extension from a file-name.
reader-package

Suite of Functions to Flexibly Read Data from Files
reader

Flexibly load from a text or binary file, accepts multiple file formats.
parse.args

Function to collect arguments when running R from the command line
reader-internal

Internal reader Functions
rmv.ext

Remove the file extension from a file-name.
is.file

Test whether a file exists in a target directory, or alternative list of directories.
n.readLines

Read 'n' lines (ignoring comments and header) from a file.
shift.rownames

Shift the first column of a dataframe to rownames() if appropriate.