Skip to content

getting round the absence of system() on R for Mac

2 messages · Dr Gregory Jefferis, stefano iacus

#
Dear All,

I am analysing a set of 200 files describing the 3D structure of neurons.
One of the ways I would like to analyse these 3D data points is to find the
convex hull for each neuron.  I have an external compiled C application
which does that - at the moment it reads in a set of data stored in the file
chull.in and outputs the convex hull description to another outfile,
chull.out

I would like to write a routine in R which iterates over my 200 neurons,
replaces chull.in with the points describing the current neuron, runs chull,
read the contents of chull.out into R and update the current neuron object.
I can do everything except call this external program - under unix one would
use system().  Any suggestions?

Many thanks,

Greg.

P.S. I am using R v 1.3.1 on MacOS 9.1

__________________________________________________________________________
Greg Jefferis,                          Lab Address: Liqun Luo, Herrin 144
Neurosciences PhD Programme &                e-mail: jefferis@stanford.edu
Dept Biological Sciences,                       Lab: (650) 725 5809
Gilbert Biology Building,                       Fax: (650) 723 0589
371 Serra Mall,
Stanford, CA 94305-5020.                       Home: (650) 497 1135
#
system() is not implemented (yet, it would be possible in the next 
version but only running under OSX) in R.  You can try to use 
applescript to interact with other applications.
within R you can run applescript or, from an applescript you can ask R 
to execute commands. See the examples in the script directory.
As I'm trying to develop applescript support in R it would be nice if 
any of you reading the list suggest me what they would like to do in 
this direction.

Stefano
On Lunedì, settembre 24, 2001, at 07:01 , Greg Jefferis wrote: