What is described above is really a peg pinion. These are seen in metal as the "pinion of report" in a 30Hr longcase movement. A 4 pin pinion would be made by making 2 saw cuts at right angles to each other lengthwise in the end of the arbor, along to the arbor's axis.
A peg toothed wheel is made by inserting teeth into the rim of a wheel so that the teeth stick out, either radially or parallel to the wheel's axis (similar to a large pinion- like the pins in a pinwheel escapement). The teeth might be dowels (cylindrical rods) or shaped dowels, or short sections of flat bars, usually shaped like teeth.
Peg wheels are probably the oldest form of gear, dating back at least to the ancient Greeks. Any wheelwright could make them. I've seen them in 19thC machinery, executed with cast iron formed teeth and hubs (probably bought as a kit) and wrought iron rims and spokes.
Peg wheels are especially suited for use in wood, since the grain can be optimized for greatest strength (i.e. lengthwise) on each tooth. (A wheel cut from a single board would have some teeth parallel to the grain, some perpendicular, and the rest at intermediate, but suboptimal angles) Also, pegwheels allow easy tooth replacement.
They found common use in wind and watermills from the 15th to 19thC. At first, only pinion type wheels (teeth parallel to axis) were used, which meant that wheel axes alternated by right angles. Radial toothed wheels require reduced endshake and sideshake, thus closer tolerances.
They typically exhibit high friction, since the teeth do not roll on each other as in cycloidal and involute toothshapes (though some were made with shaped teeth, especially later). The high friction, especially in soft materials like wood, means that the teeth wear quickly. Wood also has a high co-efficient of friction with itself. It was once thought that the teeth would wear into an optimal friction-free shape, but this is now known to be untrue.
Pegwheels are also very tolerant of depthing errors and wear. They often were worked until the teeth wore through.