A simple technique for directly generating a radially polarized output beam from a cladding-pumped ytterbium-doped fiber laser is reported. Our approach is based on the use of a nanograting spatially variant waveplate as an intracavity polarization-controlling element. The laser yielded ~32 W of output power (limited by available pump power) with a radially polarized TM (01)-mode output beam at 1040 nm with a corresponding slope efficiency of 66% and a polarization purity of 95%. The beam-propagation factor (M(2)) was measured to be ~1.9-2.1.