fix attribute detection of measurementScale
was treating everything as character, because, for instance, class(numeric()) is a character (i.e. equals the string 'numeric')..