It is hard to say what is wrong with your code since it may have copied in to your post with incorrect formatting. Does this work for you?
companies$logAssets <- log(companies$assets)
cat("Sales in Millions\n")
summary(companies$salesMillions)
cat("Profit in Millions\n")
summary(companies$profitsMillions)
cat("Number of employees\n")
summary(companies$numEmploy)