The term "floating" refers to an input or tristated output that has nothing at all connected to it, so any tiny current can cause it to take on pretty much any voltage within limits.
The input is solidly connected to +5 V when the switch is closed. When it is open it is connected to 0 V through R1. If the value of R1 is appropriate for the situation there will be no problem. Note that some situations (long wires, noisy environment) may call for R1 to be quite low or for additional filtering (hardware or firmware).
One way to evaluate this is to imagine a current being injected into the input. Say it takes 1.8 V for the input to be recognized as a 1 when it should be zero. Then a current of less than 1.8 V/R1 will not cause problems. So if R1 is 4.7 kΩ, it can deal with 380 µA of current, which is quite a lot.
If R1 is 1 MΩ then 1.8 µA could cause the input to be interpreted incorrectly. As well as making it noise sensitive, it's possible that leakage on the PCB or out of the chip could contribute some or all of that current.
So why not make R1 100 ohms or something like that, you may ask. It wastes power when the switch is closed if you make the value unnecessarily low.
Usually pull-up resistors of a few kΩ to 10 kΩ are okay in most situations, but if battery power is used you may want to consider 50 kΩ or 100 kΩ. In extreme situations, perhaps with a bit of filtering, 10 MΩ may even be acceptable. For example, if you want long life in a permanently-on circuit running from a lithium button cell.