swcarpentry / r-novice-gapminder-es

R para Análisis Científicos Reproducibles
https://swcarpentry.github.io/r-novice-gapminder-es/
Other
9 stars 52 forks source link

Error messages in "Explorando data frames" #122

Closed Zulemma closed 1 year ago

Zulemma commented 3 years ago

In "Explorando Data Frames" episode when we run

gatos <- rbind(gatos, nueva_fila)

there is no an error message about "invalid factor level". May add a little a chunk of code and show the error message obtained to become clear.

errormessage

nselem commented 1 year ago

Dear Zulema Thank you for pointing this out; the problem is that the color column was not a factor. I have added a chunk to convert it into a factor column, and now the error should be visible. Since these episodes are in r-markdown the output chunks are automatically generated. But now the following error should be shown: Warning message:
In [<-.factor(*tmp*, ri, value = "carey") :
invalid factor level, NA generated