calling plink in R and Rstudio

1,150 views
Skip to first unread message

huu daudi

unread,
Apr 9, 2015, 6:07:29 AM4/9/15
to plink2...@googlegroups.com
Hello,
Good day,

I am  trying to call plink in R and RStudio,  using system("plink ", intern=TRUE)  so that I can be able to integrate with knitr and Latex to produce report. I am getting the following error:

system("./plink ", intern=TRUE)
sh: 1: ./plink: not found
Error in system("./plink ", intern = TRUE) : error in running command.

set up
OS: Ubuntu 14.04

plink 1.9 ( set the path so that when I run plink command in terminal it work)

"PLINK v1.90b1g 64-bit (10 Jun 2014)        https://www.cog-genomics.org/plink2
(C) 2005-2014 Shaun Purcell, Christopher Chang   GNU General Public License v3

  plink [input flag(s)...] {command flag(s)...} {other flag(s)...}
  plink --help {flag name(s)...}
"

when I run through plink 1.07 here is the output:

 system("p-link ", intern=TRUE)

ERROR: Stopping as there are no SNPs left for analysis

freeseek

unread,
May 3, 2015, 7:13:23 PM5/3/15
to plink2...@googlegroups.com
system("./plink ", intern=TRUE) does not make sense. You should use system("plink ", intern=TRUE) unless you are running R in the same directory where you keep plink. Furthermore, if you are running system("plink ", intern=TRUE) you will only get the help output, as plink needs command line parameters to know what it needs to do.
Reply all
Reply to author
Forward
0 new messages