In R code buffers (ess-r-mode), when completing filenames, almost always a trailing whitespace is added to the end of the filename, and this is undesirable. The backend being used is company-capf (see output from company-diag, below).
Interestingly, this same backend does not add the trailing whitespace on iESS buffers (note: I had to add company-capf to the backends in the iESS buffer, as it is not used by default, and without it, there is no filename completion).
I reported this in company's discussion (company-mode/company-mode#1511) and @dgutov found that by setting comint-completion-addsuffix to nil this could be avoided.
Thus
(add-hook 'ess-r-mode-hook (lambda()
(setq-local comint-completion-addsuffix nil)))
works. However, it would probably be a good idea to have this work out-of-the-box without requiring to modify a var via a hook?