I imported a huge dataset with a lot of missing values or N/As, NAs.
This is how i import the Data: Databsp<-read.csv("C:/Users/adminfor/Desktop/Neuer Ordner/Pseudonymized-Genet-Treatment-Summary-20220201120538.csv", na.strings=TRUE)
Next, I converedt all the NAs or N/As to using the following code:
a <- Databsp %>% replace_with_na_all(condition = ~.x %in% common_na_strings)
Now my question: Why are columns that only include numbers and NAs from the class "character" and not "integer/numeric". I tried several codes, but nothing seems to help...
Can you give us some sample data from the data.frame before you converted anything?
A handy way to supply sample data is to use the dput() function. See ?dput. If you have a very large data set then something like head(dput(myfile), 100) will likely supply enough data for us to work with.