Warning message: In dist(Data) : NAs introduced by coercion

You didn't assign your converted data frame to a variable name, so no changes were actually made to Data. I suspect that's why you're getting the same warning.

I can't go any further without first making sure that you've seen our community guidelines on asking questions related to class assignments: FAQ: Homework Policy. The most important parts are:

  • Please don't post verbatim text from your assignment
  • Please clearly state when a question you post here is related to an assignment

Can you please edit the post where you included verbatim assignment text, changing it to a paraphrase, instead? It's definitely useful to understand what you're trying to do (that's part of the reason for the second rule!), but it needs to be written in your own words.