bupaverse / xesreadR

Other
0 stars 0 forks source link

Allow for omiting event attributes with NA values when writing XES files #2

Open FableBlaze opened 3 years ago

FableBlaze commented 3 years ago

The function write_xes in bupaR library xesreadRseems to assume that all events in the event log have the same set of attributes. However that is rarely the case in reality.

There is an is.null(value) check in the function addAttribute that is used by the write_xes function for adding the event attributes. However this check can not be taken advantage for omiting attributes that have no value, because the input of write_xes function is a dataframe and a dataframe in R can not have NULL values.

I would request adding adding an extra parameter to write_xes which , if set to true, would omit all event attributes from the output XES file where the corresponding attribute value in the input dataframe is NA.

Or if there is some kind of workaround then please let me know!

gertjanssenswillen commented 3 years ago

I'll try to fix this week.