One option is pmap
from purrr
after changing the column names to the input arguments in 'eqnt`
library(purrr)
library(dplyr)
library(rootSolve)
eqnt2 <- function(T, L, f){
T^2 + T*L - f^2
}
f2 <- function(x) pmap_dbl(df1, eqnt2)
uniroot.all(f2(), c(1,1000))
#[1] 5.653842 50.894856 51.713343 80.233553 81.052066 130.499036 131.317548 170.275345 183.660221 220.540822
#[11] 221.359340 300.145034 300.963560 337.844129 351.229033 390.186832 397.288528 440.452315 441.270803 469.791045
#[21] 470.609559 520.056547 520.875023 559.832862 573.217719 610.098309 610.916833 689.702528 690.521045 727.401642
#[31] 740.786526 779.744321 786.846019 830.009802 830.828289 859.348536 860.167027 909.614015 910.432530 949.390352
#[41] 960.697992 999.655804
Or we can use apply
from base R
eqnt <- function(x) {
x[1]^2 + x[1]*x[2] - x[3]^2
}
library(rootSolve)
uniroot.all(apply(df1, 1, eqnt), c(1, 1000))
#[1] 5.653842 50.894856 51.713343 80.233553 81.052066 130.499036 131.317548 170.275345 183.660221 220.540822
#[11] 221.359340 300.145034 300.963560 337.844129 351.229033 390.186832 397.288528 440.452315 441.270803 469.791045
#[21] 470.609559 520.056547 520.875023 559.832862 573.217719 610.098309 610.916833 689.702528 690.521045 727.401642
#[31] 740.786526 779.744321 786.846019 830.009802 830.828289 859.348536 860.167027 909.614015 910.432530 949.390352
#[41] 960.697992 999.655804