View Function In R Not Working