[R] paste? 'cmd /c "c:\\pheno\\whap --file c:\\pheno\\smri --alt 1"'

Boks, M.P.M. M.P.M.Boks at umcutrecht.nl
Mon Sep 25 18:58:58 CEST 2006


Dear R users,
 
This command works (calling a programm -called whap- with file specifiers etc.):
 
>system('cmd /c "c:\\pheno\\whap --file c:\\pheno\\smri --alt 1 --perm 500"', intern=TRUE)
 
Now I need to call it from a loop to replace the "1" by different number, however I get lost using the quotes:
 
I tried numerous versions of:
 
>i<-1
>system(paste(c("'cmd /c "c:\\pheno\\whap --file c:\\pheno\\smri --alt", i, " --perm 500"'", sep="" )), intern=TRUE)
 
However no luck! I would be gratefull for any help.
 
Thanks,
 
Marco



More information about the R-help mailing list