table in markdown

I try to create a table in markdown using kable functions.

In the code it gives the correct answer, but in the markdown it shows a lot of extra values in the table. Does anyone has an idea how to resolve this? We just need a table as pictured in: head(box_table_total) see pictrue.

I realize it is not in markdown but it shows the same results

It seems your Box_table_total is not a simple data.frame. It seems to contains some special columns. Can you share your data ?

Could you ask this with a minimal REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help.