ryentes / careless

Other
25 stars 8 forks source link

feature request: add na.rm to irv() #14

Closed fuhred closed 4 years ago

fuhred commented 5 years ago

Any missing values will return NA for the irv score.

Ex:

df<-tribble(
~A,~B,~C,
1,2,3,
1,NA,3)

irv(df)

returns:

[1] 1 NA

ryentes commented 5 years ago

Thanks for opening up a feature request! I don't have an issue with implementing this in the manner you describe. In general I think we should always return a vector of length m for any m x n dataframe for which we're computing an index of careless responding. If the value of the CR metric is not defined for an obs due to missing values, I think we should return an NA value for that obs.

ryentes commented 4 years ago

Merged fix into dev branch