James Anderson has admitted to feeling frustrated during England's first Test with Pakistan but says he is not considering retiring.