new to R and not familiar with the language

I go this error and I and I am not sure what is going on because there are 3 different vaccines.

Error in $<-.data.frame(*tmp*, "VaccType", value = logical(0)) :
replacement has 0 rows, data has 31

any thoughts

Please show the code you ran that produced this error.

1 Like
breastmilk$VaccType=ifelse(breastmilk$vaccinetype=="Pf",0,1)
Error in `$<-.data.frame`(`*tmp*`, "VaccType", value = logical(0)) : 
  replacement has 0 rows, data has 31

You might want to show the data too. dput(breastmilk) then copy and paste.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.