In the circuit shown in figure, the power which is dissipated as heat in the 6Ω resistor is 6W. What is the value of resistance R in the circuit?