[R] r-help:
Sam McClatchie
s.mcclatchie at niwa.co.nz
Mon Dec 9 22:05:03 CET 2002
System info:
Linux slackware
R Version 1.6.0 (2002-10-01)
ESS 5.1.21
Emacs 21.2.1
-------------------
Colleagues
Can anyone tell me what R does with local variables when they are passed
in a system call to a shell script?
e.g. I have a string as an R variable called tripcode. I want to pass
this variable in a system call to a local bash script calling gmt
(Generic Mapping Tool) functions:
system("source map_acoustic_transects_and_trawls.gmt", tripcode)
I think this is what is meant in Section 4.6 of Venables and Ripley(?).
When I ECHO the parameter passed into the bash script nothing is returned:
echo "TripCode" $tripcode
TripCode
Is there a way to do this efficiently without writing the string
variable to a file and re-reading it into the shell script?
Thanks for advice,
Sam
--
Sam McClatchie, Research scientist (fisheries acoustics))))))))))
NIWA (National Institute of Water & Atmospheric Research Ltd)
PO Box 14 901, Kilbirnie, Wellington, New Zealand
s.mcclatchie at niwa.cri.nz
Research home page <http://www.smcc.150m.com/>
/\
>><xX(&>
/// \\\
//// \\\\
/// <%)Xx><<
///// \\\\\\
><(((@>
><(((%> ..>><xX(?>O<?)Xx><<
More information about the R-help
mailing list