write_unitted: Write a unitted object to file.

Description Usage Arguments Examples

Description

Write a unitted object to file.

Write a unitted_data.frame to file.

Usage

1
2
3
4
5
6
write_unitted(x, file = "", ...)

## S4 method for signature 'unitted_data.frame'
write_unitted(x, file = "",
  comment.char = "#", sep = "\t", row.names = FALSE, quote = FALSE,
  ...)

Arguments

x

The unitted object to be written. Currently only implemented for data.frames.

file,

The file to write to, as in write.table

...

other arguments passed to write.table

comment.char

a single character, or "", with which to prepend the line containing units information

sep

the character string used to separate columns, as in write.table

row.names

logical. whether to write row names to the file, as in write.table

quote

logical. whether to place quotes around every data entry, as in write.table

Examples

1
2
3
4
write_unitted(u(data.frame(x=1:3, y=9:7), c(x="grapes","seeds")))
write_unitted(u(data.frame(x=1:3, y=9:7), c(x="mg L^-1","ft^3 s^-1")), 
  sep="\t", file="practice.tsv")
file.remove("practice.tsv")

appling/unitted documentation built on May 10, 2019, 12:44 p.m.