I know similar questions have been asked in the past but I am not able to find any that can solve my particular issue.
I have a data set which I have imported from Excel using both the read_excel function as well as trying to select file > import dataset > from excel. When I import the data it shows the columns with values in as 'doubles' but when I then view the data type using str(), once imported, it shows these as being a char variable. I have used many different functions to try convert from char to integer but I keep getting the 'NAs introduced by coercion' warning and the command does not seem to work.
The function I see come up mostly is as.numeric(as.character()) but this does not work.
The most common problem I see people having is that their data has "," however my data seems to be formatted correctly using ".".
This is causing me issues as I am then not able to filter out values outside of a certain range.
Would anyone have any ideas on what I could be doing wrong as I have literally spent hours trying to solve for this issue and am now completely stuck but sure it is a simple fix.
question from:
https://stackoverflow.com/questions/65871478/how-do-i-convert-excel-char-variables-to-numeric-values-after-importing-from-exc 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…