Learn R Programming

TargetSearch (version 1.28.1)

text2bin: Convert RI files from text to binary format and viceversa.

Description

This function converts a list of RI files (peak list files) in text (binary) format to binary (text) format.

Usage

text2bin(in.files, out.files=NULL, columns=c("SPECTRUM","RETENTION_TIME_INDEX","RETENTION_TIME"))
bin2text(in.files, out.files=NULL)

Arguments

in.files
A character string naming the input files.
out.files
A character string naming the output files. If NULL, the input file extensions will be changed accordingly ("txt" to "dat" and viceversa).
columns
A numeric vector with the positions of the columns SPECTRUM, RETENTION_TIME_INDEX, and RETENTION_TIME or a character vector with the header names of those columns. This parameter is required only for text2bin.

Value

A character vector of the created files.

Details

The format of the input files is detected dinamically and error will be issued if it is incorrect.

Note that the respective tsSample object may need to be updated by using the method fileFormat.

See Also

ImportSamples, tsSample, RIcorrect