fixed typo in ldm.R