Error in -0.01 * Height : Non-Numeric Argument To Binary Operator (Resolved)

This error message usually appears when you are trying to perform a mathematical operation on a non-numeric value in R. In this case, it seems that you are trying to multiply a numeric value (0.01) by a variable called "height", but "height" is not a numeric value.

There are several possible reasons why this error might occur:

"height" might be a character string, rather than a numeric value. In this case, you will need to convert it to a numeric value before you can perform arithmetic operations on it. You can do this using the as.numeric() function:

  height <- as.numeric(height)

"height" might be missing or NA. If "height" is missing or has a value of NA, then you will need to handle this case appropriately. You could use the is.na() function to check if "height" is missing or NA, and then perform some other action if it is:

if (is.na(height)) { # do something here}

"height" might be a factor, rather than a numeric value. Factors are used to represent categorical data in R, and they are not numeric values. If "height" is a factor, you will need to convert it to a numeric value using the as.numeric() function and the levels() function:

height <- as.numeric(levels(height))[height]

There might be some other problem with the data. If none of the above suggestions help, it might be worth checking the data to make sure there are no other issues that could be causing the error. You could try printing out the value of "height" to see what it looks like, or using the class() function to check its data type.

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to Lxadm.com.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.