Update mergedata.R

Allow lower case as input as well.