Re: [R] Subsetting to unique values

2008-06-06 Thread Chuck Cleland
RUE FALSE TRUE FALSE ddTable[!duplicated(ddTable$Id),] Id name 1 1 Paul 3 2 Bob ?duplicated __ 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] mean

2008-06-06 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, 8th floor New York

Re: [R] Plot matrix as many lines

2008-06-06 Thread Chuck Cleland
nfo/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 (T

Re: [R] col.names ?

2008-06-06 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 West 23r

Re: [R] Histogram of gaps

2008-06-10 Thread Chuck Cleland
ntained, 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 https://sta

Re: [R] How to join data.frames and vectors of different length, in an inteligent way?

2008-06-10 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, NY 10010 tel:

Re: [R] Parsing a data file - Help

2008-06-11 Thread Chuck Cleland
lp 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-

Re: [R] subsetting data-frame by vector of characters

2008-06-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, Inc. (www.ndri.org

Re: [R] Reshape or Stack? (To produce output as columns)

2008-06-17 Thread Chuck Cleland
00287 89.881 -89.75 89.88 0.8961858 89.882 0.00 89.88 0.1663938 89.883 89.75 89.88 0.9004246 179.751-89.75179.75 0.1340782 179.752 0.00179.75 0.1316141 179.753 89.75179.75 0.1052875 Many thanks, Steve ______ R-help@r-project.or

Re: [R] PrettyR (describe)

2008-06-19 Thread Chuck Cleland
t;Selenium", "Silicon", "Sodium", "Sulfate", "TDS", "TIC", "TKN", "TOC", "TSS", "TVSS", "Zinc"), row.names = 54:80, class = "data.frame") library(prettyR) library(moments) Q25 <- fun

Re: [R] Help on Analysis of covariance

2008-07-01 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) tel: (73

Re: [R] macros in R

2008-07-14 Thread Chuck Cleland
On 7/14/2008 11:03 AM, Erin Hodgess wrote: Hi R People: Could someone point out a reference for creating macros in R, please? Thanks, Erin See Programmer’s Niche: Macros in R by Thomas Lumley: http://www.r-project.org/doc/Rnews/Rnews_2001-3.pdf -- Chuck Cleland, Ph.D. NDRI, Inc

Re: [R] A question about using function plot

2008-07-14 Thread Chuck Cleland
at.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] sunrise sunset calculations

2008-07-15 Thread Chuck Cleland
On 7/15/2008 12:52 PM, stephen sefick wrote: Does anyone know if there is a sunrise sunset calculator for R? RSiteSearch("sunrise", restrict="function") points to several related functions in the maptools package. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 W

Re: [R] basic help

2008-03-20 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. -- C

Re: [R] MDS

2008-03-23 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] pseudo R square and/or C statistic in R logistic regression

2008-03-27 Thread Chuck Cleland
an/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-help@r-project.org mailing list > https://stat.ethz.c

Re: [R] Comparing proportions between groups

2008-03-28 Thread Chuck Cleland
me that there are not enough observations in x. > Could anyone help me? That would be really great. Thank you, > Lila prop.test(x=c(40,100), n=c(200,300)) OR prop.test(matrix(c(40,100,160,200), ncol=2)) ?prop.test -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 We

Re: [R] directory of R "consultants for hire"

2008-03-29 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-0

Re: [R] maximum of identical elements in a vector

2008-03-30 Thread Chuck Cleland
.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] Reverse seq

2008-03-31 Thread Chuck Cleland
o/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)

Re: [R] convert delimited string to vector

2008-03-31 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 C

Re: [R] merge with rownames?

2008-04-03 Thread Chuck Cleland
cbinding the rownames to the data.frames. > Mark The details section of the help page for merge suggests you can use either merge(..., by=0) or merge(..., by="row.names"). ?merge -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 te

Re: [R] tapply

2008-04-08 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 100

Re: [R] apply lm() for all the columns of a matrix

2008-04-09 Thread Chuck Cleland
ix(iris[, 1:3]) ~ iris$Species) Coefficients: Sepal.Length Sepal.Width Petal.Length (Intercept) 5.006 3.4281.462 iris$Speciesversicolor 0.930-0.6582.798 iris$Speciesvirginica1.582-0.454 4.090 > Thank you > Kostas -- Chuck Cl

Re: [R] subtract the mean from each column

2008-04-10 Thread Chuck Cleland
mns have zero mean. any one > know how to do that . Thanks mymat <- matrix(runif(10*4), ncol=4) colMeans(mymat) [1] 0.4711083 0.4825977 0.4757448 0.3037873 newmat <- apply(mymat, 2, scale, scale=FALSE, center=TRUE) colMeans(newmat) [1] 1.110223e-17 -2.220446e-17 -1.110223e-17 1.11

Re: [R] Format regression result summary

2008-04-11 Thread Chuck Cleland
> Thanks a lot in advance > > Thiemo > > __________ > 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] Matrix Indexing

2008-04-12 Thread Chuck Cleland
/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 Yor

Re: [R] Power curves

2008-04-14 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

Re: [R] Power curves

2008-04-14 Thread Chuck Cleland
On 4/14/2008 6:35 AM, Chuck Cleland wrote: > On 4/14/2008 6:21 AM, Louisa Hay wrote: >> >> Hi, >> I am trying to create a power curve to show how the power of a t-test varies >> depending on the mean. Any ideas how I should go about this? >> Louisa

Re: [R] pnbinom.c qnorm.c

2008-04-17 Thread Chuck Cleland
gt; [[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, minima

Re: [R] Permanent change to the working directory

2008-04-18 Thread Chuck Cleland
. How can I set it definitively to "C:/R/DATA" without having to redo > it every session? Thanks ?Startup -- 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] matrix problem

2008-04-21 Thread Chuck Cleland
t; the above. The matrices are large, so I need a fast method. > > Thanks very much for any help. > > Bill Simpson > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the po

Re: [R] select rows from data based on a vector of char strings

2008-04-23 Thread Chuck Cleland
t[1]' I get 'F T F F', so it works for one item > in the char vector flist. > But, when I do 'data$label==flist' I get 'F F F F' while I expected 'F T F > T'. It seems that I can't perform this action with a vector of charstrings? > >

Re: [R] Running regression (lm, lrm) 100+ times and saving the results as matrix

2008-04-29 Thread Chuck Cleland
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 mai

Re: [R] If(cond) statement

2008-04-29 Thread Chuck Cleland
Or this: {if (mxx > mxy) mxy <- mxx else mxx <- mxy} __ 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

Re: [R] arcsine transformation

2008-04-30 Thread Chuck Cleland
ORE) : NaNs produced You might divide the values by 100 prior to asin(). I'm at a loss here and I would greatly appreciate any guidance that could be given me. Thank you! -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-449

Re: [R] Scatter Plot - 3 vectors side by side

2008-05-06 Thread Chuck Cleland
nimal, 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 li

Re: [R] Multivariate simulation

2008-05-09 Thread Chuck Cleland
ternative 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, reproducible code. --

Re: [R] A Very Simple Question

2008-05-13 Thread Chuck Cleland
-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] A very simple question

2008-05-14 Thread Chuck Cleland
ble 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 https://stat.ethz.ch/mail

Re: [R] Using tapply

2008-05-15 Thread Chuck Cleland
e 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] From strings to numbers

2008-05-19 Thread Chuck Cleland
t;,"ab","bb","cat","cat","ab") as.numeric(as.factor(X)) [1] 1 1 2 3 3 1 Thx, Naira -- 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] help (boot)

2008-05-22 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, NY 10010 tel: (212)

Re: [R] multiple comparison (glht) problem

2007-11-21 Thread Chuck Cleland
sity > Email: [EMAIL PROTECTED] > tel: 410-516-8103 > __ > 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] [:]

2007-11-24 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

Re: [R] looking for function like rollmean()

2007-11-24 Thread Chuck Cleland
rom the stats package. ?smooth -- Chuck Cleland, Ph.D. NDRI, Inc. 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 https://stat.ethz.

Re: [R] ragged array with append

2007-11-24 Thread Chuck Cleland
R with(d, split(as.character(word), kind)) ?split > Cheers, > Alexy > > __________ > 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] ragged array with append

2007-11-24 Thread Chuck Cleland
Alexy Khrabrov wrote: > On Nov 24, 2007, at 2:07 PM, Chuck Cleland wrote: > >> with(d, split(word, kind)) >> >> # OR >> >> with(d, split(as.character(word), kind)) > > Awesome! Scoping: how do I get the result back to the top level? > > &

Re: [R] cor.test formula

2007-12-17 Thread Chuck Cleland
z.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. 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel:

Re: [R] median of binned values

2007-12-19 Thread Chuck Cleland
n(rep(as.numeric(binname), freq))]) [1] "cat5" > Thanks a lot > Martin > > __ > 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, m

Re: [R] Calculate remainer

2007-12-19 Thread Chuck Cleland
You might put the "result" and remainder together in a function like this: myfunc <- function(x,y){list(result = floor(x / y), remainder = x %% y)} myfunc(x=50, y=12) $result [1] 4 $remainder [1] 2 -- Chuck Cleland, Ph.D. NDRI, Inc. 71 West 23rd Street, 8th floor New York, NY 10010

Re: [R] median of binned values

2007-12-19 Thread Chuck Cleland
(as.numeric(binname), freq))]) [1] 1 To do essentially the same thing with a vector: myvec <- c(1,10,100,1000,1) myvec[median(rep(1:length(myvec), myvec))] [1] 1 I'm sure I cannot explain levels() and rep() any better than the help pages for those functions. > Chuck Cl

Re: [R] Bootstrap Confidence Intervals

2008-01-01 Thread Chuck Cleland
ot;perc","bca")) >>> But the output shows the next error: >>> >>> Error en if (ncol(boot.out$t) < max(index)) { : >>>argumento tiene longitud cero >>> >>> I don't know what is wrong. >>> >>> I ho

Re: [R] Bootstrap Confidence Intervals

2008-01-02 Thread Chuck Cleland
trap replicate of statistic. So you want something like this: hist(x.boot$t) > _Fede_ > > Chuck Cleland wrote: >> _Fede_ wrote: >>> Hi again. >>> >>> Watching this example that appears in the help page >>> >>> ratio <- function(d

Re: [R] R procedure similar to STATA heckprob?

2008-01-03 Thread Chuck Cleland
e 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, r

Re: [R] recode() function results in logical output, not factor output

2008-01-08 Thread Chuck Cleland
> class(Ethnic_G.Recode)[1] "logical"> print(Ethnic_G.Recode) [1] NA NA NA NA >> NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA> >> ######### > >

Re: [R] choose the intercept from glm and lm

2008-01-08 Thread Chuck Cleland
tinfo/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. 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0

Re: [R] product of vector elements

2008-01-12 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. 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-

[R] Assigning into each of a list of dataframes

2008-01-18 Thread Chuck Cleland
B 1 0.3887178 0.2256608 2 0.2642189 0.2135938 3 0.3881635 0.2328115 4 0.9060760 0.1013091 5 0.4578424 0.8167602 I want the variable Y to be added to each data frame in mylist. thanks, Chuck -- Chuck Cleland, Ph.D. NDRI, Inc. 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 84

Re: [R] subsetting a data frame using string matching

2008-01-21 Thread Chuck Cleland
it > could for instance be the string "eta". I have tried various ways of > using agrep and grep, but so far I have not found anything that > worked. > > Thankyou in advance for your help! a <- c("Alpha", "Beta", "Gamma", "Beeta"

Re: [R] summary of categorical variables

2008-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-contained, reproducible code. -- Chuck Cleland,

Re: [R] predict from a multiple regression model

2008-01-22 Thread Chuck Cleland
[[alternative HTML version deleted]] > > > > > > ______ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do rea

Re: [R] plotting group means

2008-09-09 Thread Chuck Cleland
CH-8008 Zurich > Switzerland > Mail: [EMAIL PROTECTED] > Office: +41 44 384 26 66 > Mobile: +41 76 563 31 54 > > > > > > [[alternative HTML version deleted]] > > _

Re: [R] count value

2008-09-11 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] rowSums()

2008-09-24 Thread Chuck Cleland
er attached packages: > [1] MiscPsycho_1.2 lattice_0.17-13 statmod_1.3.6 > > loaded via a namespace (and not attached): > [1] grid_2.7.2 > > __________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help >

Re: [R] rowSums()

2008-09-24 Thread Chuck Cleland
RUE) > is.na(Res) <- rowSums(is.na(testDat)) == ncol(testDat) > > HTH, > > Marc Schwartz > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://ww

Re: [R] Exclusion of elements in a vector

2008-09-25 Thread Chuck Cleland
; Stefan Fritsch > > __ > 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, rep

Re: [R] how to do a probit?

2008-10-03 Thread Chuck Cleland
t; Viktor > > [[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] R vs SPSS contrasts

2008-10-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 Clel

Re: [R] how to count unique observations by variables

2008-10-16 Thread Chuck Cleland
regards, > Lijiang > > -- > > [[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-proje

Re: [R] calculating mean for samples

2008-10-21 Thread Chuck Cleland
> Sent from the R help mailing list archive at >> Nabble.com. >>>> __ >>>> R-help@r-project.org mailing list >>>> https://stat.ethz.ch/mailman/listinfo/r-help >>>> PLEASE do read the posting guide

Re: [R] Nagelkerke R square for Prediction data

2008-10-22 Thread Chuck Cleland
odel. I > would like to do this as well. > Data: > 1 0.9847 > 1 0,7653 > ... > 0 0,2456 > 0 0,0457 > ... > > THanks a lot RSiteSearch("Nagelkerke", restrict="function") suggests lrm() in the Design package by Frank Harrell. -- Chuck Clelan

Re: [R] pwr.2p2n.test when the ratio of n1/n2 is known

2008-10-24 Thread Chuck Cleland
n2 = 1971 sig.level = 0.05 power = 0.8017491 alternative = two.sided NOTE: different sample sizes > Thanks > > Dan -- 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:

[R] Extract Data from a Webpage

2008-12-16 Thread Chuck Cleland
ight have something useful for this task. I can load the XML package and supply the url as an argument to htmlTreeParse(), but I don't know how to go from there. thanks, Chuck Cleland > sessionInfo() R version 2.8.0 Patched (2008-12-04 r47066) i386-pc-mingw32 locale: LC_COLLATE=English_U

Re: [R] Merging two data frame with different nrows

2008-12-21 Thread Chuck Cleland
r of rows. As the Posting Guide asks, you can use RSiteSearch() or help.search() before posting to search for functionality. For example: RSiteSearch('merge', restrict='function') The third hit points to merge(), which does what you want. -- Chuck Cleland, Ph.D. NDRI, Inc.

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

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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] accessing the indices of outliers in a data frame boxplot

2008-01-25 Thread Chuck Cleland
<- data.frame(GRP = rep(LETTERS[1:4], each=25), Y = rchisq(100, 2)) mybp <- boxplot(Y ~ GRP, data=df) which(df$Y %in% mybp$out) [1] 8 12 47 66 88 93 mybp$out [1] 5.919915 9.135578 5.723714 8.758584 8.502147 4.920513 df$Y[which(df$Y %in% mybp$out)] [1] 5.919915 9.135578 5.723714 8.758584 8.502

Re: [R] plotting gridlines

2008-01-25 Thread Chuck Cleland
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. 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-

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

2008-01-30 Thread Chuck Cleland
at.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. 71 West 23rd Street, 8th floor New York, NY 10010 tel

Re: [R] Effect size of comparison of two levels of a factor in multiple linear regression

2008-02-04 Thread Chuck Cleland
ulations and is therefore arbitrary. If > anyone knew a better way to get at the effect sizes I'm looking for or > how I could also get confidence intervals for them, that would be > greatly appreciated. > > Thanks, > > Christoph > >

Re: [R] Sampling

2008-02-05 Thread Chuck Cleland
quot;B" "B" "B" "B" "A" "B" "A" [12] "A" "B" "A" "A" "A" "B" "B" "B" "A" "A" "B" [23] "A" "B" >

Re: [R] Row percentages for a table object

2008-02-07 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. 71 West 23rd Stre

Re: [R] Help with package reshape, wide to long

2008-02-07 Thread Chuck Cleland
to do this with explicit looping, using > rbind(), but it seems like reshape() is a natural tool. But I'm not > getting it, so I'd appreciate some help. > > (in case anyone is wondering whether it makes sense to do this, > height, weight, and age are just exam

<    1   2   3   >