use this...
myfasta <- readAAStringSet("my.fasta")
myalignment <- msa(myfasta, method = "Muscle", , type = "protein")
# or if sequence is in a character object like mysequence <- c("ALGHIRK", "RANDEM") then use msa(mysequence, method = "Muscle", type = "protein")
print(myalignment, "complete") # to print on screen
sink("alignment.txt") # open a file connection to print to instead
print(myalignment, "complete")
sink() # close connection!
Cheers!!