file.cat: Copy or concatenate files to one.

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

This function could be used to concatenate the files in the given directory.

Usage

1
file.cat(dir = NULL, appendix = ".fas", file = NULL)

Arguments

dir

A string name the directory where files to be concatenated exist.

appendix

The appendix that files to be concatenated have.

file

The file name of the result to be save to.

Details

Any plain text files that match the appendix could be concatenate or copy to one file.

Value

Copy all the contents of the files having the matched appendix to one file.

Author(s)

Jinlong zhang jinlongzhang01@gmail.com Qiong Ding dingqiong1@gmail.com

References

None.

See Also

See Also raw2Fas for copying all different fasta file contents to one.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#### file.cat() example
cat(
">No305",
"NTTCGAAAAACACACCCACTACTAAAANTTATCAGTCACT",
file = "dna1.fas", sep = "\n")
cat(
">No304",
"ATTCGAAAAACACACCCACTACTAAAAATTATCAACCACT",
file = "dna2.fas", sep = "\n")
cat(
">No305",
"NTTCGAAAAACACACCCACTACTAAAANTTATCAGTCACT",
file = "dna3.fas", sep = "\n")

file.cat(dir = getwd(), appendix = ".fas", file = "total")

unlink("dna1.fas")
unlink("dna2.fas")
unlink("dna3.fas")
unlink("total.fas")

seqRFLP documentation built on May 2, 2019, 6:02 a.m.