[R] Missing information in source()

Daniel Nordlund djnordlund at gmail.com
Tue Nov 7 21:37:50 CET 2017


On 11/7/2017 12:01 PM, Tom Backer Johnsen wrote:
> Dear R-help,
> 
> I am running a Mac under Sierra, with R version 3.4.2 and RStudio 1.1.383.  When running head () or tail () on an object in a script using source (<script name>) nothing appears in the output file, but if I use these commands in the normal R window the normal output appears.
> 
> What am I doing wrong?
> 
> Tom Backer Johnsen
> University of Bergen
> Norway
> ______________________________________________
> R-help at 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.
> 

I believe you need to wrap your call to head/tail in a print statement:

print(head(_whatever_))


Hope this is helpful,


Dan



-- 
Daniel Nordlund
Port Townsend, WA  USA



More information about the R-help mailing list