[R] Simple column selection question- which and character lists

2009-08-31 Thread AllenL
Dear R-list, Seems simple but have tried multiple approaches, no luck. I have a list of column names: >names.species.bio.18=c("Achimillb","Agrosmitb","Amorcaneb","Andrgerab","Ascltubeb","Elymcanab","Koelcrisb","Lespcapib","Liataspeb","Lupipereb","Monafistb","Panivirgb","Petapurpb","Poaprateb","Qu

[R] jpeg device loop problem

2009-08-24 Thread AllenL
Dear R gurus, Trying to loop a graphing function and output a jpeg file each loop. It works fine for a single run (ie. not looping) but when I loop the output is nothing but white space. Here is my code, somewhat abridged: { jpeg(filename=<"name for this loop.jpeg">) xyplot(AbvBioAnnProd~Ye

[R] simple anova question

2009-05-13 Thread AllenL
Dear R group, Simple anova question: I am attempting to recreate a figure (from chapter 10 of "Mordern Statistics for the Life Sciences", chapter 10, figure 10.8). It is an interaction diagram plotting BYIELD (continuous) as a function of BSPACING (categorical) with different lines/colours for an

[R] Help with "by"

2009-04-04 Thread AllenL
Searched for "by" in forums and no hits, should be simple problem. This is my line: >bio.mean<-by(Data,Plot, function(x) mean(AbvBioAnnProd)) I want to calculate the mean of "AbvBioAnnProd" in each Plot. What am I doing wrong? Thanks in advance, -AL -- View this message in context: http://ww

[R] Noobie ANOVA intercept question

2009-04-01 Thread AllenL
Dear R list, I've been attempting to interpret the results from a three-way ANOVA. I think I understand contrasts and the R defaults for these (treatment contrasts). My question is: what is the intercept in this test? As far as I can tell, its NOT the expected value of a point that belongs to the

[R] XYplot simple question

2009-03-16 Thread AllenL
Hello R friends, Simple question today: I am desiring to do an xyplot with the below code, which graphs time series across different experimental Plots- xyplot(AbvBioAnnProd~Year|Plot)### Plots each monoculture biomass vs time xyplot(AbvBioAnnProd~Year|Plot,panel=function(x,y){ panel.xyp

Re: [R] Another newbie question

2009-01-08 Thread AllenL
paste(names(Sp.presence)[x==1],collapse=","))}) Yay! -Allen AllenL wrote: > > Problem: > I have a data frame with 1s and 0s denoting presence/absence of species > (columns) for particular plot measurements (rows). What I want to do is > make a new column whose entries for ea

[R] Another newbie question

2009-01-07 Thread AllenL
Problem: I have a data frame with 1s and 0s denoting presence/absence of species (columns) for particular plot measurements (rows). What I want to do is make a new column whose entries for each row is a list of the column names in which a species is present (ie. for row one its entry might read:

Re: [R] Two Noobie questions

2009-01-06 Thread AllenL
, at 1:50 PM, AllenL wrote: > >> >> 1. I have a list of lm (linear model) objects. Is it possible to >> select, >> through subscripts, a particular element (say, the intercept) from >> all the >> models? I've tried something like this: > > ?co

[R] Two Noobie questions

2009-01-06 Thread AllenL
1. I have a list of lm (linear model) objects. Is it possible to select, through subscripts, a particular element (say, the intercept) from all the models? I've tried something like this: List[[1:length(list)]][1] All members of the list are similar. My goal is to have a list of the intercepts an

Re: [R] Noobie question, regression across levels

2008-12-17 Thread AllenL
ept).) My goal is to have a bunch of new lists, each one listing a subset of coefficients from each regression (ie. one will be a list of all the intercepts, another the mean of all the "YearFinal" effects, etc). Thanks again in advance for help with all these noobie questions! Ben

[R] Noobie question, regression across levels

2008-12-17 Thread AllenL
NB: Not reply needed (Ben was extremely helpful!) I've just started using R last week and am still scratching my head. I have a data set and want to run a separate regression across each level of a factor (treating each one separately). The data right now is arranged such that the value of the f