R: Character Output

as.output {iotools} | R Documentation

## Character Output

### Description

Create objects of class `output`.

### Usage

      as.output(x, ...)

### Arguments

`x` | object to be converted to an instance of `output`.
`...` | optional arguments to be passed to implementing methods of `as.output`. For `matrix`, and `data.frame` types this includes a `sep` argument indicating a field separator.

### Details

`as.output` is generic, and methods can be written to support new classes. The output is meant to be an character vector suitable for writing to the disk or sending over a connection.

### Value

`as.output.default` outputs a character vector by default, though other formats (such as a raw vector) may be returned by other methods.

### Author(s)

Simon Urbanek

### Examples

      m = matrix(sample(letters), ncol=2)
      as.output(m)

      df = data.frame(a = sample(letters), b = runif(26), c = sample(state.abb,26))
      as.output(df)

[Package iotools version 0.2-5 Index]