[R] No output in sourced R program

Berwin A Turlach berwin at maths.uwa.edu.au
Wed May 17 12:16:03 CEST 2006


G'day Sigbert,

>>>>> "SK" == Sigbert Klinke <sigbert at wiwi.hu-berlin.de> writes:

    SK> Hi, If I type it in the command line I get, as expected:

    >> 1:30
    SK> [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
    SK> 23 24 25 [26] 26 27 28 29 30
    >> q()
    SK> Save workspace image? [y/n/c]: n

    SK> If I create a program
    SK> 02e451444d6a46acf551996579092c911b90aa8e.R and run it I get

    SK> R : Copyright 2006, The R Foundation for Statistical Computing
    SK> Version 2.3.0 (2006-04-24)
    >> source("02e451444d6a46acf551996579092c911b90aa8e.R")
    SK> Save workspace image? [y/n/c]: n

    SK> mars:/srv/www/htdocs/mediawiki/teachwiki/Rfiles # more
    SK> 02e451444d6a46acf551996579092c911b90aa8e.R
    SK> rfiles<-"/srv/www/htdocs/mediawiki/teachwiki/Rfiles" 1:30 q()

    SK> No output from 1:30 to the screen. Any idea what I do wrong ?
Autoprint of objects is only enabled on the command line, on all other
levels you have to explictly call the print() command.  So your script
should be:
        print(1:30)
        q()

BTW, interesting name for the file.  How do you select that one? ;-)

Cheers,

        Berwin

PS:  I heard rumours that Wiwi had HU-Berlin was using R instead of
     XploRe for some tasks..... Slowly I start to believe it... :-))

========================== Full address ============================
Berwin A Turlach                      Tel.: +61 (8) 6488 3338 (secr)   
School of Mathematics and Statistics        +61 (8) 6488 3383 (self)      
The University of Western Australia   FAX : +61 (8) 6488 1028
35 Stirling Highway                   
Crawley WA 6009                e-mail: berwin at maths.uwa.edu.au
Australia                        http://www.maths.uwa.edu.au/~berwin




More information about the R-help mailing list