auxfunc: Auxiliary functions

Description Usage Arguments Value Error messages

Description

Short-hand functions for retriving file information such as number of columns or rows, or picking the first column (relevant if this contains IDs).

get_ncols returns number of columns.

get_nlines returns number of lines.

get_firstcolumn is a wrapper for read.table that allows the user to easily get the first column(s) by padding colClasses with "NULL" character elements to skip columns.

Usage

1
2
3
4
5

Arguments

file

Filename or connection to read from.

fn

Filename.

class

Character vector of classes to use for column(s), see colClasses in read.table.

...

Parameters sent to read.table.

Value

get_ncols: Number of read fields, including ID columns.

get_nlines: Number of lines, or NA on error.

get_firstcolumn: Vector with elements of first column, or data.frame if class contains multiple not-"NULL" elements.

Error messages

get_nlines is implemented in Fortran and may return NA with an error message, if an error is encountered.

IOSTAT errors:

5010

The first column most likely contains non-integer or non-numeric elements.


stefanedwards/Siccuracy documentation built on May 30, 2019, 10:44 a.m.