How can I remove those rows in a table that have a missing element.
For a contrived example:
Table[{If[i == 1, Missing[NotApplicable], i], j}, {i, 1, 2}, {j, 1,
2}] // TableForm
Gives:
But I want is:
In the real example there is is more complex function that sometimes returns missing for some values, and I want those rows excluded.
Ideally, if the first element in the row is missing, the rest of the elements in the row would not be processed, but that is just a performance bonus.
How can I do this?
DeleteMissing[expr, 1, Infinity]
? This should remove any elements at the first level that containMissing
at any depth. It's one of the syntax examples in the "Details" section of the docs forDeleteMissing
. $\endgroup$TableForm
, that won't work in all likelihood. in generalTableForm
is for output formatting only. Its output cannot be used for further computation. $\endgroup$Dataset
would probably be the most appropriate construct; a quick and dirtyGrid
might also work for formatting. $\endgroup$