[R] use of system() under Linux

Rainer M Krug r.m.krug at gmail.com
Mon Sep 22 15:34:51 CEST 2008


H

I want to use the system() command to execute a command and have to
return the result in a r-variable, so I an using intern=TRUE.

On the other hand, I want to evaluate the return value of the command,
to determine if the command was successful.

According to the help, these to objectives are exclusive, either the
one or the other. Is this true, or is there another way of
accomplishing this?

My prefered return value would be a list, consisting of thre entries:
return code of the command
stderr
and the result

Thanks

Rainer



-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Faculty of Science
Natural Sciences Building
Private Bag X1
University of Stellenbosch
Matieland 7602
South Africa



More information about the R-help mailing list