Re: [R] Change the colour of lines in the xyplot?

2010-07-12 Thread Chuck Cleland
_ > 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. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 We

Re: [R] Logistic regression with multiple imputation

2010-06-30 Thread Chuck Cleland
v) summary(MIcombine(betas,vars)) > Thank you! > > Daniel > > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting

Re: [R] "If-error-resume-next"

2010-06-24 Thread Chuck Cleland
ed, minimal, self-contained, reproducible code. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax: (917) 438-0894 __ R-help@r-project.org mailing lis

Re: [R] Power calculation

2010-06-10 Thread Chuck Cleland
> 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. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.n

Re: [R] switching elements of a vector

2010-05-24 Thread Chuck Cleland
d after that I've selected elements different from zero > ...it is quite long... > can you find an easier solution? > > Thank you for you help -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (

Re: [R] Getting dates in an SPSS file in right format.

2010-05-18 Thread Chuck Cleland
t.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. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th flo

Re: [R] How ls() only functions or anything else but functions?

2010-05-13 Thread Chuck Cleland
On 5/13/2010 11:04 AM, Chuck Cleland wrote: > On 5/13/2010 10:02 AM, John Edwards wrote: >> Hello, >> >> How ls() only functions or only data objects (basically anything other than >> functions) such as data.frame, numeric ...? > > c(ls.str(mode = "function&

Re: [R] How ls() only functions or anything else but functions?

2010-05-13 Thread Chuck Cleland
nd provide commented, minimal, self-contained, reproducible code. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax: (917) 438-0894 __ R-h

Re: [R] vectorize a power analysis?

2010-05-12 Thread Chuck Cleland
omeone point to a discussion of the comparative time efficiencies of > these and other appropriate methods? > > I'm not looking for specific code, just sort of a list of the common > approaches with information about efficiency. > > Thanks, > > Jack -- Chuck Cleland,

Re: [R] Determining Index of Last Element in Vector

2010-04-25 Thread Chuck Cleland
c(1, rep(2, length(v) - 2), 1)) [1] 1 2 2 3 3 4 > So the question is, is there a better way specify the last element of a > vector? If not, is there a better way to duplicate all elements of a vector > except for the first and last? (I know you can achieve this using two > lines, but

Re: [R] substract start from the end of the vector

2010-04-23 Thread Chuck Cleland
** > > > > > [[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-

Re: [R] How to make a boxplot with exclusion of certain groups

2010-04-19 Thread Chuck Cleland
st > 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. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71

Re: [R] how to delete columns with NA values?

2010-04-14 Thread Chuck Cleland
na(tm1)) == 0] > I search a lot, all I found is how to delete column with all NA values.. > > Thanks a lot > > muting -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax

Re: [R] Finding common an unique elements in character vectors

2010-03-29 Thread Chuck Cleland
__ > 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] Stacking matrices

2010-03-15 Thread Chuck Cleland
tp://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0

Re: [R] Randomly sampling subsets of dataframe variable

2010-03-12 Thread Chuck Cleland
ect.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. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8t

Re: [R] TukeyHSD model thing

2010-03-06 Thread Chuck Cleland
29.62672 > full documents are in the attachment, > can someone suggest to me the relevent R codes > that does the same sort of thing? > (tukeyHSD,fisherLSD,and anova table ) > > Thanks! > > casper http://n4.nabble.com/file/n1583109/SAS.pdf SAS.pdf > http://n

Re: [R] sem package and growth curves

2010-03-03 Thread Chuck Cleland
.0063780 7.53177 4.9960e-14 ALC1 <--> ALC1 > Vd2 0.0762156 0.0044523 17.11821 0.e+00 ALC2 <--> ALC2 > Vd3 0.0762794 0.0097763 7.80249 5.9952e-15 ALC3 <--> ALC3 > Vd4 0.1057875 0.0108526 9.74770 0.e+00 PEER1 <--> PEER1 > Vd5 0.1712811 0

Re: [R] sem package and growth curves

2010-03-03 Thread Chuck Cleland
0.006 Ip <-> Ip, Vip, 0.070 Sp <-> Sp, Vsp, 0.028 Ip <-> Sp, Cisp, 0.001 ALC1 <-> ALC1, Vd1, 0.048 ALC2 <-> ALC2, Vd2, 0.076 ALC3 <-> ALC3, Vd3, 0.077 PEER1 <-> PEER1, Vd4, 0.106 PEER2 <-> PEER2, Vd5, 0.171 PEER3 <-> PEER3, Vd6, 0.129 ALC1 <->

Re: [R] setting the steps for x axis labels on plot

2010-03-01 Thread Chuck Cleland
ng 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. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street,

Re: [R] Subset and plot

2010-02-02 Thread Chuck Cleland
ial==2 & Tanks=="a4"|Trial==2 & > Tanks=="c4"|Trial==2 & Tanks=="h4") > daily.sub1<-as.data.frame(daily.sub) > attach(daily.sub1) > daily.sub1 > x11() > plot(Day, Wgt) > #plot(Day, Wgt, pch=c(2,19,21)[Tanks]) > detach(daily

Re: [R] Using auto.key with two variable plots

2010-01-30 Thread Chuck Cleland
? Something like this: print(xyplot(temp_species_EAM_Pred_Pop$x + temp_species_NULL_Pred_Pop$x ~ temp_species_EAM_Pred_Pop$Action, main=current_species, xlab="Action",ylab="Predicted Pop", xlim=c(xmin,xmax),ylim=c(ymin,ymax),

Re: [R] extract R-squared and P-value from lm results

2010-01-29 Thread Chuck Cleland
read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F)

Re: [R] Selective Plot Color

2010-01-27 Thread Chuck Cleland
ansmitted is intended only for the per...{{dropped:10}} > > __ > 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

Re: [R] Extract R-squared from summary of lm

2010-01-22 Thread Chuck Cleland
provide commented, minimal, self-contained, reproducible code. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax: (917) 438-0894 __ R-help@r-pro

Re: [R] Estimation of S.E. based on bootstrapping (functions with two or more arguments)

2010-01-21 Thread Chuck Cleland
__ > 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-co

Re: [R] standardizing one variable by dividing each value by the mean - but within levels of a factor

2010-01-20 Thread Chuck Cleland
20/15 > 100/150 > 200/150 > > I realize I could do it through tapply starting with: > factor.level.means<-tapply(x$values,x$factor,mean) ... etc. > > > But it seems clunky to me. > Is there a more elegant way of doing it? > with(x, ave(x=values, factor, FUN=funct

Re: [R] Exchange NAs for mean

2009-12-17 Thread Chuck Cleland
___ > Hitta hetaste singlarna på MSN Dejting! > http://dejting.se.msn.com/channel/index.aspx?trackingid=1002952 > [[alternative HTML version deleted]] > > > > > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-he

Re: [R] writing 'output.csv' file

2009-12-04 Thread Chuck Cleland
t; 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. -- Chuck Cleland, Ph.D. NDRI, Inc. (ww

Re: [R] Finding cases in one subset that are closet to another subset

2009-12-02 Thread Chuck Cleland
___ > 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. -- Chuck Cleland, Ph.D.

Re: [R] How to z-standardize for subgroups?

2009-11-29 Thread Chuck Cleland
N = scale)) To scale more than one variable in a concise call, consider something along these lines: apply(iris[,1:4], 2, function(x){ave(x, iris$Species, FUN = scale)}) hope this helps, Chuck Cleland > --- On Sun, 11/29/09, Karsten Wolf wrote: > >> From: Karsten Wolf >> Subjec

Re: [R] matching and extracting data

2009-11-27 Thread Chuck Cleland
ot; "5" "Q" [5,] "E" "6" "Q" [6,] "F" "7" "Q" [7,] "G" "5" "R" [8,] "H" "6" "R" [9,] "I" "7" "S" [10,] "J" "5" "S" > Thanks in advance. > > Sincerely, > Ram Kumar Basnet > > > >

Re: [R] interaction effects in a Linear model

2009-11-23 Thread Chuck Cleland
[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, repr

Re: [R] read.table (again)

2009-11-04 Thread Chuck Cleland
thinks of course that the number consists of more than 4 > digits. So, R can't read in the table. > Is there a way I can tell R, that every 4 digits, a new number begins? ?read.fwf > I treif different things with "sep". > data <- read.table ("RA19930101.txt&qu

Re: [R] Johnson-Neyman procedure (ANCOVA)

2009-10-31 Thread Chuck Cleland
ate.edu/ahayes/SPSS%20programs/modprobe.htm > Thanks in advance. > > best, > > Steve -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax: (917) 438-0894 __

Re: [R] What is the difference between anova {stats} and aov?

2009-10-27 Thread Chuck Cleland
r more anova() examples. > __ > 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. -- Chuck Clela

Re: [R] Bonferroni with unequal sample sizes

2009-10-23 Thread Chuck Cleland
hz.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. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (2

Re: [R] Simple question, I think

2009-10-22 Thread Chuck Cleland
h$ba * -1 + 2 > Thanks in advance. > > David > > __ > 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 provi

Re: [R] How to average subgroups in a dataframe? (not sure how to apply aggregate(..))

2009-10-21 Thread Chuck Cleland
ited Kingdom. > 1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252 > > attached base packages: > [1] stats graphics grDevices utils datasets methods > base > > __ > R-help@r-project.org mailing list > https://stat.

Re: [R] modifying model coefficients

2009-10-19 Thread Chuck Cleland
ict(fm1)), c(as.matrix(cbind(1, iris[,2:4])) %*% c(1.8124, 0.9, 0.5, -0.5))) [1] TRUE ?offset -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax: (917) 438-0894

Re: [R] Import SPSS file to R

2009-10-19 Thread Chuck Cleland
sting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax: (917) 438-0894 _

Re: [R] How to calculate average correlation coefficient of a correlation matrix ?

2009-10-13 Thread Chuck Cleland
__ > 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. -- Chuck Cleland, Ph.D. NDRI,

Re: [R] Create column of frequency

2009-09-29 Thread Chuck Cleland
or Math Research > Univ Putra Malaysia > > [[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

Re: [R] Remove single entries

2009-09-28 Thread Chuck Cleland
___ > 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. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 Wes

Re: [R] xyplot & lmline: error message.

2009-09-28 Thread Chuck Cleland
> xyplot(log(Pk)~log(k),data=rwpk,cex=1, > panel=function(x,y){ > panel.grid(h=-1, v=-1) > panel.xyplot(x,y,cex=1.0) > panel.lmline(x,y) > }) > > http://www.nabble.com/file/p25641684/rwpk.csv rwpk.csv -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Stree

Re: [R] cycles in a graphical model

2009-09-16 Thread Chuck Cleland
the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel

Re: [R] how to merge the fitted values from a linear model?

2009-09-01 Thread Chuck Cleland
76 18 -1.03107537 2 0.1116813 19 -1.23459162 0 -0.8160565 20 -0.05666561 0 -0.8160565 -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax: (917) 438-0894 ___

Re: [R] Lattice xyplot: modify line width of plot lines

2009-08-24 Thread Chuck Cleland
data=data, >type="l", >scales=list(relation="free"), >auto.key=list(title="BMI Group", border=FALSE), >xlab=c("Point in Time"), >ylab=c("Concentration of Choline")) > > _

Re: [R] vector replacement 1/0 to P/A

2009-08-18 Thread Chuck Cleland
; "A" [2,] "A" "A" "P" [3,] "P" "A" "P" [4,] "A" "P" "A" [5,] "P" "P" "A" > __ > R-help@r-project.org mailing list >

Re: [R] post hoc test after lme

2009-08-14 Thread Chuck Cleland
0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Adjusted p values reported -- single-step method) But this does not work and returns the error you got: attach(Orthodont) fm2 <- lme(distance ~ AGECAT + Sex, random = ~ 1 | Subject) summary(glht(fm2, linfct=mcp(AGECAT = "Tukey"))) Error in as.vector(x, m

Re: [R] lme funcion in R

2009-08-03 Thread Chuck Cleland
(*, "source")= chr "function (x) max(x, na.rm = TRUE)" - attr(*, "order.groups")= logi TRUE hope this helps, Chuck > Harry > > [[alternative HTML version deleted]] > > ______ > R-help@r-project.org ma

Re: [R] edit.row.names taking row names from the edited dataframe

2009-07-30 Thread Chuck Cleland
. > > I have looked at the edit.data.frame help and i understand why it is > happening, it is taking the rownames from the original dataframe and not the > edit and it seems i should use edit.row.names=T in my script, but i can't > get that to work. > > Does anyone have

Re: [R] metafor

2009-07-24 Thread Chuck Cleland
> 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. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY

Re: [R] Welch Anova ?

2009-07-24 Thread Chuck Cleland
ttps://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. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010

Re: [R] Calculate weighted mean for each group

2009-07-23 Thread Chuck Cleland
t > 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. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, N

Re: [R] Find multiple elements in a vector

2009-07-22 Thread Chuck Cleland
n one number? I could do > > c(which(x==2),which(x==3)) > > but isn't there something more streamlined? My first guess was > > y=c(2,3) > which(x==y) > integer(0) > > which doesn't work. I haven't found any clue in the R manual. How about this?

Re: [R] how to transform m/d/yyyy to yyyymmdd?

2009-07-21 Thread Chuck Cleland
> date easily). > 20071209 > 20071216 > 20080101 > 20080103 > 20080112 > > How to do it? Thank you very much > Julia dates <- c("2/27/1992", "2/27/1992", "1/14/1992", "2/28/1992", "2/1/1992") as.character

Re: [R] calculating median with a condition

2009-07-20 Thread Chuck Cleland
gt; > Manisha > > [[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

Re: [R] duplicate data points on a line graph

2009-07-16 Thread Chuck Cleland
t; > plot(jitter(x), jitter(y)) > > plot(x, y, cex=c(2,2,1,1,1)) > >> 757-864-7114 >> LARC/J.L.Shipman/jshipman >> Jeffery.L.Shipman at nasa.gov > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/ma

Re: [R] duplicate data points on a line graph

2009-07-15 Thread Chuck Cleland
LARC/J.L.Shipman/jshipman > jeffery.l.ship...@nasa.gov > > __ > 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, mi

Re: [R] assessing data variation

2009-07-10 Thread Chuck Cleland
tp://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax: (917) 438-0894 ___

Re: [R] variable driven summary of one column

2009-06-25 Thread Chuck Cleland
gt; Anne > > __ > 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, reprodu

Re: [R] distinguish regression lines in grouped, black and white lattice xyplot

2009-06-24 Thread Chuck Cleland
s) | species, data=sub_agwb_data, type="r", panel=allo.panel.5) > Thanks, > > Katharina > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R

Re: [R] vector and NA

2009-06-23 Thread Chuck Cleland
egards, > > Alfredo > > __ > 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-contain

Re: [R] SAS-like method of recoding variables?

2009-06-22 Thread Chuck Cleland
TRUCK+((CAR+BIKE)/2.2), NA)) > Mark Na > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-proj

Re: [R] resampling the entire row

2009-06-19 Thread Chuck Cleland
l, self-contained, reproducible code. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax: (917) 438-0894 __ R-help@r-project.org mailing list htt

Re: [R] Hi

2009-06-15 Thread Chuck Cleland
atrix(cbind(dat[,2:ncol(dat)])) ~ dat[,1]) summary(mr) > [[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 >

Re: [R] How to fix my nested conditional IF ELSE code?

2009-06-14 Thread Chuck Cleland
8 > Thanks! > > Mark Na > > [[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/posti

Re: [R] Replacing 0s with NA

2009-06-12 Thread Chuck Cleland
9 NA 5 7 NA > Cheers > Christine > > __ > 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, mini

Re: [R] Help with if statements

2009-06-09 Thread Chuck Cleland
icance_count} > > > > > __ > 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, se

Re: [R] if else

2009-06-08 Thread Chuck Cleland
> > Cecília (Universidade de Aveiro - Portugal) > > __ > 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 prov

Re: [R] using "cochran.test()" as a "mcnemar.test()" ?

2009-06-01 Thread Chuck Cleland
large number of blocks and outcomes of the treatments coded as binary responses). hope this helps, Chuck > Thanks, > Tal > > > > > On Tue, Jun 2, 2009 at 12:56 AM, Chuck Cleland <mailto:cclel...@optonline.net>> wrote: > > On 6/1/2009 5:29 PM, Tal Galili wrote:

Re: [R] using "cochran.test()" as a "mcnemar.test()" ?

2009-06-01 Thread Chuck Cleland
value = NA > install.packages("outliers") > require(outliers) > cochran.test(aa) > # Error in x$terms : $ operator is invalid for atomic vectors > > Thanks, > Tal I'm not sure you actually want Cochran's Q Test, but if you do see this thread:

Re: [R] creating list with 200 identical objects

2009-06-01 Thread Chuck Cleland
an I do this? Does this help? x <- vector("list", 500) for(i in 1:500){x[[i]] <- runif(30)} > thanks > > Rainer -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171

Re: [R] Sample size calculation proportions with EpiR: Discrepancy to other calculators

2009-05-26 Thread Chuck Cleland
__ > 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. -- Chuck Cleland, Ph.D. NDRI, Inc.

Re: [R] Forcing a variableinto a model using stepAIC

2009-05-22 Thread Chuck Cleland
earch. > __ > 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 c

Re: [R] SAS PROC SORT nodupkey

2009-05-12 Thread Chuck Cleland
.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. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495

Re: [R] function for nice correlation output with significance symbols

2009-05-10 Thread Chuck Cleland
r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 5

Re: [R] simple for loop question - how do you exit?

2009-04-23 Thread Chuck Cleland
question Type ?"if" at the R prompt, which should load the help page for "Control Flow". -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 5

Re: [R] Translate the elements of a dataframe

2009-04-16 Thread Chuck Cleland
ng 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. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York,

Re: [R] excluding a column from a data frame

2009-04-15 Thread Chuck Cleland
0.615931 > 3 0.8702362 2.653805 > > Now suppose I wanted to exclude the column called "x2". If I try: >> xx[,-"x2"] > Error in -"x2" : invalid argument to unary operator > > things don't work. Is there a simple way to do this by name rat

Re: [R] p-values of correlation matrix

2009-04-13 Thread Chuck Cleland
nks! library(Hmisc) ?rcorr > - > Tamara Hoebinger > University of Vienna -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax: (917) 438-0894 ___

Re: [R] Efficiently create dummy

2009-03-23 Thread Chuck Cleland
this > for (i in 1:length(notreat)) { > temp.st <- notreat[i] > d$treatment[d$st==temp.st]<-0 > i<-i+1 } d$treatment <- as.numeric(!(d$st %in% notreat)) > Thanks, list! > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch

Re: [R] Iterations of random sampling

2009-03-11 Thread Chuck Cleland
ct.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. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floo

Re: [R] Multilevel Modeling using glmmPQL

2009-03-11 Thread Chuck Cleland
MER:\ Sample Disclaimer added in a VBScript.\ \...{{dropped:6}} > > __ > 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-con

Re: [R] Repeated values

2009-03-11 Thread Chuck Cleland
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0

Re: [R] lsmeans in R

2009-03-11 Thread Chuck Cleland
do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-44

Re: [R] Doubt Linear Regression

2009-03-05 Thread Chuck Cleland
g guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax: (917) 438

Re: [R] a few scatter plots for a specific correlation value

2009-03-05 Thread Chuck Cleland
t.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax: (917) 438-0894 __

Re: [R] Help in writing my own function

2009-02-23 Thread Chuck Cleland
e and > recommend me some learning material? Chapter 10 of "An Introduction to R" would be a good place to start. http://cran.r-project.org/doc/manuals/R-intro.html > Many Thanks > > Ted -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor

Re: [R] Doing pairwise comparisons using either Duncan, Tukey or LSD

2009-02-19 Thread Chuck Cleland
pecies, data = iris), linfct = mcp(Species = "Tukey"))) > Thanks in advance, > Saeed -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (

Re: [R] Comparison of age categories using contrasts

2009-02-17 Thread Chuck Cleland
S.E. Lower Upper t Pr(>|t|) a -4.4308653 0.2731223 -4.9733098 -3.8884207 -16.22 0. b -4.0635198 0.2782704 -4.6161888 -3.5108507 -14.60 0. c -0.2998638 0.2772684 -0.8505427 0.2508151 -1.08 0.2823 Error d.f.= 92 > Cheers, > Dylan > > _

Re: [R] wilcoxon test with bonferroni correction

2009-02-02 Thread Chuck Cleland
> University of Cambridge. > UK > > __ > 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,

Re: [R] bootstrapping in regression

2009-01-29 Thread Chuck Cleland
mas Have a look at the following document by John Fox: http://cran.r-project.org/doc/contrib/Fox-Companion/appendix-bootstrapping.pdf > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the post

Re: [R] R stepping through multiplie interactions

2009-01-23 Thread Chuck Cleland
liminating the non-significant terms I understand step() does this > but how would I do it by hand? For the first part, try this: lm(Z ~ (A + B + C + D)^3, data = mydata) -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) t

Re: [R] creating a list of matrices or data frames

2009-01-20 Thread Chuck Cleland
> http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax: (917) 438-0894

Re: [R] lattice question: independent per-row or per-column scaling?

2009-01-19 Thread Chuck Cleland
(matrix(c(.01,.32, .01,.32, .33,.65, .33,.65, .66,.99, .66,.99), nrow=2)), scales=list(y=list(relation="free"))) > It's not lat

Re: [R] anova() or aov()?

2009-01-12 Thread Chuck Cleland
stinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) t

Re: [R] Extraction from an output

2009-01-12 Thread Chuck Cleland
on on the help page for independence_test(). > Robert > > __ > 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 p

Re: [R] Applying 'lm' in each group

2009-01-10 Thread Chuck Cleland
__ > 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. -- Chuck

  1   2   3   >