[R] sink() output to another directory
MacQueen, Don
m@cqueen1 @end|ng |rom ||n|@gov
Fri Sep 14 01:51:16 CEST 2018
In my experience, any path that can be used at the shell prompt in a unix-alike can be used anywhere that R wants a file name.
[that is, when running R on a unix-alike system, and when pwd at the shell prompt returns the same value as getwd() in R]
Hopefully, that helps...
-Don
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
Lab cell 925-724-7509
On 9/13/18, 3:49 PM, "R-help on behalf of Rich Shepard" <r-help-bounces using r-project.org on behalf of rshepard using appl-ecosys.com> wrote:
On Thu, 13 Sep 2018, Duncan Murdoch wrote:
> What did you try? Prefixing with either ./ or / doesn't make any sense.
Duncan,
Using linux (and perhaps other unices) ./ and / refer to the current
directory. My code, to print to the sub-directory
(../analyses/stat-summaries/) when the script is being run in ../analyses:
sink('stat-summaries/estacada-wnw-precip.txt')
print(/summary(estacada_wnw_wx))
sink()
Rich
______________________________________________
R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list