Re: [R] R Console Output

2014-07-01 Thread Cheryl Johnson
\AppData\Local\Temp\RtmpqayKkJ/file00071.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00072.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00073.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00074.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00075.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00076.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00077.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00078.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00079.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00080.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00081.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00082.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00083.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00084.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00085.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00086.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00087.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00088.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00089.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00090.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00091.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00092.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00093.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00094.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00095.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00096.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00097.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00098.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00099.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00100.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00101.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00102.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00103.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00104.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00105.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00106.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00107.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00108.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00109.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00110.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00111.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00112.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00113.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00114.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00115.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00116.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00117.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00118.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00119.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00120.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00121.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00122.png
C:\Users\CHERYL\AppData\Local\Temp\RtmpqayKkJ/file00123.png
C:\Users\CHERYL
















On Mon, Jun 30, 2014 at 4:33 PM, jim holtman jholt...@gmail.com wrote:

 What do you mean by stops?  Can you at least show what was on the
 console.  Can you continue to enter commands?  It is not clear what you are
 talking about.


 Jim Holtman
 Data Munger Guru

 What is the problem that you are trying to solve?
 Tell me what you want to do, not how you want to do it.


 On Mon, Jun 30, 2014 at 10:56 AM, Cheryl Johnson 
 johnson.cheryl...@gmail.com wrote:

 When I run code in R, my R console output stops before all the code has
 complied. There are no error messages, but there must be an error
 somewhere. Thanks in advance for any guidance.

 [[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list
 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.




[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.


[R] R Console Output

2014-06-30 Thread Cheryl Johnson
When I run code in R, my R console output stops before all the code has
complied. There are no error messages, but there must be an error
somewhere. Thanks in advance for any guidance.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.


Re: [R] R Console Output

2014-06-30 Thread jim holtman
What do you mean by stops?  Can you at least show what was on the
console.  Can you continue to enter commands?  It is not clear what you are
talking about.


Jim Holtman
Data Munger Guru

What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.


On Mon, Jun 30, 2014 at 10:56 AM, Cheryl Johnson 
johnson.cheryl...@gmail.com wrote:

 When I run code in R, my R console output stops before all the code has
 complied. There are no error messages, but there must be an error
 somewhere. Thanks in advance for any guidance.

 [[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list
 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.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.


Re: [R] Console Output Formatting

2013-09-16 Thread Noah Silverman
Neal,

I like this answer.  Simple and clean.  Don't know why I didn't think of that 
before.

Thanks!

--
Noah Silverman, M.S., C.Phil
UCLA Department of Statistics
8117 Math Sciences Building
Los Angeles, CA 90095


On Sep 4, 2013, at 3:12 PM, Neal Fultz nfu...@gmail.com wrote:

  print(1:100)
   [1]   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18 
  19  20  21  22  23  24  25  26
  [27]  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44 
  45  46  47  48  49  50  51  52
  [53]  53  54  55  56  57  58  59  60  61  62  63  64  65  66  67  68  69  70 
  71  72  73  74  75  76  77  78
  [79]  79  80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95  96 
  97  98  99 100
  cat(1:100)
 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 
 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 
 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 
 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
 
 
 
 On Wed, Sep 4, 2013 at 3:09 PM, Prof Brian Ripley rip...@stats.ox.ac.uk 
 wrote:
 On 04/09/2013 22:56, Noah Silverman wrote:
 Hi,
 
 Working with R, I often want to copy and paste some values somewhere else.  
 (Its not worth saving a CSV file for a dozen or so entries.)  Or, I may want 
 to copy all the names of an object into some code.
 
 R, rather nicely, wraps output with an index number on the left side.
 
 For example:
 
 [1] -1.07781972 -1.12157840  1.79303276  1.53313388 -1.30854455  0.45641730  
 0.23866722 -1.96265084
[9] -1.90779578 -0.68418936 -2.04910282  0.12008358 -1.71072687 
 -0.36707605 -0.36939204 -2.02799948
   [17]  0.36466562 -1.34204214 -0.45100125 -0.60483154  0.42208268 
 -0.89535576 -1.09398009 -2.07257728
   [25] -0.04615273 -0.23659570  0.27232736  1.28432538 -2.17042948 
 -0.45364579  1.52957528  0.39838320
   [33]  0.64923323 -1.01651051 -0.36287974 -0.73787761  0.48088199 
 -1.19539814 -0.80079095 -1.02507331
 
 
 
 While this is great to read on screen, it is a pain to have to edit out all 
 the index numbers.
 
 Is there a simple way to just back the values, or even a comma separated list 
 of the values?
 
 There are many.  Here I usually use write(x, ).  The file =  trick works 
 in many other functions.
 
 Using dput() and removing c( and ) is also often useful when comma separation 
 is needed.
 
 
 -- 
 Brian D. Ripley,  rip...@stats.ox.ac.uk
 Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
 University of Oxford, Tel:  +44 1865 272861 (self)
 1 South Parks Road, +44 1865 272866 (PA)
 Oxford OX1 3TG, UKFax:  +44 1865 272595
 
 
 __
 R-help@r-project.org mailing list
 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.
 


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.


Re: [R] Console Output Formatting

2013-09-04 Thread Steve Friedman
Depending on the OS you are working with awk or gawk are great utilities
for stripping columns from files.  Also if you use a spreadsheet it is
quite easy to drop a column.
On Sep 4, 2013 5:59 PM, Noah Silverman noahsilver...@ucla.edu wrote:

 Hi,

 Working with R, I often want to copy and paste some values somewhere else.
  (Its not worth saving a CSV file for a dozen or so entries.)  Or, I may
 want to copy all the names of an object into some code.

 R, rather nicely, wraps output with an index number on the left side.

 For example:

 [1] -1.07781972 -1.12157840  1.79303276  1.53313388 -1.30854455
  0.45641730  0.23866722 -1.96265084
   [9] -1.90779578 -0.68418936 -2.04910282  0.12008358 -1.71072687
 -0.36707605 -0.36939204 -2.02799948
  [17]  0.36466562 -1.34204214 -0.45100125 -0.60483154  0.42208268
 -0.89535576 -1.09398009 -2.07257728
  [25] -0.04615273 -0.23659570  0.27232736  1.28432538 -2.17042948
 -0.45364579  1.52957528  0.39838320
  [33]  0.64923323 -1.01651051 -0.36287974 -0.73787761  0.48088199
 -1.19539814 -0.80079095 -1.02507331



 While this is great to read on screen, it is a pain to have to edit out
 all the index numbers.

 Is there a simple way to just back the values, or even a comma separated
 list of the values?



 Thanks!



 --
 Noah Silverman, M.S., C.Phil
 UCLA Department of Statistics
 8117 Math Sciences Building
 Los Angeles, CA 90095

 __
 R-help@r-project.org mailing list
 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.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.


Re: [R] Console Output Formatting

2013-09-04 Thread Prof Brian Ripley

On 04/09/2013 22:56, Noah Silverman wrote:

Hi,

Working with R, I often want to copy and paste some values somewhere else.  
(Its not worth saving a CSV file for a dozen or so entries.)  Or, I may want to 
copy all the names of an object into some code.

R, rather nicely, wraps output with an index number on the left side.

For example:

[1] -1.07781972 -1.12157840  1.79303276  1.53313388 -1.30854455  0.45641730  
0.23866722 -1.96265084
   [9] -1.90779578 -0.68418936 -2.04910282  0.12008358 -1.71072687 -0.36707605 
-0.36939204 -2.02799948
  [17]  0.36466562 -1.34204214 -0.45100125 -0.60483154  0.42208268 -0.89535576 
-1.09398009 -2.07257728
  [25] -0.04615273 -0.23659570  0.27232736  1.28432538 -2.17042948 -0.45364579  
1.52957528  0.39838320
  [33]  0.64923323 -1.01651051 -0.36287974 -0.73787761  0.48088199 -1.19539814 
-0.80079095 -1.02507331



While this is great to read on screen, it is a pain to have to edit out all the 
index numbers.

Is there a simple way to just back the values, or even a comma separated list 
of the values?


There are many.  Here I usually use write(x, ).  The file =  trick 
works in many other functions.


Using dput() and removing c( and ) is also often useful when comma 
separation is needed.



--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-help@r-project.org mailing list
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.


Re: [R] Console Output Formatting

2013-09-04 Thread Neal Fultz
 print(1:100)  [1]   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15 
  16  17  18  19  20  21  22  23  24  25  26
 [27]  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42
43  44  45  46  47  48  49  50  51  52
 [53]  53  54  55  56  57  58  59  60  61  62  63  64  65  66  67  68
69  70  71  72  73  74  75  76  77  78
 [79]  79  80  81  82  83  84  85  86  87  88  89  90  91  92  93  94
95  96  97  98  99 100 cat(1:100)1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100



On Wed, Sep 4, 2013 at 3:09 PM, Prof Brian Ripley rip...@stats.ox.ac.ukwrote:

 On 04/09/2013 22:56, Noah Silverman wrote:

 Hi,

 Working with R, I often want to copy and paste some values somewhere
 else.  (Its not worth saving a CSV file for a dozen or so entries.)  Or, I
 may want to copy all the names of an object into some code.

 R, rather nicely, wraps output with an index number on the left side.

 For example:

 [1] -1.07781972 -1.12157840  1.79303276  1.53313388 -1.30854455
  0.45641730  0.23866722 -1.96265084
[9] -1.90779578 -0.68418936 -2.04910282  0.12008358 -1.71072687
 -0.36707605 -0.36939204 -2.02799948
   [17]  0.36466562 -1.34204214 -0.45100125 -0.60483154  0.42208268
 -0.89535576 -1.09398009 -2.07257728
   [25] -0.04615273 -0.23659570  0.27232736  1.28432538 -2.17042948
 -0.45364579  1.52957528  0.39838320
   [33]  0.64923323 -1.01651051 -0.36287974 -0.73787761  0.48088199
 -1.19539814 -0.80079095 -1.02507331



 While this is great to read on screen, it is a pain to have to edit out
 all the index numbers.

 Is there a simple way to just back the values, or even a comma separated
 list of the values?


 There are many.  Here I usually use write(x, ).  The file =  trick
 works in many other functions.

 Using dput() and removing c( and ) is also often useful when comma
 separation is needed.


 --
 Brian D. Ripley,  rip...@stats.ox.ac.uk
 Professor of Applied Statistics,  
 http://www.stats.ox.ac.uk/~**ripley/http://www.stats.ox.ac.uk/~ripley/
 University of Oxford, Tel:  +44 1865 272861 (self)
 1 South Parks Road, +44 1865 272866 (PA)
 Oxford OX1 3TG, UKFax:  +44 1865 272595


 __**
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/**listinfo/r-helphttps://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/**
 posting-guide.html http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.


Re: [R] Console Output Formatting

2013-09-04 Thread arun
Hi,
You could use ?cat()
For ex:
vec1-1:100
cat(vec1)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 
 cat(vec1,sep=,)
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100
 

#or
 write(vec1,,sep=,)
1,2,3,4,5
6,7,8,9,10
11,12,13,14,15
16,17,18,19,20
21,22,23,24,25
26,27,28,29,30
31,32,33,34,35
36,37,38,39,40
41,42,43,44,45
46,47,48,49,50
51,52,53,54,55
56,57,58,59,60
61,62,63,64,65
66,67,68,69,70
71,72,73,74,75
76,77,78,79,80
81,82,83,84,85
86,87,88,89,90
91,92,93,94,95
96,97,98,99,100


A.K.





- Original Message -
From: Noah Silverman noahsilver...@ucla.edu
To: R help r-help@r-project.org
Cc: 
Sent: Wednesday, September 4, 2013 5:56 PM
Subject: [R] Console Output Formatting

Hi,

Working with R, I often want to copy and paste some values somewhere else.  
(Its not worth saving a CSV file for a dozen or so entries.)  Or, I may want to 
copy all the names of an object into some code.

R, rather nicely, wraps output with an index number on the left side.

For example:

[1] -1.07781972 -1.12157840  1.79303276  1.53313388 -1.30854455  0.45641730  
0.23866722 -1.96265084
  [9] -1.90779578 -0.68418936 -2.04910282  0.12008358 -1.71072687 -0.36707605 
-0.36939204 -2.02799948
[17]  0.36466562 -1.34204214 -0.45100125 -0.60483154  0.42208268 -0.89535576 
-1.09398009 -2.07257728
[25] -0.04615273 -0.23659570  0.27232736  1.28432538 -2.17042948 -0.45364579  
1.52957528  0.39838320
[33]  0.64923323 -1.01651051 -0.36287974 -0.73787761  0.48088199 -1.19539814 
-0.80079095 -1.02507331



While this is great to read on screen, it is a pain to have to edit out all the 
index numbers.  

Is there a simple way to just back the values, or even a comma separated list 
of the values?



Thanks!



--
Noah Silverman, M.S., C.Phil
UCLA Department of Statistics
8117 Math Sciences Building
Los Angeles, CA 90095

__
R-help@r-project.org mailing list
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.


__
R-help@r-project.org mailing list
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.


[R] Console Output Formatting

2013-09-04 Thread Noah Silverman
Hi,

Working with R, I often want to copy and paste some values somewhere else.  
(Its not worth saving a CSV file for a dozen or so entries.)  Or, I may want to 
copy all the names of an object into some code.

R, rather nicely, wraps output with an index number on the left side.

For example:

[1] -1.07781972 -1.12157840  1.79303276  1.53313388 -1.30854455  0.45641730  
0.23866722 -1.96265084
  [9] -1.90779578 -0.68418936 -2.04910282  0.12008358 -1.71072687 -0.36707605 
-0.36939204 -2.02799948
 [17]  0.36466562 -1.34204214 -0.45100125 -0.60483154  0.42208268 -0.89535576 
-1.09398009 -2.07257728
 [25] -0.04615273 -0.23659570  0.27232736  1.28432538 -2.17042948 -0.45364579  
1.52957528  0.39838320
 [33]  0.64923323 -1.01651051 -0.36287974 -0.73787761  0.48088199 -1.19539814 
-0.80079095 -1.02507331



While this is great to read on screen, it is a pain to have to edit out all the 
index numbers.  

Is there a simple way to just back the values, or even a comma separated list 
of the values?



Thanks!



--
Noah Silverman, M.S., C.Phil
UCLA Department of Statistics
8117 Math Sciences Building
Los Angeles, CA 90095

__
R-help@r-project.org mailing list
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.


Re: [R] Console Output Formatting

2013-09-04 Thread Duncan Murdoch

On 13-09-04 5:56 PM, Noah Silverman wrote:

Hi,

Working with R, I often want to copy and paste some values somewhere else.  
(Its not worth saving a CSV file for a dozen or so entries.)  Or, I may want to 
copy all the names of an object into some code.


Besides the other suggestions, the data editor in R can be a source for 
cut and paste to a spreadsheet, at least in Windows and Mac OSX.  This 
is useful for matrices and dataframes.


Duncan Murdoch



R, rather nicely, wraps output with an index number on the left side.

For example:

[1] -1.07781972 -1.12157840  1.79303276  1.53313388 -1.30854455  0.45641730  
0.23866722 -1.96265084
   [9] -1.90779578 -0.68418936 -2.04910282  0.12008358 -1.71072687 -0.36707605 
-0.36939204 -2.02799948
  [17]  0.36466562 -1.34204214 -0.45100125 -0.60483154  0.42208268 -0.89535576 
-1.09398009 -2.07257728
  [25] -0.04615273 -0.23659570  0.27232736  1.28432538 -2.17042948 -0.45364579  
1.52957528  0.39838320
  [33]  0.64923323 -1.01651051 -0.36287974 -0.73787761  0.48088199 -1.19539814 
-0.80079095 -1.02507331



While this is great to read on screen, it is a pain to have to edit out all the 
index numbers.

Is there a simple way to just back the values, or even a comma separated list 
of the values?



Thanks!



--
Noah Silverman, M.S., C.Phil
UCLA Department of Statistics
8117 Math Sciences Building
Los Angeles, CA 90095

__
R-help@r-project.org mailing list
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.



__
R-help@r-project.org mailing list
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.


[R] Capture R-Console Output to Excel with RExcel

2011-08-11 Thread Meier Dario
Hello All

I've just started to use RExcel instead of CMD Batches. But I don't get
the console output to an data.frame and push to Excel.

With the CMD batch you got the console out relatively easy with

C:\LocalData\R\bin\R CMD BATCH --slave %rscript% %logfile%

to a file. But how can I get it to Excel with RExcel an VBA?

Thanks,
Dario

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.


Re: [R] Capture R-Console Output to Excel with RExcel

2011-08-11 Thread David Winsemius


On Aug 11, 2011, at 7:46 AM, Meier Dario wrote:


Hello All

I've just started to use RExcel instead of CMD Batches. But I don't  
get

the console output to an data.frame and push to Excel.

With the CMD batch you got the console out relatively easy with

C:\LocalData\R\bin\R CMD BATCH --slave %rscript% %logfile%

to a file. But how can I get it to Excel with RExcel an VBA?


I am guessing that either sink()  or capture.output() with the  
clipboard as the destination file should work. It's just a character  
stream, right? Cannot test since I'm on a different OS. You will  
undoubtedly need to process further, perhaps with the import text to  
columns using the fixed-width format panel since console output will  
not be tab delimited.


(There is also an RExcel Mailing list, although this doesn't really  
seem like the issues involved depend on RExcel.)


--

David Winsemius, MD
West Hartford, CT

__
R-help@r-project.org mailing list
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.


[R] Console output

2011-02-21 Thread Antje Niederlein
Hi there,

I though there has been a possibility to force the output on the
console with one element per line. Instead of this:

 1:10
 [1]  1  2  3  4  5  6  7  8  9 10

something like this

 1:10
[1]   1
[2]   2
[3]   3
[4]   4
[5]   5
[6]   6
[7]   7
[8]   8
[9]   9
[10]   10

Can anybody help?

Antje

__
R-help@r-project.org mailing list
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.


Re: [R] Console output

2011-02-21 Thread John Kane
I am not aware of one, bu I don`t know that much.  You an change the vector to 
a data.frame but it could introduce complications.:)

Example:
===
vec - 1:10
df1 -  data.frame(vec)
df1
===

--- On Mon, 2/21/11, Antje Niederlein niederlein-rs...@yahoo.de wrote:

 From: Antje Niederlein niederlein-rs...@yahoo.de
 Subject: [R] Console output
 To: r-help@r-project.org
 Received: Monday, February 21, 2011, 5:21 AM
 Hi there,
 
 I though there has been a possibility to force the output
 on the
 console with one element per line. Instead of this:
 
  1:10
  [1]  1  2  3  4  5  6 
 7  8  9 10
 
 something like this
 
  1:10
 [1]   1
 [2]   2
 [3]   3
 [4]   4
 [5]   5
 [6]   6
 [7]   7
 [8]   8
 [9]   9
 [10]   10
 
 Can anybody help?
 
 Antje
 
 __
 R-help@r-project.org
 mailing list
 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.
 



__
R-help@r-project.org mailing list
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.


Re: [R] Console output

2011-02-21 Thread Yves REECHT
  Hi,

You may try

invisible(sapply(1:10, print))

Yves


Le 21/02/2011 11:21, Antje Niederlein a écrit :
 Hi there,

 I though there has been a possibility to force the output on the
 console with one element per line. Instead of this:

 1:10
   [1]  1  2  3  4  5  6  7  8  9 10

 something like this

 1:10
 [1]   1
 [2]   2
 [3]   3
 [4]   4
 [5]   5
 [6]   6
 [7]   7
 [8]   8
 [9]   9
 [10]   10

 Can anybody help?

 Antje

 __
 R-help@r-project.org mailing list
 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.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.


Re: [R] Console output

2011-02-21 Thread Ted Harding
That doesn't produce quite what Antje asked for (since each
line gets number [1]). The following does work:

print(cbind(NULL,(1:10)))
  [,1]
 [1,]1
 [2,]2
 [3,]3
 [4,]4
 [5,]5
 [6,]6
 [7,]7
 [8,]8
 [9,]9
[10,]   10

(apart from the unwanted column-name [,1], and the , in rows).

Ted.

On 21-Feb-11 10:30:37, Yves REECHT wrote:
   Hi,
 You may try
 
 invisible(sapply(1:10, print))
 
 Yves
 
 
 Le 21/02/2011 11:21, Antje Niederlein a écrit :
 Hi there,

 I though there has been a possibility to force the output on the
 console with one element per line. Instead of this:

 1:10
   [1]  1  2  3  4  5  6  7  8  9 10

 something like this

 1:10
 [1]   1
 [2]   2
 [3]   3
 [4]   4
 [5]   5
 [6]   6
 [7]   7
 [8]   8
 [9]   9
 [10]   10

 Can anybody help?
 Antje


E-Mail: (Ted Harding) ted.hard...@wlandres.net
Fax-to-email: +44 (0)870 094 0861
Date: 21-Feb-11   Time: 11:08:17
-- XFMail --

__
R-help@r-project.org mailing list
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.


Re: [R] Console output

2011-02-21 Thread Martin Maechler
 Ted Harding ted.hard...@wlandres.net
 on Mon, 21 Feb 2011 11:08:19 - (GMT) writes:

 That doesn't produce quite what Antje asked for (since each
 line gets number [1]). The following does work:

 print(cbind(NULL,(1:10)))
 [,1]
 [1,]1
 [2,]2
 [3,]3
 [4,]4
 [5,]5
 [6,]6
 [7,]7
 [8,]8
 [9,]9
 [10,]   10

 (apart from the unwanted column-name [,1], and the , in
 rows).

In principle, there would be a true solution,
but as you see, it's not quite possibly (by that means):

 op - options(width=7)
Error in options(width = 7) : 
  invalid 'width' parameter, allowed 10...1
 op - options(width=10)
 1:10
 [1]  1  2
 [3]  3  4
 [5]  5  6
 [7]  7  8
 [9]  9 10
 1000+ 0:9 ## works for these
 [1] 1000
 [2] 1001
 [3] 1002
 [4] 1003
 [5] 1004
 [6] 1005
 [7] 1006
 [8] 1007
 [9] 1008
[10] 1009
 

---

In principle, the lower bound (10) for the width option could be
lowered a bit more, as I think 10 had been a somewhat arbitrary
choice protecting useRs from hanging themselves..

Martin


 Ted.

 On 21-Feb-11 10:30:37, Yves REECHT wrote:
 Hi,
 You may try
 
 invisible(sapply(1:10, print))
 
 Yves
 
 
 Le 21/02/2011 11:21, Antje Niederlein a écrit :
 Hi there,
 
 I though there has been a possibility to force the output on
 the console with one element per line. Instead of this:
 
 1:10
 [1]  1  2  3  4  5  6  7  8  9 10
 
 something like this
 
 1:10
 [1]   1
 [2]   2
 [3]   3
 [4]   4
 [5]   5
 [6]   6
 [7]   7
 [8]   8
 [9]   9
 [10]   10
 
 Can anybody help?
 Antje

 
 E-Mail: (Ted Harding) ted.hard...@wlandres.net Fax-to-email:
 +44 (0)870 094 0861 Date: 21-Feb-11 Time: 11:08:17
 -- XFMail
 --

 __
 R-help@r-project.org mailing list
 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.

__
R-help@r-project.org mailing list
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.


Re: [R] Console output

2011-02-21 Thread Antje Niederlein
Thanks for every helpful answer :-) !
I thought it was something easier but as long as there is a solution
it's fine for me.

Ciao,
Antje



On 21 February 2011 13:12, Martin Maechler maech...@stat.math.ethz.ch wrote:
 Ted Harding ted.hard...@wlandres.net
     on Mon, 21 Feb 2011 11:08:19 - (GMT) writes:

     That doesn't produce quite what Antje asked for (since each
     line gets number [1]). The following does work:

     print(cbind(NULL,(1:10)))
     [,1]
     [1,]    1
     [2,]    2
     [3,]    3
     [4,]    4
     [5,]    5
     [6,]    6
     [7,]    7
     [8,]    8
     [9,]    9
     [10,]   10

     (apart from the unwanted column-name [,1], and the , in
     rows).

 In principle, there would be a true solution,
 but as you see, it's not quite possibly (by that means):

 op - options(width=7)
 Error in options(width = 7) :
  invalid 'width' parameter, allowed 10...1
 op - options(width=10)
 1:10
  [1]  1  2
  [3]  3  4
  [5]  5  6
  [7]  7  8
  [9]  9 10
 1000+ 0:9 ## works for these
  [1] 1000
  [2] 1001
  [3] 1002
  [4] 1003
  [5] 1004
  [6] 1005
  [7] 1006
  [8] 1007
  [9] 1008
 [10] 1009


 ---

 In principle, the lower bound (10) for the width option could be
 lowered a bit more, as I think 10 had been a somewhat arbitrary
 choice protecting useRs from hanging themselves..

 Martin


     Ted.

     On 21-Feb-11 10:30:37, Yves REECHT wrote:
     Hi,
     You may try
    
     invisible(sapply(1:10, print))
    
     Yves
    
    
     Le 21/02/2011 11:21, Antje Niederlein a écrit :
     Hi there,
    
     I though there has been a possibility to force the output on
     the console with one element per line. Instead of this:
    
     1:10
     [1]  1  2  3  4  5  6  7  8  9 10
    
     something like this
    
     1:10
     [1]   1
     [2]   2
     [3]   3
     [4]   4
     [5]   5
     [6]   6
     [7]   7
     [8]   8
     [9]   9
     [10]   10
    
     Can anybody help?
     Antje

     
     E-Mail: (Ted Harding) ted.hard...@wlandres.net Fax-to-email:
     +44 (0)870 094 0861 Date: 21-Feb-11 Time: 11:08:17
     -- XFMail
     --

     __
     R-help@r-project.org mailing list
     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.

 __
 R-help@r-project.org mailing list
 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.


__
R-help@r-project.org mailing list
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.


Re: [R] Console output

2011-02-21 Thread Peter Ehlers

On 2011-02-21 04:21, Antje Niederlein wrote:

Thanks for every helpful answer :-) !
I thought it was something easier but as long as there is a solution
it's fine for me.

Ciao,
Antje


Here's one more that I use:

cat( 1:10, sep=\n )

But this won't give you the row numbers.
[I keep a function around:
  cat1 - function(x) cat(x, sep=\n)
]

I often use Ted's suggestion but you don't need the NULL:

 cbind(1:10)

will do.
I wasn't aware of Martin's clever idea.

Peter Ehlers





On 21 February 2011 13:12, Martin Maechlermaech...@stat.math.ethz.ch  wrote:

Ted Hardingted.hard...@wlandres.net
 on Mon, 21 Feb 2011 11:08:19 - (GMT) writes:


  That doesn't produce quite what Antje asked for (since each
  line gets number [1]). The following does work:

  print(cbind(NULL,(1:10)))
  [,1]
  [1,]1
  [2,]2
  [3,]3
  [4,]4
  [5,]5
  [6,]6
  [7,]7
  [8,]8
  [9,]9
  [10,]   10

  (apart from the unwanted column-name [,1], and the , in
  rows).

In principle, there would be a true solution,
but as you see, it's not quite possibly (by that means):


op- options(width=7)

Error in options(width = 7) :
  invalid 'width' parameter, allowed 10...1

op- options(width=10)
1:10

  [1]  1  2
  [3]  3  4
  [5]  5  6
  [7]  7  8
  [9]  9 10

1000+ 0:9 ## works for these

  [1] 1000
  [2] 1001
  [3] 1002
  [4] 1003
  [5] 1004
  [6] 1005
  [7] 1006
  [8] 1007
  [9] 1008
[10] 1009




---

In principle, the lower bound (10) for the width option could be
lowered a bit more, as I think 10 had been a somewhat arbitrary
choice protecting useRs from hanging themselves..

Martin


  Ted.

  On 21-Feb-11 10:30:37, Yves REECHT wrote:
  Hi,
  You may try

  invisible(sapply(1:10, print))

  Yves


  Le 21/02/2011 11:21, Antje Niederlein a écrit :
  Hi there,

  I though there has been a possibility to force the output on
  the console with one element per line. Instead of this:

  1:10
  [1]  1  2  3  4  5  6  7  8  9 10

  something like this

  1:10
  [1]   1
  [2]   2
  [3]   3
  [4]   4
  [5]   5
  [6]   6
  [7]   7
  [8]   8
  [9]   9
  [10]   10

  Can anybody help?
  Antje

  
  E-Mail: (Ted Harding)ted.hard...@wlandres.net  Fax-to-email:
  +44 (0)870 094 0861 Date: 21-Feb-11 Time: 11:08:17
  -- XFMail
  --

  __
  R-help@r-project.org mailing list
  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.

__
R-help@r-project.org mailing list
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.



__
R-help@r-project.org mailing list
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.


__
R-help@r-project.org mailing list
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.


Re: [R] Console output

2011-02-21 Thread Ted Harding
On 21-Feb-11 13:55:24, Peter Ehlers wrote:
 On 2011-02-21 04:21, Antje Niederlein wrote:
 Thanks for every helpful answer :-) !
 I thought it was something easier but as long as there is a solution
 it's fine for me.

 Ciao,
 Antje
 
 Here's one more that I use:
 
 cat( 1:10, sep=\n )
 
 But this won't give you the row numbers.
 [I keep a function around:
cat1 - function(x) cat(x, sep=\n)
 ]
 
 I often use Ted's suggestion but you don't need the NULL:
 
   cbind(1:10)
 
 will do.
 I wasn't aware of Martin's clever idea.
 
 Peter Ehlers

And I wasn;t aware that you don't need the NULL!
While I am at it, I've just thought of a way to get rid
of the unwanted column-name [,1]:

cbind( =1:10)

 [1,]  1
 [2,]  2
 [3,]  3
 [4,]  4
 [5,]  5
 [6,]  6
 [7,]  7
 [8,]  8
 [9,]  9
[10,] 10

(Well, it's there; but you can't see it).
Ted.



 On 21 February 2011 13:12, Martin Maechlermaech...@stat.math.ethz.ch
 wrote:
 Ted Hardingted.hard...@wlandres.net
  on Mon, 21 Feb 2011 11:08:19 - (GMT) writes:

   That doesn't produce quite what Antje asked for (since each
   line gets number [1]). The following does work:

   print(cbind(NULL,(1:10)))
   [,1]
   [1,]1
   [2,]2
   [3,]3
   [4,]4
   [5,]5
   [6,]6
   [7,]7
   [8,]8
   [9,]9
   [10,]   10

   (apart from the unwanted column-name [,1], and the , in
   rows).

 In principle, there would be a true solution,
 but as you see, it's not quite possibly (by that means):

 op- options(width=7)
 Error in options(width = 7) :
   invalid 'width' parameter, allowed 10...1
 op- options(width=10)
 1:10
   [1]  1  2
   [3]  3  4
   [5]  5  6
   [7]  7  8
   [9]  9 10
 1000+ 0:9 ## works for these
   [1] 1000
   [2] 1001
   [3] 1002
   [4] 1003
   [5] 1004
   [6] 1005
   [7] 1006
   [8] 1007
   [9] 1008
 [10] 1009


 ---

 In principle, the lower bound (10) for the width option could be
 lowered a bit more, as I think 10 had been a somewhat arbitrary
 choice protecting useRs from hanging themselves..

 Martin


   Ted.

   On 21-Feb-11 10:30:37, Yves REECHT wrote:
   Hi,
   You may try
 
   invisible(sapply(1:10, print))
 
   Yves
 
 
   Le 21/02/2011 11:21, Antje Niederlein a écrit :
   Hi there,
 
   I though there has been a possibility to force the output on
   the console with one element per line. Instead of this:
 
   1:10
   [1]  1  2  3  4  5  6  7  8  9 10
 
   something like this
 
   1:10
   [1]   1
   [2]   2
   [3]   3
   [4]   4
   [5]   5
   [6]   6
   [7]   7
   [8]   8
   [9]   9
   [10]   10
 
   Can anybody help?
   Antje

   ---
   -
   E-Mail: (Ted Harding)ted.hard...@wlandres.net  Fax-to-email:
   +44 (0)870 094 0861 Date: 21-Feb-11 Time: 11:08:17
   -- XFMail
   --

   __
   R-help@r-project.org mailing list
   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.

 __
 R-help@r-project.org mailing list
 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.


 __
 R-help@r-project.org mailing list
 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.
 
 __
 R-help@r-project.org mailing list
 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.


E-Mail: (Ted Harding) ted.hard...@wlandres.net
Fax-to-email: +44 (0)870 094 0861
Date: 21-Feb-11   Time: 14:09:18
-- XFMail --

__
R-help@r-project.org mailing list
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.


Re: [R] Console output

2011-02-21 Thread Ivan Calandra
It's nice to see all those solutions, but I'm wondering how it would be 
helpful to have the display like this.
I'm a bit curious because for me the R output formatting is not very 
important.


Ivan

Le 2/21/2011 15:09, (Ted Harding) a écrit :

On 21-Feb-11 13:55:24, Peter Ehlers wrote:

On 2011-02-21 04:21, Antje Niederlein wrote:

Thanks for every helpful answer :-) !
I thought it was something easier but as long as there is a solution
it's fine for me.

Ciao,
Antje

Here's one more that I use:

cat( 1:10, sep=\n )

But this won't give you the row numbers.
[I keep a function around:
cat1- function(x) cat(x, sep=\n)
]

I often use Ted's suggestion but you don't need the NULL:

   cbind(1:10)

will do.
I wasn't aware of Martin's clever idea.

Peter Ehlers

And I wasn;t aware that you don't need the NULL!
While I am at it, I've just thought of a way to get rid
of the unwanted column-name [,1]:

cbind( =1:10)

  [1,]  1
  [2,]  2
  [3,]  3
  [4,]  4
  [5,]  5
  [6,]  6
  [7,]  7
  [8,]  8
  [9,]  9
[10,] 10

(Well, it's there; but you can't see it).
Ted.




On 21 February 2011 13:12, Martin Maechlermaech...@stat.math.ethz.ch
wrote:

Ted Hardingted.hard...@wlandres.net
  on Mon, 21 Feb 2011 11:08:19 - (GMT) writes:

That doesn't produce quite what Antje asked for (since each
line gets number [1]). The following does work:

print(cbind(NULL,(1:10)))
[,1]
[1,]1
[2,]2
[3,]3
[4,]4
[5,]5
[6,]6
[7,]7
[8,]8
[9,]9
[10,]   10

(apart from the unwanted column-name [,1], and the , in
rows).

In principle, there would be a true solution,
but as you see, it's not quite possibly (by that means):


op- options(width=7)

Error in options(width = 7) :
   invalid 'width' parameter, allowed 10...1

op- options(width=10)
1:10

   [1]  1  2
   [3]  3  4
   [5]  5  6
   [7]  7  8
   [9]  9 10

1000+ 0:9 ## works for these

   [1] 1000
   [2] 1001
   [3] 1002
   [4] 1003
   [5] 1004
   [6] 1005
   [7] 1006
   [8] 1007
   [9] 1008
[10] 1009
---

In principle, the lower bound (10) for the width option could be
lowered a bit more, as I think 10 had been a somewhat arbitrary
choice protecting useRs from hanging themselves..

Martin


Ted.

On 21-Feb-11 10:30:37, Yves REECHT wrote:
Hi,
You may try
 
invisible(sapply(1:10, print))
 
Yves
 
 
Le 21/02/2011 11:21, Antje Niederlein a écrit :
Hi there,
 
I though there has been a possibility to force the output on
the console with one element per line. Instead of this:
 
1:10
[1]  1  2  3  4  5  6  7  8  9 10
 
something like this
 
1:10
[1]   1
[2]   2
[3]   3
[4]   4
[5]   5
[6]   6
[7]   7
[8]   8
[9]   9
[10]   10
 
Can anybody help?
Antje

---
-
E-Mail: (Ted Harding)ted.hard...@wlandres.net   Fax-to-email:
+44 (0)870 094 0861 Date: 21-Feb-11 Time: 11:08:17
-- XFMail
--

__
R-help@r-project.org mailing list
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.

__
R-help@r-project.org mailing list
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.


__
R-help@r-project.org mailing list
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.

__
R-help@r-project.org mailing list
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.


E-Mail: (Ted Harding)ted.hard...@wlandres.net
Fax-to-email: +44 (0)870 094 0861
Date: 21-Feb-11   Time: 14:09:18
-- XFMail --

__
R-help@r-project.org mailing list
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, 

[R] all extended ASCII characters exist for R console output?

2010-11-19 Thread Mark Heckmann
Hi,

can the R console print all extended ASCII characters?
I am especially interested in characters 176-178 from 
http://www.asciitable.com/ 
  bottom table.
As far as I know the character mapping in R is somewhat different  
(octal).
So  as I am not familiar with these things I am not sure if it exists.

TIA
Mark
–––
Mark Heckmann
Dipl. Wirt.-Ing. cand. Psych.
Celler Straße 27
28205 Bremen
Blog: www.markheckmann.de
R-Blog: http://ryouready.wordpress.com




[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.


Re: [R] all extended ASCII characters exist for R console output?

2010-11-19 Thread Henrique Dallazuanna
In the plot window:

plot(1, main = \u2591\u2592\u2593)


On Fri, Nov 19, 2010 at 2:02 PM, Mark Heckmann mark.heckm...@gmx.de wrote:

 Hi,

 can the R console print all extended ASCII characters?
 I am especially interested in characters 176-178 from
 http://www.asciitable.com/
  bottom table.
 As far as I know the character mapping in R is somewhat different
 (octal).
 So  as I am not familiar with these things I am not sure if it exists.

 TIA
 Mark
 –––
 Mark Heckmann
 Dipl. Wirt.-Ing. cand. Psych.
 Celler Straße 27
 28205 Bremen
 Blog: www.markheckmann.de
 R-Blog: http://ryouready.wordpress.com




[[alternative HTML version deleted]]


 __
 R-help@r-project.org mailing list
 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.




-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40 S 49° 16' 22 O

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.


Re: [R] all extended ASCII characters exist for R console output?

2010-11-19 Thread Mark Heckmann
is it also possible on the console?
that is what i am actually interested in?

Thanks in advance!
Mark

Am 19.11.2010 um 17:24 schrieb Henrique Dallazuanna:

 In the plot window:

 plot(1, main = \u2591\u2592\u2593)


 On Fri, Nov 19, 2010 at 2:02 PM, Mark Heckmann  
 mark.heckm...@gmx.de wrote:
 Hi,

 can the R console print all extended ASCII characters?
 I am especially interested in characters 176-178 from 
 http://www.asciitable.com/
  bottom table.
 As far as I know the character mapping in R is somewhat different
 (octal).
 So  as I am not familiar with these things I am not sure if it exists.

 TIA
 Mark
 –––
 Mark Heckmann
 Dipl. Wirt.-Ing. cand. Psych.
 Celler Straße 27
 28205 Bremen
 Blog: www.markheckmann.de
 R-Blog: http://ryouready.wordpress.com




[[alternative HTML version deleted]]


 __
 R-help@r-project.org mailing list
 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.




 -- 
 Henrique Dallazuanna
 Curitiba-Paraná-Brasil
 25° 25' 40 S 49° 16' 22 O

–––
Mark Heckmann
Dipl. Wirt.-Ing. cand. Psych.
Celler Straße 27
28205 Bremen
Blog: www.markheckmann.de
R-Blog: http://ryouready.wordpress.com




[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.


Re: [R] all extended ASCII characters exist for R console output?

2010-11-19 Thread Mark Heckmann
just found it out.
to get an overview:

for (i in 2590:3000)
cat(eval(parse(text=paste(\\\u, i, \, sep=

Thanks,
Mark

Am 19.11.2010 um 17:24 schrieb Henrique Dallazuanna:

 In the plot window:

 plot(1, main = \u2591\u2592\u2593)


 On Fri, Nov 19, 2010 at 2:02 PM, Mark Heckmann  
 mark.heckm...@gmx.de wrote:
 Hi,

 can the R console print all extended ASCII characters?
 I am especially interested in characters 176-178 from 
 http://www.asciitable.com/
  bottom table.
 As far as I know the character mapping in R is somewhat different
 (octal).
 So  as I am not familiar with these things I am not sure if it exists.

 TIA
 Mark
 –––
 Mark Heckmann
 Dipl. Wirt.-Ing. cand. Psych.
 Celler Straße 27
 28205 Bremen
 Blog: www.markheckmann.de
 R-Blog: http://ryouready.wordpress.com




[[alternative HTML version deleted]]


 __
 R-help@r-project.org mailing list
 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.




 -- 
 Henrique Dallazuanna
 Curitiba-Paraná-Brasil
 25° 25' 40 S 49° 16' 22 O

–––
Mark Heckmann
Dipl. Wirt.-Ing. cand. Psych.
Celler Straße 27
28205 Bremen
Blog: www.markheckmann.de
R-Blog: http://ryouready.wordpress.com




[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.


Re: [R] all extended ASCII characters exist for R console output?

2010-11-19 Thread Jeff Newmiller
The glyphs displayed depend on the terminal you are using, which may be 
operating-system dependent. Beware of assuming that other people will see the 
same things you do in their consoles.

Mark Heckmann mark.heckm...@gmx.de wrote:

just found it out.
to get an overview:

for (i in 2590:3000)
   cat(eval(parse(text=paste(\\\u, i, \, sep=

Thanks,
Mark

Am 19.11.2010 um 17:24 schrieb Henrique Dallazuanna:

 In the plot window:

 plot(1, main = \u2591\u2592\u2593)


 On Fri, Nov 19, 2010 at 2:02 PM, Mark Heckmann  
 mark.heckm...@gmx.de wrote:
 Hi,

 can the R console print all extended ASCII characters?
 I am especially interested in characters 176-178 from
http://www.asciitable.com/
  bottom table.
 As far as I know the character mapping in R is somewhat different
 (octal).
 So  as I am not familiar with these things I am not sure if it
exists.

 TIA
 Mark
 ���
 Mark Heckmann
 Dipl. Wirt.-Ing. cand. Psych.
 Celler Stra�e 27
 28205 Bremen
 Blog: www.markheckmann.de
 R-Blog: http://ryouready.wordpress.com




[[alternative HTML version deleted]]


 __
 R-help@r-project.org mailing list
 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.




 -- 
 Henrique Dallazuanna
 Curitiba-Paran�-Brasil
 25� 25' 40 S 49� 16' 22 O

���
Mark Heckmann
Dipl. Wirt.-Ing. cand. Psych.
Celler Stra�e 27
28205 Bremen
Blog: www.markheckmann.de
R-Blog: http://ryouready.wordpress.com




   [[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.

---
Jeff NewmillerThe .   .  Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#.   ##.#.  Live Go...
  Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
/Software/Embedded Controllers)   .OO#.   .OO#.  rocks...1k
---
Sent from my phone. Please excuse my brevity.

__
R-help@r-project.org mailing list
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.


Re: [R] all extended ASCII characters exist for R console output?

2010-11-19 Thread David Winsemius


On Nov 19, 2010, at 11:45 AM, Jeff Newmiller wrote:

The glyphs displayed depend on the terminal you are using, which  
may be operating-system dependent. Beware of assuming that other  
people will see the same things you do in their consoles.




On a Mac this:

 cat(\u2591,\u2592,\u2593)
░ ▒ ▓

Prints three rectangles of varying size and density. This appears  
somewhat similar to what I see im my browser except for the noticeable  
variation in size.


--
David


Mark Heckmann mark.heckm...@gmx.de wrote:


just found it out.
to get an overview:

for (i in 2590:3000)
cat(eval(parse(text=paste(\\\u, i, \, sep=

Thanks,
Mark

Am 19.11.2010 um 17:24 schrieb Henrique Dallazuanna:


In the plot window:

plot(1, main = \u2591\u2592\u2593)


On Fri, Nov 19, 2010 at 2:02 PM, Mark Heckmann
mark.heckm...@gmx.de wrote:
Hi,

can the R console print all extended ASCII characters?
I am especially interested in characters 176-178 from

http://www.asciitable.com/

bottom table.
As far as I know the character mapping in R is somewhat different
(octal).
So  as I am not familiar with these things I am not sure if it

exists.


TIA
Mark
� 
� 
� 
� 
� 
� 
� 
� 
� 
� 
� 
� 
� 
� 
� 
� 
� 
��

Mark Heckmann
Dipl. Wirt.-Ing. cand. Psych.
Celler Stra�e 27
28205 Bremen
Blog: www.markheckmann.de
R-Blog: http://ryouready.wordpress.com




  [[alternative HTML version deleted]]


__
R-help@r-project.org mailing list
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.




--
Henrique Dallazuanna
Curitiba-Paran�-Brasil
25� 25' 40 S 49� 16' 22 O


� 
� 
� 
� 
� 
� 
� 
� 
� 
� 
� 
� 
� 
� 
� 
� 
���

Mark Heckmann
Dipl. Wirt.-Ing. cand. Psych.
Celler Stra�e 27
28205 Bremen
Blog: www.markheckmann.de
R-Blog: http://ryouready.wordpress.com




[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.


---
Jeff NewmillerThe .   .  Go  
Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#.   ##.#.   
Live Go...
 Live:   OO#.. Dead: OO#..   
Playing

Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
/Software/Embedded Controllers)   .OO#.   .OO#.   
rocks...1k

---
Sent from my phone. Please excuse my brevity.

__
R-help@r-project.org mailing list
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.


David Winsemius, MD
West Hartford, CT

__
R-help@r-project.org mailing list
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.


Re: [R] all extended ASCII characters exist for R console output?

2010-11-19 Thread Henrik Bengtsson
Just to get the message through that some already tried, e.g. on
Windows 7 with R (Rterm) you get:

 cat(\u2591,\u2592,\u2593)
¦ ¦ ¦


See it didn't even cut'n'paste the same visual symbols as I see in
Rterm but I guess you cannot see that.  Make sense?  No?   Point is,
expect issues if you're running this outside your own system/on
different setup.  (This has nothing to do with R).

/H

On Fri, Nov 19, 2010 at 9:16 AM, David Winsemius dwinsem...@comcast.net wrote:

 On Nov 19, 2010, at 11:45 AM, Jeff Newmiller wrote:

 The glyphs displayed depend on the terminal you are using, which may be
 operating-system dependent. Beware of assuming that other people will see
 the same things you do in their consoles.


 On a Mac this:

 cat(\u2591,\u2592,\u2593)
 ░ ▒ ▓

 Prints three rectangles of varying size and density. This appears somewhat
 similar to what I see im my browser except for the noticeable variation in
 size.

 --
 David

 Mark Heckmann mark.heckm...@gmx.de wrote:

 just found it out.
 to get an overview:

 for (i in 2590:3000)
        cat(eval(parse(text=paste(\\\u, i, \, sep=

 Thanks,
 Mark

 Am 19.11.2010 um 17:24 schrieb Henrique Dallazuanna:

 In the plot window:

 plot(1, main = \u2591\u2592\u2593)


 On Fri, Nov 19, 2010 at 2:02 PM, Mark Heckmann
 mark.heckm...@gmx.de wrote:
 Hi,

 can the R console print all extended ASCII characters?
 I am especially interested in characters 176-178 from

 http://www.asciitable.com/

 bottom table.
 As far as I know the character mapping in R is somewhat different
 (octal).
 So  as I am not familiar with these things I am not sure if it

 exists.

 TIA
 Mark
 ���
 Mark Heckmann
 Dipl. Wirt.-Ing. cand. Psych.
 Celler Stra�e 27
 28205 Bremen
 Blog: www.markheckmann.de
 R-Blog: http://ryouready.wordpress.com




      [[alternative HTML version deleted]]


 __
 R-help@r-project.org mailing list
 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.




 --
 Henrique Dallazuanna
 Curitiba-Paran�-Brasil
 25� 25' 40 S 49� 16' 22 O

 ���
 Mark Heckmann
 Dipl. Wirt.-Ing. cand. Psych.
 Celler Stra�e 27
 28205 Bremen
 Blog: www.markheckmann.de
 R-Blog: http://ryouready.wordpress.com




        [[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list
 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.


 ---
 Jeff Newmiller                        The     .       .  Go
 Live...
 DCN:jdnew...@dcn.davis.ca.us        Basics: ##.#.       ##.#.  Live
 Go...
                                     Live:   OO#.. Dead: OO#..  Playing
 Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
 /Software/Embedded Controllers)               .OO#.       .OO#.
  rocks...1k

 ---
 Sent from my phone. Please excuse my brevity.

 __
 R-help@r-project.org mailing list
 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.

 David Winsemius, MD
 West Hartford, CT

 __
 R-help@r-project.org mailing list
 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.


__
R-help@r-project.org mailing list
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.


[R] Capturing R console output into a file (sink+savehistory ??)

2010-05-22 Thread Tal Galili
After reading more, I understand I didn't formulate my last question
correctly, so please allow me to rephrase:

What I am looking for is a way to save the R console session output.
That is, a command that would combine the results of using:
?sink   # And
?savehistory

My motivation for this is that doing it will allow someone who is a blind
user of R to be able to easily export his results to word so he could have
word read him the text.
I also imagine it might be useful for session login.

Thanks,
Tal




Contact
Details:---
Contact me: tal.gal...@gmail.com |  972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
--




On Sat, May 22, 2010 at 12:20 AM, Tal Galili tal.gal...@gmail.com wrote:

 Hi David,

 I want to get both the 4 and the 1+3 that created it.

 I am trying to help someone else on the mailing list that is looking for a
 way to sink the console into word, so he could have word read it to him
 (he is blind).
 I know how to do the second part, but the first part (using sink with the
 commands, and not just the output), I am somehow missing...

 Best,
 Tal



 Contact
 Details:---
 Contact me: tal.gal...@gmail.com |  972-52-7275845
 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
 www.r-statistics.com (English)

 --




 On Sat, May 22, 2010 at 12:17 AM, David Winsemius 
 dwinsem...@comcast.netwrote:


 On May 21, 2010, at 5:02 PM, Tal Galili wrote:

  Hi all,

 I am trying to use type message with sink, like this:

 sink(all.Rout, type=message)
 1+3

 sink()

 readLines(con = all.Rout)

 So to get the following output:

  1+3

 [1] 4

 Obviously this doesn't work.


 What are you trying to do? The sink help page has two rather dire warnings
 about not using type=message,  and using type=output would give you what
 you ask:

  sink(all.Rout, type=output)

  1+3
 
  sink()
 
  readLines(con = all.Rout)
 [1] [1] 4

 The extra [1] and quotes are from the readLines function, not from
 all.Rout.


  I tried some variations (based on the explanations in the help) but am
 missing something on how to make it work.

 Any suggestions?

 (p.s: I need this so to help Faiz Rasool in his latest post)

 Thanks,

 Tal

 --
 David Winsemius, MD
 West Hartford, CT




[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.


Re: [R] Capturing R console output into a file (sink+savehistory ??)

2010-05-22 Thread Tal Galili
Hello Duncan, David, and other R-help mailing list members.

I found the solution using Greg Snow answer to this thread.

I wanted to have that so to help a blind person who asked on the mailing
list how to direct R output to word.

I wrote up a solution, and wrapped it with words.  It is now published here:
http://www.r-statistics.com/2010/05/helping-the-blind-use-r-by-exporting-r-console-to-word/

Thank you for offering your help.

Best,
Tal

Contact
Details:---
Contact me: tal.gal...@gmail.com |  972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
--




On Sat, May 22, 2010 at 1:26 PM, Duncan Murdoch murdoch.dun...@gmail.comwrote:

 Tal Galili wrote:

 After reading more, I understand I didn't formulate my last question
 correctly, so please allow me to rephrase:

 What I am looking for is a way to save the R console session output.
 That is, a command that would combine the results of using:
 ?sink   # And
 ?savehistory



 I think there's still some ambiguity in the question; I'll try to answer a
 few versions.

 Do you want to run R normally, then afterwards save the console log?  That
 depends on what front end you're using.  In the Windows GUI, you can do it
 with
 Ctrl-A to select everything in the console, then menu items File | Save to
 file..., or just Ctrl-C to copy, and then paste it into Word.  Similar
 operations would work on a Mac.

 Do you want to run code in a way that writes it to a file without
 displaying it to the screen?  R CMD batch does that.

 Do you want to run just a few commands like that? Then try

 capture.output(source(stdin(), echo=TRUE))

 This will accept commands from the console until it hits an EOF (Ctrl-Z on
 Windows, I don't know on other systems, but Ctrl-D is a good guess) and will
 return
 the results in a character vector, which you could write to a file.

 Do you want to run R normally with output on screen, but also logging
 everything to a file?  I don't know how to do that in the R GUI in Windows,
 but there are probably command line tools that could do it.

 Duncan Murdoch

   My motivation for this is that doing it will allow someone who is a blind
 user of R to be able to easily export his results to word so he could have
 word read him the text.
 I also imagine it might be useful for session login.

 Thanks,
 Tal




 Contact
 Details:---
 Contact me: tal.gal...@gmail.com |  972-52-7275845
 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
 www.r-statistics.com (English)

 --




 On Sat, May 22, 2010 at 12:20 AM, Tal Galili tal.gal...@gmail.com
 wrote:



 Hi David,

 I want to get both the 4 and the 1+3 that created it.

 I am trying to help someone else on the mailing list that is looking for
 a
 way to sink the console into word, so he could have word read it to him
 (he is blind).
 I know how to do the second part, but the first part (using sink with the
 commands, and not just the output), I am somehow missing...

 Best,
 Tal



 Contact
 Details:---
 Contact me: tal.gal...@gmail.com |  972-52-7275845
 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
 www.r-statistics.com (English)


 --




 On Sat, May 22, 2010 at 12:17 AM, David Winsemius 
 dwinsem...@comcast.netwrote:



 On May 21, 2010, at 5:02 PM, Tal Galili wrote:

  Hi all,


 I am trying to use type message with sink, like this:

 sink(all.Rout, type=message)
 1+3

 sink()

 readLines(con = all.Rout)

 So to get the following output:

  1+3
[1] 4

 Obviously this doesn't work.




 What are you trying to do? The sink help page has two rather dire
 warnings
 about not using type=message,  and using type=output would give you
 what
 you ask:



 sink(all.Rout, type=output)
1+3

 sink()

 readLines(con = all.Rout)


 [1] [1] 4

 The extra [1] and quotes are from the readLines function, not from
 all.Rout.


  I tried some variations (based on the explanations in the help) but am


 missing something on how to make it work.

 Any suggestions?

 (p.s: I need this so to help Faiz Rasool in his latest post)

 Thanks,

 Tal



 --
 David Winsemius, MD
 West Hartford, CT





[[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list
 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.






Re: [R] Capturing R console output into a file (sink+savehistory ??)

2010-05-22 Thread Duncan Murdoch

Tal Galili wrote:

After reading more, I understand I didn't formulate my last question
correctly, so please allow me to rephrase:

What I am looking for is a way to save the R console session output.
That is, a command that would combine the results of using:
?sink   # And
?savehistory
  


I think there's still some ambiguity in the question; I'll try to answer 
a few versions.


Do you want to run R normally, then afterwards save the console log?  
That depends on what front end you're using.  In the Windows GUI, you 
can do it with
Ctrl-A to select everything in the console, then menu items File | Save 
to file..., or just Ctrl-C to copy, and then paste it into Word.  
Similar operations would work on a Mac.


Do you want to run code in a way that writes it to a file without 
displaying it to the screen?  R CMD batch does that.


Do you want to run just a few commands like that? Then try

capture.output(source(stdin(), echo=TRUE))

This will accept commands from the console until it hits an EOF (Ctrl-Z 
on Windows, I don't know on other systems, but Ctrl-D is a good guess) 
and will return

the results in a character vector, which you could write to a file.

Do you want to run R normally with output on screen, but also logging 
everything to a file?  I don't know how to do that in the R GUI in 
Windows, but there are probably command line tools that could do it.


Duncan Murdoch

  
My motivation for this is that doing it will allow someone who is a blind

user of R to be able to easily export his results to word so he could have
word read him the text.
I also imagine it might be useful for session login.

Thanks,
Tal




Contact
Details:---
Contact me: tal.gal...@gmail.com |  972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
--




On Sat, May 22, 2010 at 12:20 AM, Tal Galili tal.gal...@gmail.com wrote:

  

Hi David,

I want to get both the 4 and the 1+3 that created it.

I am trying to help someone else on the mailing list that is looking for a
way to sink the console into word, so he could have word read it to him
(he is blind).
I know how to do the second part, but the first part (using sink with the
commands, and not just the output), I am somehow missing...

Best,
Tal



Contact
Details:---
Contact me: tal.gal...@gmail.com |  972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)

--




On Sat, May 22, 2010 at 12:17 AM, David Winsemius dwinsem...@comcast.netwrote:



On May 21, 2010, at 5:02 PM, Tal Galili wrote:

 Hi all,
  

I am trying to use type message with sink, like this:

sink(all.Rout, type=message)
1+3

sink()

readLines(con = all.Rout)

So to get the following output:

 1+3

[1] 4


Obviously this doesn't work.




What are you trying to do? The sink help page has two rather dire warnings
about not using type=message,  and using type=output would give you what
you ask:

  

sink(all.Rout, type=output)

1+3


sink()

readLines(con = all.Rout)


[1] [1] 4

The extra [1] and quotes are from the readLines function, not from
all.Rout.


 I tried some variations (based on the explanations in the help) but am
  

missing something on how to make it work.

Any suggestions?

(p.s: I need this so to help Faiz Rasool in his latest post)

Thanks,

Tal



--
David Winsemius, MD
West Hartford, CT


  


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.



__
R-help@r-project.org mailing list
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.


[R] miniscule font size on R console output

2008-05-08 Thread juanita choo
Hi,

I am having a situation where I cannot change the output size of the R
console. I have played around with the font format menu but  the changes are
only reflected to the script that I type in but not to the output. Everytime
I run a script, I have to go back to font format to increase the output
script, which is currently showing up as small as the dust on my computer
screen. I have mac by the way.
Thanks for your suggestions.

juanita

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
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.


Re: [R] miniscule font size on R console output

2008-05-08 Thread Yasir Kaheil

from the upper menu, go to edit/gui preferences 
then you can increase the font size. i used windows so im not sure if this
works on mac.
thanks


juanita choo wrote:
 
 Hi,
 
 I am having a situation where I cannot change the output size of the R
 console. I have played around with the font format menu but  the changes
 are
 only reflected to the script that I type in but not to the output.
 Everytime
 I run a script, I have to go back to font format to increase the output
 script, which is currently showing up as small as the dust on my computer
 screen. I have mac by the way.
 Thanks for your suggestions.
 
 juanita
 
   [[alternative HTML version deleted]]
 
 __
 R-help@r-project.org mailing list
 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.
 
 


-
Yasir H. Kaheil, Ph.D.
Catchment Research Facility
The University of Western Ontario 

-- 
View this message in context: 
http://www.nabble.com/miniscule-font-size-on-R-console-output-tp17132821p17136574.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
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.