[R] thanks
Thanks Martin and Michael The plain digest option works well with Thunderbird. Best fishes Sam Sam McClatchie, Fisheries oceanographer Southwest Fisheries Science Center, NOAA, 8604 La Jolla Shores Drive La Jolla, CA 92037-1508, U.S.A. email <[EMAIL PROTECTED]> Cellular: 858 752 8495 Research home page <http://www.fishocean.info> /\ ...>> <°)Xx><< / \\ ><(((°> >><(((°> ...>>O<°)Xx><< - Original Message - From: Michael Dewey <[EMAIL PROTECTED]> Date: Sunday, April 29, 2007 5:20 am Subject: Re: [R] digest readability/ thunderbird email client/ R-help > At 21:00 28/04/2007, Martin Maechler wrote: > >Hi Sam, > > I posted a request for information on how various mailers handled > this so I could summarise the results and put it on a helpful > webpage. Nobody was willing to sing the praises of his/her > favourite > mailer so the only one I can suggest is the one I use myself, > Eudora, > although that is now no longer under development. > > My offer is still open if anyone has anything to contribute. > > > > >>>>> "SamMc" == Sam McClatchie <[EMAIL PROTECTED]> > > >>>>> on Fri, 27 Apr 2007 11:21:56 -0700 writes: > > > > SamMc> System:Linux kernel 2.6.15 Ubuntu dapper > > ... > > > > > > SamMc> Has anyone figured out how to make the R-help digest > > SamMc> more easily readable in the Thunderbird mail client? > > SamMc> I think the digest used to be more readable than is > > SamMc> currently the case with all of the messages as > > SamMc> attachments. > > > > SamMc> I know the work around is to get individual messages > > SamMc> rather than the digest, use another mail client, or > > SamMc> just look at the archives on the web... > > > > {and there are at least two alternatives to the standard > > archives, notably Gmane. > > BTW: Just found an URL that should list all R lists carried > > by them : http://dir.gmane.org/search.php?match=.r. > > > > > >It had been pointed out more than once that Thunderbird > >unfortunately is not adhering to the standard(s) of such > >digests-- too bad it still is not. > > > >One alternative is to get the digest as "plain" digest > >((which BTW another standard-complying digest format, that > > e.g. emacs Rmail or VM can easily deal with)) > >which will most probably just appear as one long e-mail in > >Thunderbird, with "table of contents" of all the subject lines, > >but nothing "clickable" > > > >Regards, > >Martin > > > >Martin Maechler, ETH Zurich > > Michael Dewey > [EMAIL PROTECTED] > http://www.aghmed.fsnet.co.uk/home.html > > __ R-help@stat.math.ethz.ch 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] digest readability/ thunderbird email client/ R-help
System: Linux kernel 2.6.15 Ubuntu dapper R version 2.4.1 ESS on Emacs 21.4.1 - Colleagues Has anyone figured out how to make the R-help digest more easily readable in the Thunderbird mail client? I think the digest used to be more readable than is currently the case with all of the messages as attachments. I know the work around is to get individual messages rather than the digest, use another mail client, or just look at the archives on the web... Best fishes Sam -- Sam McClatchie, Fisheries oceanographer Southwest Fisheries Science Center, NOAA, 8604 La Jolla Shores Drive La Jolla, CA 92037-1508, U.S.A. email <[EMAIL PROTECTED]> work phone: 858 546 7083 Cellular: 858 752 8495 Research home page <http://www.fishocean.info> /\ ...>> <°)Xx><< / \\ ><(((°> >><(((°> ...>>O<°)Xx><< __ R-help@stat.math.ethz.ch 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] spatial/ patches and gaps/ SADIE
System: Linux kernel 2.6.15 Ubuntu dapper R version 2.4.1 ESS on Emacs 21.4.1 - Colleagues I have some spatial patterns of sardine eggs (presence /absence) over 50 years (270 surveys) and I'd like to quantify the patches and gaps to determine how many patches (i.e. spawning areas) there were before the fishery collapse (1951-1965) and during recovery (post 1985). The sampling domain runs from San Francisco to the Mexican border and out beyond the continental shelf. The grid spacing is fairly sparse (30 to 70 km), and irregular (closer nearshore than offshore)(see CalCOFI web pages if you are interested: <http://www.calcofi.org/>). I thought that SADIE <http://www.rothamsted.ac.uk/pie/sadie/SADIE_home_page_1.htm> might be useful, and am wondering if anyone has implemented this analysis method in R? I have failed to find any implementation on the R-site search, through google, or looking at the R packages browse by topic page. Best fishes Sam -- Sam McClatchie, Fisheries oceanographer Southwest Fisheries Science Center, NOAA, 8604 La Jolla Shores Drive La Jolla, CA 92037-1508, U.S.A. email <[EMAIL PROTECTED]> work phone: 858 546 7083 Cellular: 858 752 8495 Research home page <http://www.fishocean.info> /\ ...>> <°)Xx><< / \\ ><(((°> >><(((°> ...>>O<°)Xx><< __ R-help@stat.math.ethz.ch 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] pdf/ convert/ font problem
Background: OS: Linux Ubuntu Dapper R : Version 2.3.1 (2006-06-01) Emacs 21.4.1 ESS Colleagues This is neither a bug report, nor a complaint, so I think this is the appropriate list. I am getting an odd font problem with a pdf generated using pdf(file = "../figures/PCNM.models.larvae.fluor.zoo.stability.2001.and.2002.pdf", title="", family="serif", pointsize=10, width=6.75, height=8.625) The figure produced from my code is here: <http://www.members.iinet.net.au/~s.mcclatchie/aslo/PCNM.models.larvae.fluor.zoo.stability.2001.and.2002.pdf> (I can't really send all of the code as there are several subroutines for the analysis that are not relevant here anyway). The pdf loads into acroread or xpdf fine, so is not corrupted, but ghostscript gives an error: ERROR: /invalidfont in --.type1execchar--ESP Ghostscript 815.02: Unrecoverable error, exit code 1 Operand stack: --dict:4/4(L)-- --dict:16/17(ro)(G)-- 108 a71 -string- Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- --nostringval-- %finish_show --nostringval-- --nostringval-- 7 9 1 --nostringval-- (gs_show_enum) %op_show_continue Dictionary stack: --dict:1124/1686(ro)(G)-- --dict:0/20(G)-- --dict:85/200(L)-- --dict:104/127(ro)(G)-- --dict:241/347(ro)(G)-- --dict:20/24(L)-- --dict:4/6(L)-- --dict:20/20(L)-- --dict:12/13(L)-- Current allocation mode is local -- Also Imagemagick cannot display or convert the file to .png: [EMAIL PROTECTED]:~/dynamic_data/projects2005/sardine_egg_distribution/journal$ convert PCNM.models.larvae.fluor.zoo.stability.2001.and.2002.pdf PCNM.models.larvae.fluor.zoo.stability.2001.and.2002.png ERROR: /invalidfont in --.type1execchar-- Operand stack: --dict:4/4(L)-- --dict:15/16(ro)(G)-- 108 a71 -string- Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 1 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- --nostringval-- %finish_show --nostringval-- --nostringval-- 9 10 1 --nostringval-- (gs_show_enum) %op_show_continue Dictionary stack: --dict:1125/1686(ro)(G)-- --dict:0/20(G)-- --dict:85/200(L)-- --dict:85/200(L)-- --dict:104/127(ro)(G)-- --dict:241/347(ro)(G)-- --dict:20/24(L)-- --dict:4/6(L)-- --dict:20/20(L)-- --dict:12/13(L)-- Current allocation mode is local ESP Ghostscript 815.02: Unrecoverable error, exit code 1 convert: Postscript delegate failed `PCNM.models.larvae.fluor.zoo.stability.2001.and.2002.pdf'. I have all of the true type fonts installed. Probably the solution is just to use png() rather than pdf(), but I thought this problem was curious enough to report. Best fishes Sam -- Sam McClatchie (Senior research scientist, SARDI) & Elena Turin (Audit manager, Community CPS) post: 22 McKenzie St, Coromandel Valley, SA 5051, Australia web: <http://www.smcc.150m.com/> phone: 61-8-8270-1022 cell: 0431-304-497 /\ >> /// \\\ /// <%)Xx><< / \\ ><(((@> ><(((%> ..>>O<< __ R-help@stat.math.ethz.ch 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] review by statistician/ Heiberger and Holland
System Info: OS: linux Mandrake 9.1 R Version 1.8.1 (2003-11-21), GNU Emacs 21.2.93.1 Browser Mozilla firefox - Colleagues Has anyone written a review of this book? Statistical Analysis and Data Display: An Intermediate Course with Examples in S-PLUS, R, and SAS. Richard M. Heiberger and Burt Holland <http://www.insightful.com/news_events/webcasts/pharm04/heiberg er.asp> I can't find a review on the web yet, except for publisher type reviews, e.g. <http://bookwebpro.kinokuniya.co.jp/booksea.cgi?ISBN=038740270 5&USID=>. I'm really interested in a review by a statistician. I'm particularly interested with how it compares with Statistical Computing: An Introduction to Data Analysis using S-Plus Michael J. Crawley I've found MJ Crawleys book very useful for both myself and grad students, and got our library <http://www.sardi.sa.gov.au/aquatic/index.html> to buy it. Best fishes Sam -- Sam McClatchie & Elena Turin 22 McKenzie St, Coromandel Valley, Adelaide, South Australia 5051 email <[EMAIL PROTECTED]> Telephone: (61-8) 8270 1022 cell. 0431 304 497 Research home page <http://www.members.iinet.net.au/~s.mcclatchie/> /\ ...>> << / \\ ><(((?> >><(((?> ...>>O<< __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] reinstalling R/ mandrake 9.1/ rpm
Patrick Connolly wrote: On Tue, 13-Jan-2004 at 03:35AM +, Sam McClatchie wrote: |> OS: linux Mandrake 9.1 |> R Version 1.8.1 (2003-11-21), |> GNU Emacs 21.2.93.1 |> --- |> |> Colleagues |> |> I'm reinstalling R after reformatting a partition containing the |> applications software. The urpmi returned this error: I've not used urpmi. Is that to say you had it working from an rpm already and this is a way to get it onto another petition? |> Should I uninstall the rpm using something like urpmi.removemedia, and rpm -e is sufficient, IIRC. |> then try and install the source with ./congure, make and make install? The only Mandrake I've tried is 9.0 which gave me all sorts of problems with things not working (some bits didn't seem to get from the installation CDs). I've gone back to Redhat 7.3. Having said that, I prefer to install from the tgz file. The installation procedure is very well thought out and it takes at most 20 minutes. Another good reason is so that you can still use previous versions if something appears to be a 'new' bug. For most other things, rpms are great. HTH OS: linux Mandrake 9.1 R Version 1.8.1 (2003-11-21), GNU Emacs 21.2.93.1 Hi Patrick My need to reinstall R arose from a classic mistake. I had copied the gnucash rpm into /usr/lib/, and then installed it, which resulted in a /usr/lib/usr/lib structure. In correcting my error, I was too quick with my fingers, and as root, deleted my /usr/lib directory (I had to laugh, after I finished cursing). Anyway, I had to reformat my software partition. There does seem to be a problem with the mandrake 9.1 rpm. I've just installed the R 1.8.1 sources with ./configure, make, make install (after installing the C, C++ and Fortran compilers from the Mandrake software management gui). Everything worked beautifully. Thanks Sam -- Sam McClatchie, Sub-program leader, Pelagic Fisheries South Australian Aquatic Sciences Centre PO Box 120, Henley Beach 5022 Adelaide, South Australia email <[EMAIL PROTECTED]> Telephone: (61-8) 8200 2433 FAX: (61-8) 8200 2481 Research home page <http://www.smcc.150m.com/> /\ >> /// \\\ /// <%)Xx><< / \\ ><(((@> ><(((%> ..>>O<< __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] reinstalling R/ mandrake 9.1/ rpm
OS: linux Mandrake 9.1 R Version 1.8.1 (2003-11-21), GNU Emacs 21.2.93.1 --- Colleagues I'm reinstalling R after reformatting a partition containing the applications software. The urpmi returned this error: [EMAIL PROTECTED] R]# urpmi R-1.8.1-1mdk.i586.rpm installing R-1.8.1-1mdk.i586.rpm Preparing... ## 1:R #error: unpacking of archive failed on file /usr/lib/R/library/base/html/00Index.html;40036372: cpio: read I did not see any mention of this problem in the help archive Is there any problem with the rpm? Or perhaps just something odd on my system? Should I uninstall the rpm using something like urpmi.removemedia, and then try and install the source with ./congure, make and make install? Any suggestions welcome. Thanks. Sam -- Sam McClatchie, Sub-program leader, Pelagic Fisheries South Australian Aquatic Sciences Centre PO Box 120, Henley Beach 5022 Adelaide, South Australia email <[EMAIL PROTECTED]> Telephone: (61-8) 8200 2433 FAX: (61-8) 8200 2481 Research home page <http://www.smcc.150m.com/> /\ >> /// \\\ /// <%)Xx><< / \\ ><(((@> ><(((%> ..>>O<< __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Oceanographic lattice plots
System info: Red Hat 9.0 R Version 1.8.0 ESS 5.1.21 Emacs 21.2.1 --- Hello I've been working with Paul Murrell here in New Zealand to develop plots of temperature and density profiles at 22 stations spanning a frontal zxone, and then overlaying the isothermal and mixed layer depths (similar to Kara et al. 2003 JGR Oceans 108(C3) pg. 24-5, figure 2). Paul Murrell has a package called gridBase which works with R 1.8.0 that does the job nicely. I've put the plot on a publicly accessible ftp site Here is the code used to generate the plot that Paul developed with my collaboration. --- panel.t.s.profiles.mld.paul.alternate <- function() { ## Purpose: ## -- ## Arguments: ## -- ## Author: Paul Murrell & Sam McClatchie, Date: 16 Oct 2003, 09:43 require(gridBase) ## zt, p, zsigma, and lat are in the workspace ## ILD data generated by "calculate.MLD.and.ILD(0.8)" etc #ILD values are in the workspace #convert to positive values ILD0.2 <- -ILD0.2 ILD0.2 <- matrix(c(ILD0.2,NA,NA),ncol=8,byrow=T) ILD0.2.vec <- c(ILD0.2[1,],ILD0.2[2,],ILD0.2[2,]) ILD0.5 <- -ILD0.5 ILD0.5 <- matrix(c(ILD0.5,NA,NA),ncol=8,byrow=T) ILD0.5.vec <- c(ILD0.5[1,],ILD0.5[2,],ILD0.5[2,]) ILD0.8 <- -ILD0.8 ILD0.8 <- matrix(c(ILD0.8,NA,NA),ncol=8,byrow=T) ILD0.8.vec <- c(ILD0.8[1,],ILD0.8[2,],ILD0.8[2,]) ## dummy MLD data MLD0.5 <- ILD0.5*0.75 MLD0.5.vec <- c(MLD0.5[1,],MLD0.5[2,],MLD0.5[2,]) nrow <- 3 ncol <- 8 grid.newpage() par(xpd=NA, col.axis="grey") # Use grid to make a layout of rows and columns # Each "row" consists of a plot region with a label area on top # (i.e., a Trellis-like arrangement) hence the "nrow*2". # The label area is 1 line high, the plot areas # consume the remaining height. # Maybe you could add extra rows and cols to this layout to # create small gaps between each plot # This layout is within a viewport which leaves margins for axes # and labels push.viewport(viewport(x=unit(4, "lines"), y=unit(4, "lines"), width=unit(1, "npc") - unit(6, "lines"), height=unit(1, "npc") - unit(6, "lines"), just=c("left", "bottom"), layout=grid.layout(nrow*2, ncol, heights=unit(rep(c(1, 1), nrow), rep(c("lines", "null"), nrow) for (i in 1:nrow) { for (j in 1:ncol) { index <- (i-1)*ncol + j evenrow <- i %% 2 == 0 evencol <- j %% 2 == 0 if (index < 23) { # Go to plot region i, j # Set the yscale for doing the overlay later push.viewport(viewport(layout.pos.row=i*2, layout.pos.col=j, yscale=c(400, 0))) grid.rect(gp=gpar(col="grey")) # Draw first plot # Here's where we use gridBase to put a plot into a grid viewport # The par(plt=gridPLT()) makes the plotting region line up with # the current grid viewport (pushed two lines ago) par(plt=gridPLT(), new=TRUE, cex=0.8) plot(zt[,index],-p[,1], ylim=c(400,0), xlim=c(6,15), type='l', xlab="",ylab="", axes=FALSE, xpd=FALSE) # Draw axes (only do some) if (j == 1 && !evenrow) axis(2, col="grey") if (i == nrow && !evencol) axis(1, col="grey") par(new=TRUE) # Draw second plot plot(zsigmat[,index],-p[,1], ylim=c(400,0), type='l',lty=2, xlab="", ylab="", xlim=c(26.1,27.4), axes=FALSE, xpd=FALSE) # Draw axes if ((j == ncol || index == 22) && evenrow) axis(4, col="grey") pop.viewport() # Draw the latitude labels push.viewport(viewport(layout.pos.row=i*2 - 1, layout.pos.col=j, gp=gpar(col="grey", fill="light grey"))) grid.rect() grid.text(round(lat[index,],digits=2), gp=gpar(col="white")) # Draw top axes if (i == 1 && evencol) { par(plt=gridPLT()) axis(3, col="grey") } pop.viewport() } } } # Overlay mixed layer depths lines # Here we use some grid functions to do drawing # The 0.5 means "half way across the region", # the "native" means that the value is relative # to the yscale we set up when we created the viewport for (i in 1:nrow) { for (j in 1:ncol) { index <- (i-1)*ncol + j if (index < 23) { push.viewport(viewport(layout.pos.row=i*2, layout.pos.col=j
[R] plot/ layout/ overlay problem
System info: Red Hat 9.0 R Version 1.7.0 ESS 5.1.21 Emacs 21.2.1 --- Colleagues I have a small problem with positioning overlays using layout. ## Purpose: to plot temperature and salinity profiles ## as a multipanel figure, and ## overlay the the mixed ## layer depths. Here is the code skeleton: nf <- layout(matrix(c(1,2,3,4,5,6,7,8,9,10,11, 12,13,14,15,16,17,18,19,20,21,22), 2,11,byrow=TRUE)) par.old <- par(mai=c(1,0.5,1,0)) for (i in 1:22){ ## plot temperature profiles (solid line) plot(... ## plot sigma t profiles (dashed line) par("new"=TRUE) plot( ... } ## overlay the mixed layer depths nf <- layout(matrix(c(1,2), 2,1,byrow=TRUE)) par("new"=TRUE) test.x <- c(0,1,2,3,4,5,6,7,8,9,10,11) test.y <- c(90,100,110,200,200,250,300,350,330,370,330,370) plot(test.x,test.y, ylim=c(1000,0), xlim=c(0,11),type='b', axes=F,lty=3) par(par.old) --- The problem is that the second overlay comes up in the bottom panel (where the last of the 22 panels ended). The question is: how do I get the second overlay to start in the top panel where the first of the 22 panels began? Best fishes Sam -- Sam McClatchie, Research scientist (fisheries acoustics)) NIWA (National Institute of Water & Atmospheric Research Ltd) PO Box 14 901, Kilbirnie, Wellington, New Zealand [EMAIL PROTECTED] Research home page <http://www.smcc.150m.com/> /\ >> /// \\\ /// <%)Xx><< / \\ ><(((@> ><(((%> ..>>O<< __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] problem downloading Red Hat R-1.7.1-1.i386.rpm
System info: Red Hat 9.0 R Version 1.7.0 ESS 5.1.21 Emacs 21.2.1 --- Colleagues At work I've had to migrate from Mandrake 9.1 to Red Hat 9.0 and I'm reinstalling R. I am having a problem downloading from R-1.7.1-1.i386.rpm from /bin/linux/redhat/9/i386. Basically the download does not complete. I am using mozilla, and when I click on the link the screen corrupts with odd symbols. Is there a problem with the site? (I don't have any problem downloading the user-contributed packages or the R-1.7.1.tgz. Sam -- Sam McClatchie, Research scientist (fisheries acoustics)) NIWA (National Institute of Water & Atmospheric Research Ltd) PO Box 14 901, Kilbirnie, Wellington, New Zealand [EMAIL PROTECTED] Research home page <http://www.smcc.150m.com/> /\ >> /// \\\ /// <%)Xx><< / \\ ><(((@> ><(((%> ..>>O<< __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] r-help: mozilla and R -- again
System info: Mandrake 9.0 R Version 1.6.1 ESS 5.1.21 Emacs 21.2.1 --- -Original Message- > >From: [EMAIL PROTECTED] > >[mailto:[EMAIL PROTECTED] On Behalf Of Anne York > >Sent: Thursday, March 27, 2003 3:52 PM > >To: Help R > >Subject: [R] mozilla and R -- again > > > > > >I noticed last week that when using mozilla (both 1.2 and 1.3) > >as the help browser in R, it exhibits the following behavior: > > > >1. assuming the browser is running go to the help -> "search > >engine and key words" > > > >2. enter a string, say "plot" > > > >3. when the "search results" are displayed, click on > >something, say "abline" > > > >4. go back to the search results using the browser "Back" button > > > >5. click on something else, eg, "arrows" > > > >Nothing happens. I get the same results with mozilla 1.2 and > >1.3 running R 1.6.2 in both RH 8.0 and Windows 2000. > > > >Seems like the links just die. I'm wondering if this is this > >simply a mozilla issue as browsers work fine with R. Or > >perhaps some of the R gurus might have some idea if mozilla > >can be configured differently to work better with R? > > Hi Yes, I got the same result with Mozilla 1.1 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 but how serious is the inconvenience? After clicking on 'arrows' and going nowhere, it is a matter of a second or two to back out to the search panel, type in arrows and you are there. OK, it's not perfect, but who is? Sam -- Sam McClatchie, Research scientist (fisheries acoustics)) NIWA (National Institute of Water & Atmospheric Research Ltd) PO Box 14 901, Kilbirnie, Wellington, New Zealand [EMAIL PROTECTED] Research home page <http://www.smcc.150m.com/> /\ >> /// \\\ /// <%)Xx><< / \\ ><(((@> ><(((%> ..>>O<< __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] calling sweave function from LaTex re directories, formatting
System info: Mandrake 9.0 R Version 1.6.1 ESS 5.1.21 Emacs 21.2.1 --- Colleagues I have followed suggestions by David Whiting, Friedrich Leisch and Frank Harrell, but have a few more queries. 1. On formatting: I added the suggested sweave customization to my .emacs file ; Sweave customisation (defun Rnw-mode () (require 'ess-noweb) (noweb-mode) (if (fboundp 'R-mode) (setq noweb-default-code-mode 'R-mode))) (add-to-list 'auto-mode-alist '("\\.Rnw\\'" . Rnw-mode)) (add-to-list 'auto-mode-alist '("\\.Snw\\'" . Rnw-mode)) (setq reftex-file-extensions '(("Snw" "Rnw" "nw" "tex" ".tex" ".ltx") ("bib" ".bib"))) (setq TeX-file-extensions '("Snw" "Rnw" "nw" "tex" "sty" "cls" "ltx" "texi" "texinfo")) but I am a bit puzzled that the LaTex color coding is lost in the foo.Rnw file. It does work if I rename the file foo.tex. 2. On directories I like to keep my directories structred under /projects/ with subdirectories for ../R/, ../report/, ../figures/ and so forth. So my foo.Rnw is in /projects/reports. I set up an executable file to process foo.Rnw by calling Sweave from the R tools library, and run this shell from my /projects reports directory, as follows: process foo.Rnw where *process is #!/bin/sh echo "library(tools); Sweave(\"$1\")" | R --no-save --no-restore In my LaTex document, I set the eval option to FALSE if I don't want the Sweave chunks to run <>= '../R/R-src/vary.mean.roughy.density()' @ However, I haven't been able to get the code to find the R script when called from a directory tree like this when eval=TRUE. If I put foo.Rnw in /projects/R and Sweave("foo.Rnw") the process runs, producing a foo.tex file and foo.eps and foo.pdf files, but the foo.pdf gives and empty page error on loading into Acrobat 5.0. OK, so I'm screwing something up here, but am not sure exactly what. The R script runs fine and generates a pdf graph okay on its own. Any help, gratefully received. Best fishes Sam -- Sam McClatchie, Research scientist (fisheries acoustics)) NIWA (National Institute of Water & Atmospheric Research Ltd) PO Box 14 901, Kilbirnie, Wellington, New Zealand [EMAIL PROTECTED] Research home page <http://www.smcc.150m.com/> /\ >> /// \\\ /// <%)Xx><< / \\ ><(((@> ><(((%> ..>>O<< __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] calling sweave function from latex
System info: Mandrake 9.0 R Version 1.6.1 ESS 5.1.21 Emacs 21.2.1 --- Colleagues I've been calling R-code embedded in my LaTex document using Sweave, but would like to make things more convenient. At present as I understand it you first process the R chunks of code using the Sweave function called from within R to process a "precursor file" e.g. foo.sw to get a LaTex file (foo.sw.tex) that you then process with latex foo.sw.tex. example code segment %\item {\bf Matched trawl and acoustic data} \label{real data} \item {\bf Results} sweave code <>= average.trawl.spp.composition() @ insert figure generated from sweave code \begin{figure} \includegraphics[scale=0.6]{../figures/bycatch_by_weight} \caption{\label{catch by weight} Proportions of selected species (from Table \ref{ts length regressions}) in the fish assemblage using catch rate ($kg\ km{-1}$) as an approximation for fish density (neglecting variable capture efficiencies). Note: there were no oblique banded rattails in this dataset, although we have a \textit{-length} regression for them (see Table \ref{ts length regressions}). Box plot centre line = meadian, box limits are $25^{th}$ and $75^{th}$ quartiles, whiskers represent 1.5 times the interquartile range from the median, and points outside the whiskers are the tails of the distributions.} \end{figure} --- This works fine, but it is cumbersome for someone who likes to write a bit and then latex that additional bit. Of course I can just add the new LaTex code chunks to the foo.sw.tex and latex that, but I have to remember to copy the foo.sw.tex back to foo.sw or the versions get mixed up. Trivial, but annoying. The question is: can I call the Sweave function from within LaTex so I just latex the foo.sw.tex and the Sweave chunks will also get processed. This would be much tidier. One suspects that the short answer is 'no'. Best fishes Sam -- Sam McClatchie, Research scientist (fisheries acoustics)) NIWA (National Institute of Water & Atmospheric Research Ltd) PO Box 14 901, Kilbirnie, Wellington, New Zealand [EMAIL PROTECTED] Research home page <http://www.smcc.150m.com/> /\ >> /// \\\ /// <%)Xx><< / \\ ><(((@> ><(((%> ..>>O<< __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] help.start() setup with netscape
System info: Mandrake 9.0 R Version 1.6.1 ESS 5.1.21 Emacs 21.2.1 --- Colleagues I understand that help.start() search function works with netscape and although it may also work with latest versions of mazilla it doesn't seem to with the one I'm using (Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826). I thought that there were instructions for setting up the browser for help.start() in the Mandrake-Readme.txt at <http://www.cran.r-project.org/>, but that seems to be gone now (or perhaps I am mistaken that it was ever there?). Please can you tell me where to find the setup to specify netscape as the browser that R uses? I want to keep mozilla as my primary browser. Best fishes Sam -- Sam McClatchie, Research scientist (fisheries acoustics)) NIWA (National Institute of Water & Atmospheric Research Ltd) PO Box 14 901, Kilbirnie, Wellington, New Zealand [EMAIL PROTECTED] Research home page <http://www.smcc.150m.com/> /\ >> /// \\\ /// <%)Xx><< / \\ ><(((@> ><(((%> ..>>O<< __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help