Passage: In 1978, Nixon published his memoirs, RN: The Memoirs of Richard Nixon, the first of ten books he was to author in his retirement. The book was a bestseller and attracted a generally positive critical response. Nixon visited the White House in 1979, invited by Carter for the state dinner for Chinese Vice Premier Deng Xiaoping. Carter had not wanted to invite Nixon, but Deng had stated he would visit Nixon in California if the former president was not invited. Nixon had a private meeting with Deng and visited Beijing again in mid-1979.On August 10, 1979, the Nixons purchased a New York City townhouse at 817 Fifth Avenue after being rejected by two Manhattan co-ops. When the deposed Shah of Iran died in Egypt in July 1980, Nixon defied the State Department, which intended to send no U.S. representative, by attending the funeral. Though Nixon had no official credentials, as a former president he was seen as the American presence at its former ally's funeral. Nixon supported Ronald Reagan for president in 1980, making television appearances portraying himself as, in biographer Stephen Ambrose's words, "the senior statesman above the fray". He wrote guest articles for many publications both during the campaign and after Reagan's victory. After eighteen months in the New York City townhouse, Nixon and his wife moved in 1981 to Saddle River, New Jersey.

Question: What funeral did Nixon attend?
Shah of Iran