On Fri, 14 Sep 2018, Ivan Krylov wrote:
Just remove the slash from your print command (line 25 of
rainfall-dubois-crk-all.r) because it's a syntax error (must be a typo).
I.e. the above should be print(summary(estacada_wnw_wx)), not
print(/summary(estacada_wnw_wx)) (do you notice the
В Thu, 13 Sep 2018 15:49:52 -0700 (PDT)
Rich Shepard пишет:
> sink('stat-summaries/estacada-wnw-precip.txt')
> print(/summary(estacada_wnw_wx))
> sink()
Just remove the slash from your print command (line 25 of
rainfall-dubois-crk-all.r) because it's a syntax error (must be a typo).
I.e. the
On Thu, 13 Sep 2018, Rich Shepard wrote:
sink('stat-summary/example-output.txt')
print(summary(df))
sink()
My apologies to everyone for not seeing a typo further in the script.
I had the path to the appropriate directory in the sink() function and the
print() function had only the
of Rich Shepard
Sent: Friday, September 14, 2018 8:38 AM
To: R-help
Subject: Re: [R] sink() output to another directory
CAUTION: This message originated from a non UMB, UMSOM, FPI, or UMMS email
system. Whether the sender is known or not known, hover over any links before
clicking and use caution ope
On Thu, 13 Sep 2018, Bert Gunter wrote:
I find your "explanation" confusing. You appear to be misusing print().
Please read ?print carefully. You print objects in R, not files. Objects
in R do not have "/" in their names (without some trickery). See
?make.names .
Bert,
I had read both
Apologies if my advice wasn't clear: the file you want to write to goes in
the sink() function/command. You can put the file anywhere on your file
system, no need to write into current directory and then move the file.
The print command is completely unaware of the file you point to in sink().
On Thu, Sep 13, 2018 at 7:12 PM Rich Shepard wrote:
>
> On Thu, 13 Sep 2018, Henrik Bengtsson wrote:
>
> >> sink('stat-summaries/estacada-se-precip.txt')
> >> print(summary(estacada_se_wx))
> >> sink()
> >>
> >> while accepting:
> >>
> >> pdf('../images/rainfall-estacada-se.pdf')
> >>
> >>
It is not possible for the current working directory to begin with "../". That
is like saying n=n-1, because once follow the two dots up to the next directory
the two dots refer to the next directory up.
I don't think anyone in this list understands what is going on for you, so I
recommend
On 09/14/2018 02:12 PM, Rich Shepard wrote:
On Thu, 13 Sep 2018, Henrik Bengtsson wrote:
sink('stat-summaries/estacada-se-precip.txt')
print(summary(estacada_se_wx))
sink()
while accepting:
pdf('../images/rainfall-estacada-se.pdf')
plot(rain_est_se)
dev.off()
Changing the sink() file
I find your "explanation" confusing. You appear to be misusing
print(). Please read ?print carefully. You print objects in R, not
files. Objects in R do not have "/" in their names (without some
trickery). See ?make.names .
-- Bert
Bert Gunter
"The trouble with having an open mind is that
There is no path in print. The path (file) is set in sink().
Peter
On Thu, Sep 13, 2018 at 4:35 PM Rich Shepard
wrote:
> On Thu, 13 Sep 2018, Peter Langfelder wrote:
>
> > Remove the / from the print command, it does not belong there.
>
> Peter,
>
>So the print() function cannot accept a
For the second time: Rich, there should be no slash in the print() command.
Use the form
sink("../directory/file")
print(summary(foo)) ### no slashes here
sink(NULL)
Peter
On Thu, Sep 13, 2018 at 7:12 PM Rich Shepard
wrote:
> On Thu, 13 Sep 2018, Henrik Bengtsson wrote:
>
> >>
On Thu, 13 Sep 2018, Henrik Bengtsson wrote:
sink('stat-summaries/estacada-se-precip.txt')
print(summary(estacada_se_wx))
sink()
while accepting:
pdf('../images/rainfall-estacada-se.pdf')
plot(rain_est_se)
dev.off()
Changing the sink() file to
'./stat-summaries/estacada-se-precip.txt'
On Thu, Sep 13, 2018 at 6:05 PM Rich Shepard wrote:
>
> On Thu, 13 Sep 2018, MacQueen, Don wrote:
>
> > 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.
>
> Don,
>
>That's been my experiences, too.
>
> >
On Thu, 13 Sep 2018, MacQueen, Don wrote:
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.
Don,
That's been my experiences, too.
Hopefully, that helps...
That's why I don't understand why the plot()
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
On Fri, 14 Sep 2018, Rolf Turner wrote:
This is simply incorrect; "./" refers to the current directory but "/" refers
to the root directory.
Rolf,
I was not sufficientl clear.
Note that sink("./mung.txt") gives the same result as sink("mung.txt"). I.e.
the "./" is redundant.
If you
On Thu, 13 Sep 2018, Peter Langfelder wrote:
Remove the / from the print command, it does not belong there.
Peter,
So the print() function cannot accept a relative path to a different
directory for its output? This does seem to be the case:
source('rainfall-dubois-crk-all.r')
Error in
On 09/14/2018 10:49 AM, Rich Shepard 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.
This is simply incorrect; "./"
Remove the / from the print command, it does not belong there.
sink("../directory/file.txt");
print(summary(foo))
sink(NULL)
On Thu, Sep 13, 2018 at 4:03 PM Rich Shepard
wrote:
> On Thu, 13 Sep 2018, Rich Shepard wrote:
>
> > sink('example-output.txt')
> > print(summary(df))
> > sink()
>
>
On Thu, 13 Sep 2018, Rich Shepard wrote:
sink('example-output.txt')
print(summary(df))
sink()
Let me expand on this. When the script contains
# Open PDF device to save plot
pdf('../images/rainfall-estacada-se.pdf')
...
plot(rain_est_se)
dev.off()
the file, rainfall-estacada-se.pdf is
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
On Thu, Sep 13, 2018 at 3:33 PM Rich Shepard wrote:
>
>Neither ?sink nor ?capture.output indicates how the output file can be
> specified to be in a directory other than the cwd.
>
>When the cwd is ../analyses/ and I want the output to be in
> ../analyses/stat-summaries/ how do I write
Neither ?sink nor ?capture.output indicates how the output file can be
specified to be in a directory other than the cwd.
When the cwd is ../analyses/ and I want the output to be in
../analyses/stat-summaries/ how do I write this?
sink('example-output.txt')
print(summary(df))
sink()
Dear R People:
Is there a way that sink will capture the input as well as the output please?
Thanks,
Erin
--
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com
Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
project.org] On Behalf Of Erin Hodgess
Sent: Friday, December 17, 2010 12:40 PM
To: R help
Subject: [R] sink output
Dear R People:
Is there a way
26 matches
Mail list logo