Make Python Array Append Function In R