Update encode.R

comments