This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Download Fasta in R

How to download human fasta format in R programming?

fasta r

That's out of context. You mean a specific file or what? Check Biostrings::readDNAStringSet().

1 answer

I am turning ATpoint's comment into an answer, hope that is ok.

 library(Biostrings)      
 readDNAStringSet("https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/001/405/GCF_000001405.39_GRCh38.p13/GCF_000001405.39_GRCh38.p13_genomic.fna.gz")

Most R functions that can read in data can use URL connections in the same ways as local files, and also deal with compressed files.

Log in to answer this question.