Hi! I'm very new to R and keep running into an issue with changing the class of my data columns. I watched and read some tutorials which led me to the code
To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:
Hi! Thanks for the reprex guide! I tried my best to create one so I hope that this is helpful! Using the iris data set and the tidyverse package, let's say I wanted to change the class of the Sepal.Length column from numeric to character (in my case I want to change something from character to numeric, but I think the process is similar). This is the code I tried based on some research:
This gives an error message. I don't get the error message with my own data set, but the class conversion simply doesn't occur haha. Do you by chance know of a better way to convert the class of a data column? Thank you!
Ohh that makes sense, thanks! So then is it necessary to always store any changes I make into my variable? Sorry if this is a simple question I wasn't aware I needed to do that!