Changing a variable to another type

If you examine the preceding str() output, you will also see that Length.of.Stay is currently defined as a factor. This will need to be transformed to a new variable by using the as.integer function. Transform it to an integer, and code a str() and summary() function to ensure that the transformation is correct:

los.int <- as.integer(Length.of.Stay)
head(los.int)
summary(los.int)