How to convert DNAbin to FASTA in R?
The following should work:

cat(file="out.fa", paste(paste0("&gt;",names(dnabin_to_fasta)),
          sapply(dnabin_to_fasta, paste, collapse=""), sep="\n"), sep="\n");


A bit of explanation, starting from the middle outwards:


Collapse the letter arrays inside dnabin_to_fasta into single strings
Append ">" to the front of the names of each sequence
Concatenate the results of steps 1 &amp; 2 together, separating with a line break
Write each concatenated string to a file, separating by a line break