how to add the log of a variable to a dataset?

This has (almost certainly) nothing to do with RStudio or even the version of R you are using. Most likely you introduced an error in adapting your script.

To get help, please produce a reproducible example:

1 Like