© 2020 IOP Publishing Ltd.The rules for Yang-Baxter (YB) deformation for a generic Green-Schwarz string sigma model has been obtained recently. We show that the deformation can be described through the action of a coordinate dependent matrix on the target space fields both in the NS-NS and the RR sectors, generalizing previous results. This enables us to show that the YB deformed fields can be regarded as duality twisted fields in the context of gauged double field theory (GDFT). We compute the fluxes associated with the twist and show that the conditions on the R-matrix determining the YB deformation give rise to conditions for the fluxes on the GDFT side. More precisely, we show that YB deformation is a process which takes a solution of DFT with geometric flux associated with the isometry group G and deforms it to another solution of DFT with vanishing R-flux and non-vanishing Q-flux given by the structure constants of the dual Lie algebra determined by the R-matrix. We also show that the non-unimodularity of the R-matrix forces the generalized dilaton field to pick up a linear dependence on the winding type coordinates of DFT, implying that the corresponding target space fields satisfy the field equations of DFT in the generalized supergravity frame. This provides a new perspective on the relation between the non-unimodularity of the R-matrix, the trace of the Q-flux and the generalized supergravity equations.