crtahlin / medplot

Functions for drawing graphs in R visualizing medical information.
4 stars 2 forks source link

Check/fix errors on Proportions tab when Insomnia selected as symptom with DataEM.txt #46

Closed crtahlin closed 10 years ago

crtahlin commented 10 years ago

Errors arise when Measurement=0 and Insomnia selected as symptom: 'p' must have the same length as 'x' and 'n' missing values and NaN's not allowed if 'na.rm' is FALSE missing values and NaN's not allowed if 'na.rm' is FALSE

Might be something with missing values in the dataset. Check and make the code more robust.

crtahlin commented 10 years ago

PersonID=100 has a "NA" for Insomnia, which probably causes the problem.

crtahlin commented 10 years ago

Added na.rm=TRUE to all calls to sum(), median(), quantile() inside fuctions for calculating tables on the Proportions tab.

Fixed with 133e9177b3906722c347c07dc2ebeebd30e30f39, closing.