more R tips. small fix to foci2intervals.