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?
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?
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.