# show all allowed values
allowed <- c("Stp", "Ala", "Cys", "Asp", "Glu", "Phe", "Gly", "His", "Ile",
"Lys", "Leu", "Met", "Asn", "Pro", "Gln", "Arg", "Ser", "Thr",
"Val", "Trp", "Tyr")
a(allowed)
# show what's happen with non-allowed values
a("SOS") # should be NA and a warning is generated
Run the code above in your browser using DataLab