How can V1 and VR (rotate) speeds be calculated?
There is no general equation/function that you can use to calculate V1/Vr... the manufacturer test out the aircraft's performance during certification, and you then compare your current aircraft and conditions against the known manufacturer's aircraft and conditions to get your results.

V1 is the border between accelerate for takeoff, and STOPPPPPP! by the end of the runway. 
* Acceleration is dependent upon the engine thrust being used, the atmosphere providing oxygen for combustion and nitrogen for jetflow mass, the aircraft's mass that has to be accelerated, the drag of the used flap setting, and the possible drag of the runway surface and slope.
* The STOPPP! aspect is dependent upon the drag of the flaps and speedbrakes, the drag of the runway slope and surface, and the mass of the airplane.

Vr is nothing to do with V1... it's just a margin below V2 (5kts? 10kts? depending on thrust setting) that allows you to rotate earlier than V2 but still accelerate (in the air) to then achieve V2 by 15m/50ft. And V2 depends on the weight of the aircraft and the flap setting.