Hi all,
I'm trying to create a new variable in my dataset. I downloaded my data from Compustat and have not made any adjustments to that specific column. However now I want to create the following variable:
Full_data <-
Full_data %>%
mutate( Size = log(at))
But when I run this code I get the following error:
Error in mutate()
:
! Problem while computing Size = log(at)
.
The error occurred in group 1: companyid = 18511, gvkey = 210835.
Caused by error in log()
:
! non-numeric argument to mathematical function
However if i look up this specific line it is not a text variable. How can I fix this?