<div dir="auto"><div>When sourcing and R script from within R using:</div><div dir="auto"><br></div><div dir="auto">    source("<span style="font-family:sans-serif">practice.R")</span></div><div dir="auto"><br></div><div dir="auto">or running it in batch mode from the command line using:</div><div dir="auto"><br></div><div dir="auto">    Rscript practice.R</div><div dir="auto"><br></div><div dir="auto">you need to explicitly print objects in order for them to be outputted, e.g.</div><div dir="auto"><br></div><div dir="auto">    print(x)</div><div dir="auto"><br></div><div dir="auto">This also works in interactive mode, but since it is tedious to type, R is designed to print all objects by default in interactive mode, i.e. typing 'x' plus ENTER at the R prompt is automatically turned into a print(x) by R.</div><div dir="auto"><br></div><div dir="auto">Hope this helps</div><div dir="auto"><br></div><div dir="auto">Henrik</div><div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr">On Thu, Apr 5, 2018, 03:46 Jude DaShiell via BlindRUG <<a href="mailto:blindrug@nfbnet.org">blindrug@nfbnet.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Can you run that batch file through windows command line mode after<br>
deleting that myoutput file?  You may have better results.<br>
On Thu, 5 Apr<br>
2018, Rohit Saraf via BlindRUG wrote:<br>
<br>
> Date: Thu, 5 Apr 2018 04:47:52<br>
> From: Rohit Saraf via BlindRUG <<a href="mailto:blindrug@nfbnet.org" target="_blank" rel="noreferrer">blindrug@nfbnet.org</a>><br>
> To: <a href="mailto:blindrug@nfbnet.org" target="_blank" rel="noreferrer">blindrug@nfbnet.org</a><br>
> Cc: Rohit Saraf <<a href="mailto:rohitsaraf15@gmail.com" target="_blank" rel="noreferrer">rohitsaraf15@gmail.com</a>><br>
> Subject: [BlindRUG] Running the Batch file - no output<br>
><br>
> Hi<br>
> I wrote the following code in the notepad file 'practice.R':<br>
> x=1:20<br>
> x<br>
><br>
> Then I created a batch file with one line command expecting result in<br>
> a new txt file 'myoutput.txt'.<br>
> When i run the batch file through windows explorer, the new file<br>
> 'myoutput.txt' is created but there is no output in the file. In fact,<br>
> the file is empty.<br>
><br>
> Could you please guide me to how to run a batch file properly.<br>
><br>
><br>
><br>
<br>
--<br>
<br>
<br>
_______________________________________________<br>
BlindRUG mailing list<br>
<a href="mailto:BlindRUG@nfbnet.org" target="_blank" rel="noreferrer">BlindRUG@nfbnet.org</a><br>
<a href="http://nfbnet.org/mailman/listinfo/blindrug_nfbnet.org" rel="noreferrer noreferrer" target="_blank">http://nfbnet.org/mailman/listinfo/blindrug_nfbnet.org</a><br>
To unsubscribe, change your list options or get your account info for BlindRUG:<br>
<a href="http://nfbnet.org/mailman/options/blindrug_nfbnet.org/henrik.bengtsson%40gmail.com" rel="noreferrer noreferrer" target="_blank">http://nfbnet.org/mailman/options/blindrug_nfbnet.org/henrik.bengtsson%40gmail.com</a><br>
The list archive can be viewed at:<br>
<a href="http://www.nfbnet.org/pipermail/blindrug_nfbnet.org" rel="noreferrer noreferrer" target="_blank">http://www.nfbnet.org/pipermail/blindrug_nfbnet.org</a><br>
More information and useful links about using R as a blind person can be obtained at:<br>
<a href="http://R-Resources.massey.ac.nz" rel="noreferrer noreferrer" target="_blank">http://R-Resources.massey.ac.nz</a><br>
<br>
Look for help using R commands by reading the accessible e-book "Let's Use R Now" compiled by Jonathan Godfrey at:<br>
<a href="http://R-Resources.massey.ac.nz/lurn/front.html" rel="noreferrer noreferrer" target="_blank">http://R-Resources.massey.ac.nz/lurn/front.html</a><br>
</blockquote></div></div></div>