Let me tell you that these x, y and z are the vectors:
x = c(0, 1, 2, 0),
y = c(0, 0, 1, 2),
z = c(0, 2, 0, 1),
And these are representing four points (0,0,0), (1,0,2), (2,1,0), (0,2,1). They are indexed by 0, 1, 2, 3 respectively.
The i, j, k vectors represents four triangles:
i = c(0, 0, 0, 1),
j = c(1, 2, 3, 2),
k = c(2, 3, 1, 3)
The first one is denoted by (0,1,2). This means the points of the corresponding triangle are the points indexed by these 0, 1, 2 values. The second one, (0,2,3), is the triangle whose points are the points indexed by 0, 2, 3. Etc.
If you want to know more about R then do check out the R programming course.