The ________ function in R is used to convert a variable to numeric.

  • as.character()
  • as.factor()
  • as.logical()
  • as.numeric()
The as.numeric() function in R is used to convert a variable to numeric. It is important to ensure that the variable is indeed convertible to numeric, otherwise NA's might be introduced.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *