title: Running R function with arguments in 32 bit R, inside 64 bit R
body: <p>Suppose I want to run the function</p>
  
  <pre><code>test.function &lt;- function(arg1){
                      print(arg1)
                   }  
  </code></pre>
  
  <p>How can I run, lets say:</p>
  
  <pre><code>test.function("Hello world")
  </code></pre>
  
  <p>in 32 bit mode, using 64 bit R? I have managed running an entire script in 32 bit mode using</p>
  
  <pre><code> system(paste0(Sys.getenv("R_HOME"), "/bin/i386/Rscript.exe ",'"some_script.R"'))   
  </code></pre>
  
  <p>But how can I change this, so that it can run a function with arguments, instead of an entire script?</p>
  
  <p>EDIT</p>
  
  <p>Following the answer by Roman Luštrik and running </p>
  
  <pre><code>system('Rscript test.script.R "hello"')
  </code></pre>
  
  <p>Gives me the following error:</p>
  
  <blockquote>
    <p>Error in winDialog(type = "ok", message = message_text) : 
      winDialog() cannot be used non-interactively
    call:  -> check.for.updates.R -> winDialog
    Running stopped</p>
    
    <p>Warning message:
    running command 'Rscript test.script.R "hello"' had status 1</p>
  </blockquote>
  
  <p>(The error message was in my native language, so I had to translate a few words, so the text might differ slightly on other systems)</p>