How to open a directory interactively in a data function

I assigned a follwoing data function to button in text area. The funciton should allow user to find the location of a specific file, it runs ok in rsutdio but not in spotfire. I appreciate your help in advance.


options( RinR_R_FULL_PATH = "C:/Program Files/R/R-3.4.0/bin/R.exe" ) 

file.choose(new = FALSE)

(1) Answer