Skip to content
Prev 306194 / 398506 Next

Strange data frame behavior

Hi
Because Site is a factor and its levels are preserved in subset operations.

See ?"[" and especially factor part and drop parameter.

You can either get rid of factor and change it to character or explicitly call factor to Site variable

factor(data_frame2$Site)

to get rid of empty levels

Regards
Petr