fixed coef indexing bug

tiny typo in read-funs.r