Learn R Programming

baseq (version 0.1.4)

read.fasta_to_df: Read a fasta file into a dataframe and assign to the environment

Description

This function reads a fasta file and creates a dataframe with two columns: Header and Sequence. The dataframe is then assigned to the environment with the name same as the fasta file name but without the .fasta extension.

Usage

read.fasta_to_df(fasta_file)

Value

This function does not return anything. It assigns the resulting dataframe to the environment.

Arguments

fasta_file

The path to the fasta file to be read.

Examples

Run this code
# \donttest{
# Read in sequences from a FASTA file

sample_file_path <- system.file("extdata", "sample_fa.fasta", package = "baseq")
read.fasta_to_df(sample_file_path)
# }

Run the code above in your browser using DataLab