I need to create a column with the ln of a variable in the same data frame

3

I have a series of data eg GDP and I need to create a column next to it with the variable lnPIB, how do I in R?

    
asked by anonymous 13.02.2017 / 00:32

1 answer

4

Just do it:

bd <- data.frame(PIB = PIB)
bd$lnPIB <- log(bd$PIP)
Ready! Its data.frame called bd now has a column with the logarithm of GDP.

    
13.02.2017 / 00:43