test<-lm(spreadsheet[,1]~spreadsheet[,2])
test<-test[1][[1]]
> test
(Intercept) spreadsheet[, 2]
359.6182526432944 -2.475447990866698
how to write the coefficients of a regression in order to form an equation? So that it is possible to isolate "x". Expected output:
K= 359.6182526432944 -2.475447990866698 *x
x= -(17249403*K-6203200166)/42700000
I tried using expression function but it didn't work:
> eq<- expression(test[1][[1]]*x)
> eq
expression(test[1][[1]] * x)