Re: [R] matrix output

2009-02-18 Thread Jim Lemon

phoebe kong wrote:

Hi friends,

I have questions about printing a pretty big size matrix.

As you could see from below, the matrix wasn't showed in R at full size
(11X11), but it was cut partly into three smaller matrices (11X4,11X4,11X3).
I'm wondering if there is a way to show the whole matrix with dimension
11X11, do you know how to make it?

If R really couldn't fit the full big matrix at once, what about output the
FULL matrix to a .pdf document? I have been wondering for a long time if we
could output something other than graphic, like data frame or text, to a
.pdf file.
  

Hi phoebe,
If you don't need PDF, you can get an HTML display of this sort of 
matrix using the delim.table function in the prettyR package:


delim.table(SY,file=SY.html,delim=td,tabegin=table border=1,
 bor=trtd,tablend=/table)

You can embed a table like this into an HTML formatted output file of an 
R session using the htmlize function and calling delim.table to format 
the table.


Jim

__
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] matrix output

2009-02-17 Thread phoebe kong
Hi friends,

I have questions about printing a pretty big size matrix.

As you could see from below, the matrix wasn't showed in R at full size
(11X11), but it was cut partly into three smaller matrices (11X4,11X4,11X3).
I'm wondering if there is a way to show the whole matrix with dimension
11X11, do you know how to make it?

If R really couldn't fit the full big matrix at once, what about output the
FULL matrix to a .pdf document? I have been wondering for a long time if we
could output something other than graphic, like data frame or text, to a
.pdf file.

Thanks in advance for your patience and answer.

SY

Sldur Slonset Waso  Sboutn
Sldur1  -0.6744252  -0.08427312  -0.2871798
Slonset327   1.000   0.14257353   0.1981339
Waso   327 327.000   1.   0.5104723
Sboutn 327 327.000 327.   1.000
MidSleep   327 327.000 327. 327.000
SleepEff   327 327.000 327. 327.000
NumTrials   22  22.000  22.  22.000
MeanTrials  22  22.000  22.  22.000
MedianTrials22  22.000  22.  22.000
NS3all5tage296 296.000 296. 296.000
HGsoc118   325 325.000 325. 325.000

 MidSleepSleepEff   NumTrials
MeanTrials
Sldur -0.14512244   0.6721889  0.26482213
0.26256352
Slonset0.73991223  -0.5613362 -0.09429701
-0.02540937
Waso   0.08729977  -0.6836098  0.18577075
0.26369283
Sboutn 0.06169839  -0.4895902  0.10897798
0.07058159
MidSleep   1.  -0.1498673 -0.17786561
0.13043478
SleepEff 327.   1.000 -0.01637493
-0.20835686
NumTrials 22.  22.000  1.
-0.16768424
MeanTrials22.  22.000 46.
1.
MedianTrials  22.  22.000 46.
46.
NS3all5tage  296. 296.000 44.
44.
HGsoc118 325. 325.000 44.
44.

 MedianTrials  NS3all5tage HGsoc118
Sldur   0.1857708   0.07849234  -0.03751973
Slonset 0.2919255  -0.14858206   0.05323562
Waso0.3856578  -0.08148054   0.09341454
Sboutn  0.2557877  -0.05049218   0.06847118
MidSleep0.4172784  -0.09344423   0.05287818
SleepEff   -0.3088650   0.12099185  -0.08453191
NumTrials  -0.1108233  -0.06779422  -0.13164200
MeanTrials  0.9203207  -0.07625088   0.10584919
MedianTrials1.000  -0.10894996   0.13615222
NS3all5tage44.000   1.  -0.10554137
HGsoc118   44.000 632.   1.

[[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] matrix output

2009-02-17 Thread Duncan Murdoch

On 17/02/2009 5:31 PM, phoebe kong wrote:

Hi friends,

I have questions about printing a pretty big size matrix.

As you could see from below, the matrix wasn't showed in R at full size
(11X11), but it was cut partly into three smaller matrices (11X4,11X4,11X3).
I'm wondering if there is a way to show the whole matrix with dimension
11X11, do you know how to make it?


If you increase the output width, e.g.

options(width=1)

won't wrap (but it'll probably be too wide to be useful).  You can also 
reduced the number of decimal places, e.g.


SYrounded - round(SY, 3)




If R really couldn't fit the full big matrix at once, what about output the
FULL matrix to a .pdf document? I have been wondering for a long time if we
could output something other than graphic, like data frame or text, to a
.pdf file.


The main way to produce nice text in a PDF document through R is to use 
Sweave and LaTeX.  Too much explanation needed for a simple example here.


Duncan Murdoch



Thanks in advance for your patience and answer.

SY

Sldur Slonset Waso  Sboutn
Sldur1  -0.6744252  -0.08427312  -0.2871798
Slonset327   1.000   0.14257353   0.1981339
Waso   327 327.000   1.   0.5104723
Sboutn 327 327.000 327.   1.000
MidSleep   327 327.000 327. 327.000
SleepEff   327 327.000 327. 327.000
NumTrials   22  22.000  22.  22.000
MeanTrials  22  22.000  22.  22.000
MedianTrials22  22.000  22.  22.000
NS3all5tage296 296.000 296. 296.000
HGsoc118   325 325.000 325. 325.000

 MidSleepSleepEff   NumTrials
MeanTrials
Sldur -0.14512244   0.6721889  0.26482213
0.26256352
Slonset0.73991223  -0.5613362 -0.09429701
-0.02540937
Waso   0.08729977  -0.6836098  0.18577075
0.26369283
Sboutn 0.06169839  -0.4895902  0.10897798
0.07058159
MidSleep   1.  -0.1498673 -0.17786561
0.13043478
SleepEff 327.   1.000 -0.01637493
-0.20835686
NumTrials 22.  22.000  1.
-0.16768424
MeanTrials22.  22.000 46.
1.
MedianTrials  22.  22.000 46.
46.
NS3all5tage  296. 296.000 44.
44.
HGsoc118 325. 325.000 44.
44.

 MedianTrials  NS3all5tage HGsoc118
Sldur   0.1857708   0.07849234  -0.03751973
Slonset 0.2919255  -0.14858206   0.05323562
Waso0.3856578  -0.08148054   0.09341454
Sboutn  0.2557877  -0.05049218   0.06847118
MidSleep0.4172784  -0.09344423   0.05287818
SleepEff   -0.3088650   0.12099185  -0.08453191
NumTrials  -0.1108233  -0.06779422  -0.13164200
MeanTrials  0.9203207  -0.07625088   0.10584919
MedianTrials1.000  -0.10894996   0.13615222
NS3all5tage44.000   1.  -0.10554137
HGsoc118   44.000 632.   1.

[[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.