dcomtois / summarytools

R Package to Quickly and Neatly Summarize Data
502 stars 77 forks source link

summarytools::freq and summarytools::ctable with integer data type #150

Closed kellysaunders17 closed 2 years ago

kellysaunders17 commented 2 years ago

Hey there - I'm looking to use the summarytools::freq and summarytools::ctable functions with integer data types but get the error message that variables need to be numeric.

summarytools::ctable(df$var1, df$var2)

Both var1 and var2 are integers.

Error in if (data_info$Data.type.x == trs("numeric")) { : argument is of length zero

Could these functions work with integer data types? Thank you!

dcomtois commented 2 years ago

Hi, which version of summarytools do you use? If not the latest, please update to the latest and try again. Thx.

kellysaunders17 commented 2 years ago

Oh great! I must not have been using the latest version. I'm now using the 1.0.0 version and all is working well. Thank you!