Box-Cox lambda calculation to, logarithmic transformation

I am very new to language R and trying to learn through small projects. I have applied box-cox transformation to my data set . (contains a column for subject ID, a column for the value of the independent variable, and a column for the value of the dependent variable.) as following

PartB_DV <- PartB_data$DV
PartB_IV <- PartB_data$IV

m <- lm(PartB_DV ~ PartB_IV)
library(MASS)
bc <- boxcox(PartB_DV ~ PartB_IV)
#plot(bc)
(lambda <- bc$x[which.max(bc$y)]

my obtained lambda was -0.18 so I wanted to apply logarithmic transformation to my data set but I have no idea how to do it and did something like:

m.log= lm(log(PartB_DV)~PartB_IV)

My goal is to find numbers that I can do a calculation like following:

data_trans <- data.frame(xtrans=data$x, ytrans=data$y^(-3/2))

I wanted to ask how can I find ratios like (-3/2) in the example

© Copyright 2013-2020 Analytics Vidhya