Roseanne Barr has apologised to her sitcom's cast and writers after it was cancelled following her racist tweets.