Make get_freq function
Use text arg in read.delim instead of textConnection