daudi / Epidata-XML-to-R

3 stars 1 forks source link

no value labels gives Error in y[[i]] : subscript out of bounds #2

Closed charlesknightsbridge closed 13 years ago

charlesknightsbridge commented 13 years ago

Some .epx files will have no value labels. Catch this in get.epidata.value.labels with:

y <- xmlElementsByTagName(x, "ValueLabelSet", rec = TRUE) if (xmlSize(y)==0) return(NULL)

daudi commented 13 years ago

Thanks. I've added this.