These are all very cool solutions. PMROZ pointed out that I misread that the secanrio is to start with a list. He asked for my revised solution. Below converts a list or a string of YN's to a vector of 10's and a vector of 10's to a string of YN's.
To be consistent with my previous post, I just converted the string to a list with the words() function using an empty string delimiter.