Learn R Programming

seqRFLP (version 1.0.1)

read.fasta: Read fasta file

Description

Read fasta file from a specified file path or URL.

Usage

read.fasta(file = NULL)

Arguments

file
A character string naming the file path.

Value

Returns a fasta object stored as a vector of character strings.

Details

Read fasta file from a specified file path (usually local machine) or URL.

References

None.

See Also

See Also read.phy, read.nxs for importing data from other data types.

Examples

Run this code

### read.fasta() example
### 
cat(
">No305",
"NTTCGAAAAACACACCCACTACTAAAANTTATCAGTCACT",
file = "dna1.fas", sep = "\n")

sequences <- read.fasta("dna1.fas")

unlink("dna1.fas")

Run the code above in your browser using DataLab