R: ends(), head_of(), tail_of() return names for named graphs