Sweet potato doesn't contain B12 - you're probably thinking of Vitamin A.
Dairy doesn't contain enough B12 to supplement you on it's own, which is why the study recommends against and instead suggests taking an actual B12 supplement (Puritan's Pride lozenges)
4 weeks shouldn't be enough time to develop a serious B12 deficiency but doing this for longer could impair you cognitively.