A method of controlling a refrigerator comprising: a cabinet defining a storage space; a door selectively closing the storage space; a heater for reducing dew condensation on the door; a temperature detecting part for detecting an indoor temperature; and a humidity detecting part for detecting an indoor relative humidity, the method comprising: detecting an indoor temperature and a relative humidity using the temperature detecting part and the humidity detecting part, respectively; setting an output of the heater according to the indoor temperature and the relative humidity detected by the temperature detecting part and the humidity detecting part, respectively; and operating the heater at the set output, wherein the heater is operated at a reference output when the detected indoor temperature is within a reference temperature zone and the detected relative humidity is within reference humidity zone, and wherein the heater operates at an output increased or decreased by a preset rate with respect to the previously set reference output, when the detected indoor temperature and the detected relative humidity are within a temperature zone and a humidity zone, respectively, which have been increased or decreased by preset ranges with respect to the reference temperature zone and the reference humidity zone. a cabinet defining a storage space; a door selectively closing the storage space; a heater for reducing dew condensation on the door; a temperature detecting part for detecting an indoor temperature; and a humidity detecting part for detecting an indoor relative humidity, the method comprising: detecting an indoor temperature and a relative humidity using the temperature detecting part and the humidity detecting part, respectively; setting an output of the heater according to the indoor temperature and the relative humidity detected by the temperature detecting part and the humidity detecting part, respectively; and operating the heater at the set output, wherein the heater is operated at a reference output when the detected indoor temperature is within a reference temperature zone and the detected relative humidity is within reference humidity zone, and wherein the heater operates at an output increased or decreased by a preset rate with respect to the previously set reference output, when the detected indoor temperature and the detected relative humidity are within a temperature zone and a humidity zone, respectively, which have been increased or decreased by preset ranges with respect to the reference temperature zone and the reference humidity zone. detecting an indoor temperature and a relative humidity using the temperature detecting part and the humidity detecting part, respectively; setting an output of the heater according to the indoor temperature and the relative humidity detected by the temperature detecting part and the humidity detecting part, respectively; and operating the heater at the set output, wherein the heater is operated at a reference output when the detected indoor temperature is within a reference temperature zone and the detected relative humidity is within reference humidity zone, and wherein the heater operates at an output increased or decreased by a preset rate with respect to the previously set reference output, when the detected indoor temperature and the detected relative humidity are within a temperature zone and a humidity zone, respectively, which have been increased or decreased by preset ranges with respect to the reference temperature zone and the reference humidity zone.