[Rd] How to capture t-score and p-values from t.test

2006-03-26 Thread Gordon K Smyth
> Date: Sat, 25 Mar 2006 16:57:50 -0400
> From: Kjetil Brinchmann Halvorsen
>   <[EMAIL PROTECTED]>
> Subject: Re: [Rd] How to capture t-score and p-values from t.test
> To: "Bernzweig, Bruce \(Exchange\)" <[EMAIL PROTECTED]>
> Cc: r-devel@r-project.org
>
> Bernzweig, Bruce (Exchange) wrote:
>> When I do t.test on two distributions (see example below), it outputs
>> numerous data about the t.test.
>>
>> What I'd like to do is individually capture some of this data and assign
>> it to other variables.
>>
>> However, I am unable to find anything in the help section.
>
> t.test returns an object of class "htest", but ?htest :
>  > ?htest
> No documentation for 'htest' in specified packages and libraries:
> you could try 'help.search("htest")'
> but that does not do anythinh eiather.
>
> Some time ago, I wrote a helpfile for htest, but that was rejected,
> since "S3 classes are not usually documented".
>
> Kjetil

The "htest" object created by t.test() is fully documented in the "Value" 
section of
help("t.test").  In effect, this defines what a "htest" object is understood to 
be.

help.search("htest") brings up a list of every function which produces an 
"htest" object.

Gordon

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Double complex with gcc and Intel v9 Fortran (PR#8699)

2006-03-26 Thread ripley
On Wed, 22 Mar 2006, [EMAIL PROTECTED] wrote:

> Full_Name: Christian Marquardt
> Version: 2.2.1
> OS: Linux
> Submission from: (NULL) (84.167.229.240)
>
>
> Hello,
>
> I believe this is a bug in the configuration / installation:
>
> When configuring R-2.2.1 using the Intel v9 Fortran compiler as default 
> Fortran compiler and g++ as C++ compiler on a Suse 9.3 Linux, the 
> configuration script finds that the C and Fortran idea of double comples 
> disagree.
>
> I have tried to extract the test used for this from m4/R.m4 (a slightly 
> modified version of the two test files is added at the end). When 
> compiling
>
>   ifort -c ctest.f
>   gcc -c cftest.c
>
> and linking properly,
>
>   ifort -nofor_main cftest.o ctest.o -o runme
>
> running the executable gives the following output:
>
>   ./runme
> 123.456000 14.710644
> 0.00 -0.06
>
> To me, this inicates that the test should actually be passed successfully.

No, because R is linked with the C compiler and not the Fortran compiler.
Did you look in config.log and see what it indicated the error was?

You have not shown us anything that indicates that this is a bug in R.

You also haven't told us what architecture this is: I tried mixing gcc 
3.4.4 and ifort 9.0 on x86_64 Fedora Core 3, and had no problems.

> Unfortunately, I haven't quite understood how to rebuild the configure.ac etc
> once R.m4 is changed;

I presume you mean to rebuild 'configure': configure.ac does not depend on 
R.m4.  Just configure in maintainer mode, and 'make'.

> otherwise I would try to come up with a patch for R.m4.
> But maybe someone else can fix this?

We cannot fix things that we cannot reproduce.

>
> Many thanks,
>
>  Christian.
>
>
> 
>  subroutine cftest(x)
>  complex*16 x(3)
>  integer i
>
> c a few tests of constructs that are sometimes missing
>  if(x(1) .eq. x(1)) i = 0
>  x(1) = x(1)*x(2) + x(3)
>  end
>
> 
> #include 
> #define HAVE_F77_UNDERSCORE 1
> #ifdef HAVE_F77_UNDERSCORE
> # define F77_SYMBOL(x)   x ## _
> #else
> # define F77_SYMBOL(x)   x
> #endif
>
> typedef struct {
>double r;
>double i;
> } Rcomplex;
>
> extern void F77_SYMBOL(cftest)(Rcomplex *x);
>
> int main () {
>Rcomplex z[3];
>
>z[0].r = 3.14159265;
>z[0].i = 2.172;
>z[1].i = 3.14159265;
>z[1].r = 2.172;
>z[2].r = 123.456;
>z[2].i = 0.123456;
>F77_SYMBOL(cftest)(z);
>printf("%f %f\n", z[0].r, z[0].i);
>printf("%f %f\n", z[0].r - 123.456, z[0].i - 14.71065);
>if(fabs(z[0].r - 123.456) < 1e-4 && fabs(z[0].i - 14.71065) < 1e-4)
>exit(0);
>else exit(1);
> }
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
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-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Choose.files to give shortnames

2006-03-26 Thread Prof Brian Ripley
On Wed, 22 Mar 2006, P Ehlers wrote:

> Would
>
> basename(choose.files())
>
> work for your usage?
> Still, a full.names argument might be useful.

I don't think so, as you can change directory in choose.files(), unlike 
dir().

> Peter Ehlers
>
> Brooks, Anthony B wrote:
>
>> I am writing a script to generate a QC report for some data based on a 
>> number of files. I am currently using the choose.files function to 
>> select the files as not all the files need to be QC'd. One minor issue 
>> is that choose.files returns the complete path of the filename (eg 
>> "C:/QCdata/Test1/File01", "C:/QCdata/Test1/File02"...). Is it possible 
>> to use choose.files to return just the file name eg("File01", 
>> "File02"...), in a way similar to the full.names=FALSE argument in the 
>> dir function.


-- 
Brian D. Ripley,  [EMAIL PROTECTED]
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-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Help please: please test timestamping of command history

2006-03-26 Thread Duncan Murdoch
I managed to get an R build going on a Linux box, and tested the changes 
there.  Now they're committed to R-devel.

Duncan Murdoch

On 3/25/2006 2:58 PM, Duncan Murdoch wrote:
> On 3/25/2006 11:30 AM, Martin Maechler wrote:
>> Hi Duncan,
>>
>> I think all ESS users don't use history() because ESS calls R  
>> with "--no-readline" (Unix)  
>> or   "--ess"  (Windows & Cygwin)
>>
>> I'd wish that in that case, and probably also in BATCH mode,
>> timestamp() should write the time stamp prefixed by "##" to the
>> "R console" (to R's stdout); when people are using ESS properly, then
>> rather than wanting a history, they save the R's buffer ("*R*") as
>> "R transcript" (file typically ending with ".Rt" or ".Rout") 
>> and it makes much sense to have a time stampe entry in that file when
>> others would want an entry in the history.
>>
>> BTW, after applying your patch, for me, compilation ends
>> prematurely with
>>
>> gcc -I. -I../../src/include -I../../../R/src/include -I/usr/X11R6/include 
>> -I/usr/local/include -DHAVE_CONFIG_H   -g -O3 -pedantic -Wall -Wno-comment 
>> -DDEBUG_q -Wcast-align -c ../../../R/src/unix/stubs.c -o stubs.o
>> ../../../R/src/unix/stubs.c: In function `do_addhistory':
>> ../../../R/src/unix/stubs.c:46: warning: implicit declaration of function 
>> `ptr_R_addhistory'
>> ../../../R/src/unix/stubs.c:46: error: `rho' undeclared (first use in this 
>> function)
>> ../../../R/src/unix/stubs.c:46: error: (Each undeclared identifier is 
>> reported only once
>> ../../../R/src/unix/stubs.c:46: error: for each function it appears in.)
>> ../../../R/src/unix/stubs.c:46: warning: return makes pointer from integer 
>> without a cast
>> make[3]: *** [stubs.o] Error 1
> 
> Okay, this compile error is fixed.  I've put a new version of the patch in
> 
> http://www.stats.uwo.ca/faculty/murdoch/software/timestamp.patch
> 
> I haven't addressed the ESS request above other than changing the 
> message prefix to start with ##; I don't know how to detect ESS from 
> within an R session.
> 
> Duncan Murdoch
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] [R] RGui: windows-record and command history

2006-03-26 Thread Paul Murrell
Hi


Duncan Murdoch wrote:
> I've moved this from r-help to r-devel.
> 
> On 3/23/2006 8:17 PM, Paul Murrell wrote:
> 
>>>
>>> Paul,
>>> If I read your comments correctly, the problem with manipulating the
>>> graph history is with saved histories across sessions/versions. Is
>>> there any reason not to manipulate it *within* a session? I never
>>> save plots for re-use in R. Re-running code is usually best for me.
>>> But I would find it handy to fiddle with the display list in a
>>> session.
>>
>>
>>
>> That is *one* problem with the display list.  Messing directly with 
>> the display list *within a session* is *less* dangerous, but R's 
>> behaviour if you do that is "undefined".
>>
>> The display list is technically an internal structure for R's internal 
>> use.  We can't stop you playing with it, but I do not encourage it and 
>> it is not officially supported.
>>
>> There are a number of simple things that you could do to the display 
>> list that should work, but providing proper support for general 
>> manipulations of the display list would require a significant amount 
>> of (re)design of the R graphics code.
>>
>> Paul
>>
>> p.s.  These comments apply to the display list in R's "graphics 
>> engine".   The 'grid' package also maintains a display list, and that 
>> has been designed to support more general manipulations.
> 
> 
> Are we talking about the same thing?  I think Peter is only thinking of 
> manipulating the .SavedPlots variable, which is a Windows-only object 
> holding plot history.  I imagine the entries in .SavedPlots[[5]] are the 
> things that you are worried about, and I agree people shouldn't play 
> with those, they should be using grid instead with its documented 
> interface.


Sorry, I came into the discussion a bit late, so there's a good chance I 
have misunderstood.  Within a session, manipulation of .SavedPlots (via 
the appropriate interface) seems reasonable (i.e., manipulations 
involving an entire "page" of output as the basic unit).  Warnings about 
use *between* sessions still apply though.

Paul


> If we do warn people off manipulating .SavedPlots, then I think it 
> should be a higher priority to implement some manipulations ourselves, 
> e.g. "[<-.SavedPlots", to allow entries to be moved around or deleted in 
> the list.
> 
> Duncan

-- 
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
[EMAIL PROTECTED]
http://www.stat.auckland.ac.nz/~paul/

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Suggest patch for princomp.formula and prcomp.formula

2006-03-26 Thread Prof Brian Ripley
I would argue this is a bug in model.frame(), but it seems that it is 
S-compatible.  That is, variables excluded by - appear in the model frame 
even though they do not really appear in the simplified formula.  (I 
suppose the rationale is that - need not always interpreted as deletion.)

The proposed fix regretably will not work, since one can do things like

library(MASS)
prcomp(~ dist + dist:climb, hills)

I'll see if I can dream up a general solution.  (One way forward is to 
simplify the formula and call terms again, but simplifcation is rather 
clumsy code.)


On Sat, 25 Mar 2006, Berwin A Turlach wrote:

> Dear all,
>
> perhaps I am using princomp.formula and prcomp.formula in a way that
> is not documented to work, but then the documentation just says:
>
>formula: a formula with no response variable.
>
> Thus, to avoid a lot of typing, it would be nice if one could use '.'
> and '-' in the formula, e.g.
>
>> library(DAAG)
>> res <- prcomp(~ . - case - site - Pop - sex, possum)
> Error in prcomp.formula(~. - case - site - Pop - sex, possum) :
>   PCA applies only to numerical variables
>> res <- princomp(~ . - case - site - Pop - sex, possum)
> Error in princomp.formula(~. - case - site - Pop - sex, possum) :
>   PCA applies only to numerical variables
>
> Unfortunately, as the examples above show, this is currently not
> possible, since both functions test whether any term mentioned in the
> formula is non numeric or a factor, instead of just testing those that
> enter the analysis.
>
> The attached patch should allow the use of '.' and '-', while still
> producing an error when a factor or a non-numeric variable is
> specified to enter the analysis:
>
>> library(DAAG)
>> res <- prcomp(~ . - case - site - Pop - sex, possum)
>> res <- princomp(~ . - case - site - Pop - sex, possum)
>> res <- prcomp(~ . - case - site - Pop, possum)
> Error in prcomp.formula(~. - case - site - Pop, possum) :
>   PCA applies only to numerical variables
>> res <- princomp(~ . - case - site - Pop, possum)
> Error in princomp.formula(~. - case - site - Pop, possum) :
>   PCA applies only to numerical variables
>
> On my machine, `make check FORCE=FORCE' succeeds with this patch and,
> as far as I can tell, no modification of the help pages would be
> necessary.
>
> Cheers,
>
>Berwin
>
>

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
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-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Wishlist - access non-text from clipboard in Windows

2006-03-26 Thread Duncan Murdoch
I've just committed some code to R-devel to allow clipboard access to 
non-text in Windows.  This was something we discussed last September. 
I'm not completely happy with the code (it works with numerical 
clipboard format numbers rather than translating them into their names), 
but I'd rather make it available than work on it any more.

Duncan Murdoch

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Sweaving in png

2006-03-26 Thread Roger Peng
For what it's worth, I would find such a adaptation useful.

-roger

Thibaut Jombart wrote:
> Hello list, 
> 
> despite I already posted a mail on this topic on R help, I guess this place 
> may be more appropriate.
> I'll make it shorter this time. Sorry for posting twice.
> 
> I found that using pixmap pictures in a Sweave document was sometimes almost 
> impossible, due to the huge size of the pdf pictures produced.
> 
> The first solution I found was to save pictures in png, when too heavy in 
> pdf. Here is an example:
> 
> ### in a .rnw document ###
> 
> % here is an invisible chunck to create a picture
> <>=
> png(filename='figs/myPic.png')
> @
> 
> % next, R code to generate picture
> <>=
> ...[code to produce the figure]
> @
> 
> % then, close the device. Hidden, again
> <>=
> dev.off()
> @
> 
> % and then, include it as a picture
> \includegraphics{figs/myPic.png}
> 
> ### end of the example ###
> 
> I
> This is quite long, and I would have prefered to need simply: 
> 
> <>
> ...[code to produce the figure]
> @
> 
> So I tried to adapte the Sweave driver 'RweaveLatex' in order to do so. It 
> worked.
> 
> The not-so-new driver is only a slight modification of RweaveLatex, and can 
> generate ps, pdf or png figures; it was tested on Ubuntu64, Debian, 
> several Windows systems and macOS X partforms with no detected problem.
> 
> Does someone find this useful, and/or were there better solutions I missed?
> 
> Regards,
> 
> Thibaut Jombart .
> 

-- 
Roger D. Peng  |  http://www.biostat.jhsph.edu/~rpeng/

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Creating a package bundle.

2006-03-26 Thread Steve Su
Dear All,

 

What is the easiest way to create a package bundle in R? I have three
packages I would like to group together in which one package will
depends on three others. It looks like from

http://tolstoy.newcastle.edu.au/R/help/01a/0284.html, all that is
required is to put require in the .First? I wonder how one can create a
package so that when it is downloaded,

all the other packages are downloaded and installed as well? In my case,
the three sub packages are not written by me and are already in R so I
would like to keep the current

versions as part of the bundle rather than allow them to get updated so
there will not be compatibility problems?

 

I am aware there is a writing R extensions guide but it seems to be
geared towards a more advanced user rather than beginner like me?

 

Thanks in advance.

 

Steve.


[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Touchdown Equity Report (PR#8711)

2006-03-26 Thread carminechilds_jg
V2UnZCBsaWtlIHRvIGdpdmUgYSBoaWdoIGZpdmUgdG8gb3VyIHJlc2VhcmNo
IHRlYW0uDQpPdXIgcG9ydGZvbGlvIGlzIHVwIDcwJSBzbyBmYXIgaW4gMjAw
NiBhbmQgbG9va2luZw0Kc3Ryb25nZXIgZXZlcnkgZGF5ISBXZSBob3BlIG91
ciBtZW1iZXJzIGhhdmUgYmVlbg0Ka2VlcGluZyB1cCB3aXRoIHRoZXNlIGlu
Y3JlZGlibGUgcGlja3MuDQoNCldlIHdvdWxkIGxpa2UgdG8gaW50cm9kdWNl
IHlvdSB0byBhIGNvbXBhbnkgaW52b2x2ZWQgaW4NCnRoZSBuYW5vdGVjaG5v
bG9neSBmaWVsZC4gIEl0IGlzIHdpZGVseSBiZWxpZXZlZCBhbW9uZw0KZXhw
ZXJ0cyB0aGF0IHRoaXMgY291bGQgYmUgdGhlIG5leHQgc2VjdG9yIHRvIGxl
YWQgYW4NCmVjb25vbWljIGJvb20uICBTb21lIHJlYWxseSBCaWcgbmV3cyBl
eHBlY3RlZCBmcm9tIHRoaXMNCm5leHQgd2lubmVyOg0KDQpDTzogTmFub19T
dXBlckxhdHRpY2VfVGVjaG5vbG9neSBJbmMuIF9fIHxcfCBTIEwgVA0KQ3Vy
cmVudGx5IFRyYWRpbmcgYXQ6ICQzLjEwDQpJdHMgMSBXZWVrX1RhcmdldCBp
czogJDUuNDUNCg0KR2V0IGluIGVhcmx5IG9uIHRoaXMgb25lISBBIE1hc3Np
dmUgUFIgQ2FtcGFpZ24gaXMgdW5kZXJ3YXkNCmZvciBNb25kYXkgYW5kIGFs
bCBuZXh0IHdlZWtzIHRyYWRpbmcsIEdldCBJbiBFYXJseSEhDQpXZSB0b2xk
IHlvdSBsYXN0IHRpbWUgYWJvdXQgdGhpcyBvbmUsIGV4cGVjdCBtb3JlIHRo
aXMgdGltZSENCg0KTmFub19TdXBlckxhdHRpY2VfVGVjaG5vbG9neSBpcyBh
IG5hbm90ZWNobm9sb2d5IGNvbXBhbnkNCmVuZ2FnZWQgaW4gdGhlIGNvYXRp
bmcgb2YgcHJlY2lzaW9uIHRvb2xzIGFuZCBjb21wb25lbnRzDQp3aXRoIG5h
bm8gc3RydWN0ZWQgY29hdGluZ3MgZm9yIGhpZ2gtdGVjaCBpbmR1c3RyaWVz
Lg0KDQpGb3IgbW9yZSBpbiBkZXB0aCBpbmZvcm1hdGlvbiBhYm91dCB0aGlz
IGV4Y2l0aW5nIGNvbXBhbnkNCmp1c3QgZG8gYSBzZWFyY2ggb24gTmFubyBT
dXBlcmxhdHRpY2UuDQoNClBsZWFzZSBSZWFkIEFsbCB0aGUgUmVjZW50IFBy
ZXNzIFJlbGVhc2VzIGFuZCBFeHBlY3Qgc29tZSANClJlYWxseSBCaWcgTmV3
cyBUaGlzIFVwY29taW5nIFdlZUshIQ0KDQoqKiBBQ1QgUVVJQ0ssIEdPT0Qg
TFVDSyAmIFRSQURFIE9VVCBUSEUgVE9QISEgICoqIA==

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] "sh" is not recognised as an internal or external command, operable program or batch file

2006-03-26 Thread Steve Su
Dear All,

 

I was trying to check my package using 

 

R CMD check GLDEX 

 

And I got the following error?

 

"sh" is not recognised as an internal or external command, operable
program or batch file

 

Can anyone let me know what might be the cause of this error?

 

Thanks.

 

Steve.


[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] "sh" is not recognised as an internal or external comman d, operable program or batch file

2006-03-26 Thread Liaw, Andy
That looks like the symptom of not following the documentation when trying
to build packages on Windows.  (You have not stated the platform.)  In that
case please check and see if you have the tools in Rtools.zip installed and
on the PATH.

Andy

From: Steve Su
> 
> Dear All,
> 
>  
> 
> I was trying to check my package using 
> 
>  
> 
> R CMD check GLDEX 
> 
>  
> 
> And I got the following error?
> 
>  
> 
> "sh" is not recognised as an internal or external command, 
> operable program or batch file
> 
>  
> 
> Can anyone let me know what might be the cause of this error?
> 
>  
> 
> Thanks.
> 
>  
> 
> Steve.
> 
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-devel@r-project.org mailing list 
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 
>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] "sh" is not recognised as an internal or external comman d, operable program or batch file

2006-03-26 Thread Gabor Grothendieck
Also if you are running XP then get and run Rfind.bat from

http://cran.r-project.org/contrib/extra/batchfiles

Just run it without arguments and it will try to locate on your disk
and display all the prerequisites that you need.  If it can't find
anything then you know that that is the problem.


On 3/27/06, Liaw, Andy <[EMAIL PROTECTED]> wrote:
> That looks like the symptom of not following the documentation when trying
> to build packages on Windows.  (You have not stated the platform.)  In that
> case please check and see if you have the tools in Rtools.zip installed and
> on the PATH.
>
> Andy
>
> From: Steve Su
> >
> > Dear All,
> >
> >
> >
> > I was trying to check my package using
> >
> >
> >
> > R CMD check GLDEX
> >
> >
> >
> > And I got the following error?
> >
> >
> >
> > "sh" is not recognised as an internal or external command,
> > operable program or batch file
> >
> >
> >
> > Can anyone let me know what might be the cause of this error?
> >
> >
> >
> > Thanks.
> >
> >
> >
> > Steve.
> >
> >
> >   [[alternative HTML version deleted]]
> >
> > __
> > R-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
> >
> >
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Help please: please test timestamping of command history

2006-03-26 Thread Martin Maechler
[from a semi-private diversion of the R-devel thread ]

> "Duncan" == Duncan Murdoch <[EMAIL PROTECTED]>
> on Sat, 25 Mar 2006 12:28:30 -0500 writes:

Duncan> On 3/25/2006 11:30 AM, Martin Maechler wrote:
>> Hi Duncan,
>> 
>> I think all ESS users don't use history() because ESS
>> calls R with "--no-readline" (Unix) or "--ess" (Windows &
>> Cygwin)
>> 
>> I'd wish that in that case, and probably also in BATCH
>> mode, timestamp() should write the time stamp prefixed by
>> "##" to the "R console" (to R's stdout); when people are
>> using ESS properly, then rather than wanting a history,
>> they save the R's buffer ("*R*") as "R transcript" (file
>> typically ending with ".Rt" or ".Rout") and it makes much
>> sense to have a time stampe entry in that file when
>> others would want an entry in the history.

Duncan> Thanks, that's a good suggestion.  Do you know what
Duncan> the test is for this state, in either R or C code?
Duncan> capabilities() doesn't do it.  Does ESS make itself
Duncan> known to R code somehow?

Yes, when ESS starts  R (or S+) , it also issues 

  options(STERM='iESS')

and we (ESS core) thought that other GUIs / IDEs ideally should
also set "STERM"  - which AFAIK hasn't been adopted widely.

hence   if ( identical("iESS", getOption("STERM")) )  { 
   ## are running 'inside ESS'
}

should be pretty reliable.

Martin

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Sweaving in png

2006-03-26 Thread Friedrich . Leisch

Yes, I have that on mmy 2do list for quite some time now. Could you
send me your patches to the code?

Fritz


> On Sun, 26 Mar 2006 19:58:40 -0500,
> Roger Peng (RP) wrote:

  > For what it's worth, I would find such a adaptation useful.
  > -roger

  > Thibaut Jombart wrote:
  >> Hello list, 
  >> 
  >> despite I already posted a mail on this topic on R help, I guess this 
place may be more appropriate.
  >> I'll make it shorter this time. Sorry for posting twice.
  >> 
  >> I found that using pixmap pictures in a Sweave document was sometimes 
almost impossible, due to the huge size of the pdf pictures produced.
  >> 
  >> The first solution I found was to save pictures in png, when too heavy in 
pdf. Here is an example:
  >> 
  >> ### in a .rnw document ###
  >> 
  >> % here is an invisible chunck to create a picture
  >> <>=
  >> png(filename='figs/myPic.png')
  >> @
  >> 
  >> % next, R code to generate picture
  >> <>=
  >> ...[code to produce the figure]
  >> @
  >> 
  >> % then, close the device. Hidden, again
  >> <>=
  >> dev.off()
  >> @
  >> 
  >> % and then, include it as a picture
  >> \includegraphics{figs/myPic.png}
  >> 
  >> ### end of the example ###
  >> 
  >> I
  >> This is quite long, and I would have prefered to need simply: 
  >> 
  >> <>
  >> ...[code to produce the figure]
  >> @
  >> 
  >> So I tried to adapte the Sweave driver 'RweaveLatex' in order to do so. It 
worked.
  >> 
  >> The not-so-new driver is only a slight modification of RweaveLatex, and 
can 
  >> generate ps, pdf or png figures; it was tested on Ubuntu64, Debian, 
  >> several Windows systems and macOS X partforms with no detected problem.
  >> 
  >> Does someone find this useful, and/or were there better solutions I missed?
  >> 
  >> Regards,
  >> 
  >> Thibaut Jombart .
  >> 

  > -- 
  > Roger D. Peng  |  http://www.biostat.jhsph.edu/~rpeng/

  > __
  > R-devel@r-project.org mailing list
  > https://stat.ethz.ch/mailman/listinfo/r-devel

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel