I'm working with the builtin USArrests data frame and I'm trying to scale as well as create a new column called state and make all state names lowercase. So far I can only either scale or create a new column with lowercase, but not both. Can someone help?
scale(USArrests)
arrest <- tibble::rownames_to_column(USArrests, "state")
arrest$state = tolower(arrest$state)
head(arrest)
Your code
scale(USArrests)
is not saving the results anywhere. Just save it with a new name.