clean.comments: Clean C-style text

View source: R/read.slv.R

clean.commentsR Documentation

Clean C-style text

Description

Function takes character vector of C-style lines (as passed from readLines), delete comments, spaces, empty lines, multiple semicolomns and line breaks.

Usage

clean.comments(input)

Arguments

input

character vector of C-style text lines, vector can be passed from readLines function.

Value

Character vector of cleaned C-style text. It can be saved to file by cat(..., sep = "\n") function.

Examples

## Not run: cTextExample
(cln<-clean.comments(cTextExample))
cat(cln, file="cln.txt", sep = "\n") # save text to file

insysbio/dbs-package documentation built on Aug. 4, 2022, 2:11 p.m.