couldn't execute "R_surf": no such file or directory
    while executing
"exp_spawn $Rexe --vanilla -q"
    (procedure "Rpipe" line 13)
    invoked from within
"Rpipe "print('[join $txt ,]')""
    (procedure "tRp" line 6)
    invoked from within
"tRp"
    (in namespace eval "::request" script line 88)
    invoked from within
"namespace eval ::request $script"
    ("::try" body line 12)

OUTPUT BUFFER:

catch {console eval {.console configure -bg black -fg white}} package require Expect #set exp::winnt_debug 1 proc Rpipe {Cmd} { global CnlR CnlRReady spawn_id set rep "" set prompt "turlututu> " if {! [info exists CnlR]} { #exp_internal 1 switch $::tcl_platform(platform) { unix {set Rexe R_surf} windows {set Rexe [file join c:/ PROGRA~1 R R-2.15.2 bin i386 Rterm.exe]} } exp_log_user 0 exp_spawn $Rexe --vanilla -q set CnlR $spawn_id exp_stty raw -echo set ready 0 while {! $ready} { expect -timeout 1000 "> " {set ready 1} } set opt "options(prompt='$prompt');" exp_send "$opt\n" while {[expect -ex "$opt"] ne ""} { after 1000 } while {[expect "$prompt"] ne ""} { after 1000 } } exp_send "$Cmd\n" while {[expect "$Cmd"] ne ""} { after 200 } set rep "" ; set done 0 while {! $done} { after 200 expect $prompt { append rep $expect_out(buffer) set done 1 } } set rep [string map [list \r ""] $rep] set rep [lrange [split $rep \n] 1 end-1] return $rep } proc tRp {} { #package require Tk package require Expect set txt [list 1.1 2.2 3.4] puts "Rpipe [Rpipe "print('[join $txt ,]')"]" puts "Rpipe [Rpipe "toto <- c([join $txt ,])"]" puts "Rpipe [Rpipe "(min(toto))"]" #exit set ListeVal [list 1.0 2.0 3.0 4.0 1.1 2.1 3.1 4.1 1.2 2.2 3.2 4.2 1.3 2.3 3.3 4.3] set NbRow 3 set NbGagne 1 set NbPerdu 1 set NbNul 1 set size 2 set decay 0.0075 Rpipe "All <- c([join $ListeVal ,])" Rpipe "All <- matrix(All,nrow=$NbRow)" Rpipe "fac <- rep( factor( c('gagne', 'perdu','nul')), c($NbGagne,$NbPerdu,$NbNul))" Rpipe "library(nnet)" ## index des etiquettes Rpipe "T <- class.ind(fac)" ### size = taille couche cachee, decay= vitesse d'apprentissage, maxit = nbre iteration puts [join [Rpipe "model <- nnet(All,T,size=$size,decay=$decay,softmax=TRUE,maxit=500)"] \n] #exit return } tRp