So sorry for your loss gemima. I took my sons, 5 and 2.5 to my father's funeral. I strongly believe that they should understand life and death and they absolutely loved my father so it was important for me that they were there.
To be honest, the service was long and so I had to give them the iPhones on silent of course (they are kids after all), but they were there when we buried my dad, they heard me say a few words and they were surrounded by friends and family saying lovely things about their grandad.
They asked me loads of questions and they do till this day about what does grandad look like now, is he a skeleton and actually they make us smile and remember him in a good way. My kids often point out when we pass cemeteries that dead people are in there and we talk about how they continue to live in loved ones' hearts and memories.
It was the best thing I did and actually it also helped incredibly for my mum and other family members to have the kids there, playing in their innocence. Someone on this thread also recommended books and I think that's lovely. We didn't read any books but we talked about my dad and still do - I think if they hadn't gone to the funeral or seen me grieve, they probably would not have comprehended it and would not continue to talk about him to this day three years later. Your daughter is six, I reckon she'd like to be included and spoken to to help her get her head around her loss too.
Good luck today, the sun is smiling down on you all and I hope you can heal together as a family and remember all the happy memories.