A search for R-parity-violating supersymmetry in final states characterized by high jet multiplicity, at least one isolated light lepton and either zero or at least three b-tagged jets is presented. The search uses 139fb-1 of s=13TeV proton–proton collision data collected by the ATLAS experiment during Run 2 of the Large Hadron Collider. The results are interpreted in the context of R-parity-violating supersymmetry models that feature gluino production, top-squark production, or electroweakino production. The dominant sources of background are estimated using a data-driven model, based on observables at medium jet multiplicity, to predict the b-tagged jet multiplicity distribution at the higher jet multiplicities used in the search. Machine-learning techniques are used to reach sensitivity to electroweakino production, extending the data-driven background estimation to the shape of the machine-learning discriminant. No significant excess over the Standard Model expectation is observed and exclusion limits at the 95% confidence level are extracted, reaching as high as 2.4 TeV in gluino mass, 1.35 TeV in top-squark mass, and 320 (365) GeV in higgsino (wino) mass.