Re: [R] RE SHAPE package question.

2008-08-04 Thread David Hewitt
the 'melt' command they cannot be used in the 'cast' command. A more compact solution comes from 'recast': > tmp3 <- recast(tmp1, t1 + t2 + t3 + t4 ~ variable, > fun.aggregate=sum, measure.var=c("M", "F")) > tmp3 t1 t2 t3 t

[R] texi2dvi runs but produces no output

2010-04-08 Thread David Hewitt
I am working on a Windows XP machine with R 2.10.1 and a recent installation of MiKTeX 2.8. I use LyX (www.lyx.org) to write documents and have it set up to run Sweave, Stangle, and make the PDF through R using a batch script and a MakeSweave.R file. This system worked just fine until I ran some Mi

Re: [R] texi2dvi runs but produces no output

2011-06-25 Thread David Hewitt
Christiaan, Sorry I did not respond earlier. I have been away on vacation. With all the changes in LyX 2.x to make Sweave stuff easier, I suspect this problem should go away. I have not upgraded my system, but a couple folks that have done so reported no problems with a setup like yours. Probably

[R] Short courses for beginners?

2008-06-23 Thread David Hewitt
I've seen announcements now and then on this list, but none recently. Is there a central place where such announcements are posted, other than here? Anyone know of upcoming courses? I checked the newsletter and mailing list archives. ----- David Hewitt Research Fishery Biologist USGS Klamath Fall

Re: [R] Junk or not Junk ???

2007-12-06 Thread David Hewitt
ost posts through a news reader... you might consider doing the same. I can't even imagine keeping up with the daily deluge of individual emails. http://www.nabble.com/R-help-f13820.html http://news.gmane.org/gmane.comp.lang.r.general - David Hewitt Virginia Institute of Marine Science h

Re: [R] Adding data labels to Lattice plots

2007-12-12 Thread David Hewitt
auto.key = list(points = TRUE, lines = TRUE, space = "right"), panel=panel1) - David Hewitt Virginia Institute of Marine Science http://www.vims.edu/fish/students/dhewitt/ -- View this message in context: http://www.nabble.com/Adding-data-labels

Re: [R] How can I extract the AIC score from a mixed model object produced using lmer?

2007-12-19 Thread David Hewitt
AIC value out of a mixed model object created by >> lmer? >> ______ 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, minima

Re: [R] Entropy/KL-Distance question

2008-01-11 Thread David Hewitt
more specific, and if so I'm not the one to help. But, in case this is helpful... ?AIC - David Hewitt Virginia Institute of Marine Science http://www.vims.edu/fish/students/dhewitt/ -- View this message in context: http://www.nabble.com/Entropy-KL-Distance-question-tp14730814p14763717.

Re: [R] Own classes in "histogram"

2008-01-16 Thread David Hewitt
tmp1 <- hist(your.data, breaks=c(0, 5, 10, 15, 20, 25, 110)) barplot(tmp1$counts, names.arg=c("0", "5", "10", "15", "20", "25", ">25")) The names.arg list handles the x-axis labels, as you wished. - David Hewitt Virgi

[R] Plotmath and line breaks in long annotations for plots

2009-01-27 Thread David Hewitt
I'm trying to combine multi-line text and math annotations on a plot and am not having much luck. I looked at various suggestions in the archives, but I cannot coerce any of them to do what I want. I'm beginning (finally?!) to think that there is an entirely better approach than the one I have trie

[R] Different labels for subsets of points in a PCA or RDA biplot

2009-02-12 Thread David Hewitt
I've tried a few things both with prcomp(), and rda() and its friends in vegan (including biplot.rda and ordiplot), but can't find a solution. I'd like to associate subsets of the points in a resulting biplot ("sites" in the rda object) with different plotting colors/text styles to emphasize certai

Re: [R] Different labels for subsets of points in a PCA or RDA biplot

2009-02-12 Thread David Hewitt
melist1] <- 1 junk$awesome[junk$IDer %in% awesomelist2] <- 2 # Set x,y limits xlims <- c(-1.7, 1.4) ylims <- c(-0.4, 1.3) # Plot without points oldpar <- par(mar=c(4, 4, 1, 1)) biplot.rda(ord, scaling=3, display="species", type="text", col="lightblue",

Re: [R] Re shaping a dataframe with conditional summary of columns - apply or reshape?

2008-01-24 Thread David Hewitt
. (2) Changed "timevar" from "survey1" to "survey". Using "survey1" reordered the columns for the survey observations, and it was much easier to have survey1 first, survey2 second, and survey3 third. - David Hewitt Virginia Institute of Marine Science h

Re: [R] Re shaping a dataframe with conditional summary of columns - apply or reshape?

2008-01-24 Thread David Hewitt
soon. Should have put this in the example, but the locations can be replicated in subsequent years (observations from the same place through time), so reshape drops all but the first. Any ideas? - David Hewitt Virginia Institute of Marine Science http://www.vims.edu/fish/students/dhewitt/ --

Re: [R] boxplot and number of observations per box

2008-01-30 Thread David Hewitt
> How can I plot the number of observations per box in a boxplot. > As usual, there's probably a more elegant solution, but this will do it: p <- rnorm(100) diddy <- boxplot(z) text(1, diddy$stats[3]+0.4, paste("n = ", diddy$n)) see ?text and ?boxplot - Davi

Re: [R] Label outliers in boxplot

2008-02-27 Thread David Hewitt
them with the identify function (http://tolstoy.newcastle.edu.au/R/e2/help/07/01/8598.html). Note that the last Identify command in the latter link should be a lowercase identify. I got those by searching the mail archives (originally). - David Hewitt Virginia Institute of Marine Science http:/

Re: [R] non-linear correlation

2008-03-05 Thread David Hewitt
le as "y goes as x goes". I can't see what you mean concerning the autocorrelation, but if this is a time series problem your first question is then a mystery to me. You might do well to read the posting guide for the mailing list and provide an example. - David Hewitt Vir

Re: [R] Tinn-R related problem

2008-03-10 Thread David Hewitt
believe this issue is not > necessarily R or Tinn-R related but might be some hidden Windows settings > (I'm using XP) but of this I'm not sure. > If that's the case, I can't help. What occurred "a few weeks ago" that might have been related? Did you upgrade R?

Re: [R] question for aov and kruskal

2008-03-11 Thread David Hewitt
eriously, you might need to think more about the type of model you're using, and what you want to know, and then consider how to estimate the effect sizes of interest. - David Hewitt Virginia Institute of Marine Science http://www.vims.edu/fish/students/dhewitt/ -- View this message in c