Drop missing values from table1

How to remove missing values from the following table?

table1(~ test_reason_confirmed | country.x, data=df_linelist_perprotocolconfirmed, total=F, topclass="Rtable1-grid Rtable1-zebra")

Hi. Please, provide a reprex FAQ: What's a reproducible example ( reprex ) and how do I create one?

Also, how do you want NA to be removed? Do you want the entire row to be removed if NA appeared in any column? Or only in specific columns? Or you want to fill them with some data (e.g. previous entry)?

Thanks- I'm not able to do that due to sensitivity of the data. However, I found a solution:

table1(~ test_reason | country.x, data=df_linelist_perprotocolconfirmed, total=F, render.missing=NULL, render.categorical="FREQ (PCTnoNA%)", topclass="Rtable1-grid Rtable1-zebra")

Glad you solved your problem.
For the future cases, you don't have to provide your actual data in reprex. You can create a simple set of data that resemble your data. You can replace values with simple "A", "B", "C" or 1, 2, 3... Just keep in mind that the class of the data should be preserved (i.e. factor should remain factor, numeric should not be replaced by integers, etc.)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.