Farmer charged over machete attack