[R] R Search
I know that two of the search engine for R is available: http://www.rseek.org/ http://www.dangoldstein.com/search_r.html -- Ýbrahim Mutlay [[alternative HTML version deleted]] __ 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] boxplot statistics in ggplot
I need to make weighted boxplots. I found that ggplot makes them. I would however like to label them with the boxplot statistics (the median, q1 and q3). In the boxplot function in r-base, I could output boxplot statistics and then write a text on the plot to place the labels. How would one do it with ggplot? Vikas __ 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.
Re: [R] Histogram of ones.
If I correctly understand, hist(rep(1, 100), col="lightblue", border="black",breaks=0:10*0.1) see: "breaks" arg in ?hist On 2/7/07, Dong H. Oh <[EMAIL PROTECTED]> wrote: > Dear expeRts, > > > I'd like to picture histogram of ones. > > For example, > > > hist(rep(1, 100), col="lightblue", border="black") > > A bin is pictured ranging on [0,1] and range of x axis is also [0,1]. > > How can I adjust the bin range from [0,1] to [0.9, 1] ? > > I am looking forward to hearing from expeRt. > > > Sincerely, > > [[alternative HTML version deleted]] > > __ > 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-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] Histogram of ones.
Dear expeRts, I'd like to picture histogram of ones. For example, > hist(rep(1, 100), col="lightblue", border="black") A bin is pictured ranging on [0,1] and range of x axis is also [0,1]. How can I adjust the bin range from [0,1] to [0.9, 1] ? I am looking forward to hearing from expeRt. Sincerely, [[alternative HTML version deleted]] __ 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] hi
Hi, Viragra 1,80 Ciralis 3,00 Lervitra 3,35 http://officecop.printeryml-com Replace "-" with "." in the above link -- would bring him here, beyond the reach of Dumbledores help and protection, and into my waiting arms. And here he is ...the boy you all believed had been my downfall... __ 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.
Re: [R] multinomial logistic regression with equality constraints?
Roger, > Error in if (logliklambda < loglik) bvec <- blambda : > missing value where TRUE/FALSE needed > In addition: Warning message: > NaNs produced in: sqrt(sigma2GN) That message comes from the Newton algorithm (defined in source file multinomMLE.R). It would be better if we bullet-proofed it a bit more. The first thing is to check the data. I don't have the multinomLogis() function, so I can't run your code. But do you really mean > for(i in 1:length(choice)) { and > dim(counts) <- c(length(choice),length(choice)) Should that be for(i in 1:n) { and dim(counts) <- c(n, length(choice)) or instead of n, some number m > length(choice). As it is it seems to me you have three observations for three categories, which isn't going to work (there are five coefficient parameters, plus sigma for the dispersion). Otherwise, you can get more diagnostic messages by setting a print.level greater than 32. To have a bad value of sigma2GN is unusual. I should mention that supplying starting values won't help you, because for multinomRob's primary purpose the ML estimates are themselves no more than starting values. So if you supply starting values it will skip the ML step. Walter Roger Levy writes: > Hi again Jasjeet, Walter, > > I have a further question about an error message I get when running > multinomRob. I am simulating a dataset where I look at the effect of > making a previous categorical choice on the probability of making the > same choice later on. Given the following code: > > > n <- 20 > choice <- c("A","B","C") > intercepts <- c(0.5,0.3,0.2) > prime.strength <- rep(0.4,length(intercepts)) > counts <- c() > for(i in 1:length(choice)) { >u <- intercepts[1:length(choice)] >u[i] <- u[i] + prime.strength[i] >counts <- c(counts,rmultinomial(n = n, pr = multinomLogis(u))) > } > dim(counts) <- c(length(choice),length(choice)) > counts <- t(counts) > row.names(counts) <- choice > colnames(counts) <- choice > data <- data.frame(Prev.Choice=choice,counts) > > for(i in 1:length(choice)) { >data[[paste("last",choice[i],sep=".")]] <- > ifelse(data$Prev.Choice==choice[i],1,0) > } > > multinomRob(list(A ~ last.A , > B ~ last.B , > C ~ last.C - 1 , > ), > data=data, > print.level=1) > > > I get the following error: > > > multinomRob(): Grouped MNL Estimation > Error in if (logliklambda < loglik) bvec <- blambda : > missing value where TRUE/FALSE needed > In addition: Warning message: > NaNs produced in: sqrt(sigma2GN) > > > It's not clear to me what this error means, or why the resulting dataset > would be problematic for MLE estimation. > > Many thanks once again! > > Roger __ 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.
Re: [R] R in Industry
Bob, Far from flaming you, I think you made a good point - one that I imagine most people who use R have come across. The name "R" is a big impediment to effective online searches. As a check, I entered "R software", "SAS software", SPSS software", and "S+ software" into google. The R 'hit rate' was only ten out of the first 20 results (I didn't look any further). For the other three software packages, the hit rates were all 100% (20/20). I do wonder if anything can/should be done about this. I generally search using the term "CRAN" but of course, that omits lots of stuff relevant to R. Any ideas about how to do effective online searches for "R" related materials? Matt On 2/6/07, Wensui Liu <[EMAIL PROTECTED]> wrote: > I've been looking for job that allows me to use R/S+ since I got out > of graduate school 2 years ago but with no success. I am wondering if > there is something that can be done to promote the use of R in > industry. > > It's been very frustrating to see people doing statistics using > excel/spss and even more frustrating to see people paying $$$ for > something much inferior to R. > > > On 2/6/07, Doran, Harold <[EMAIL PROTECTED]> wrote: > > The other day, CNN had a story on working at Google. Out of curiosity, I > > went to the Google employment web site (I'm not looking, but just > > curious). In perusing their job posts for statisticians, preference is > > given to those who use R and python. Other languages, S-Plus and > > something called SAS were listed as lower priorities. > > > > When I started using Python, I noted they have a portion of the web site > > with job postings. CRAN does not have something similar, but think it > > might be useful. I think R is becoming more widely used in industry and > > I wonder if helping it move along a bit, the maintainer of CRAN could > > create a section of the web site devoted to jobs where R is a > > requirement. > > > > Hence, we could have our own little "monster.com" kind of thing going > > on. Of the multitude of ways the gospel can be spread, this is small. > > But, I think every small step forward is good. > > > > Anyone think this is useful? > > > > Harold > > > > > > [[alternative HTML version deleted]] > > > > __ > > 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. > > > > > -- > WenSui Liu > A lousy statistician who happens to know a little programming > (http://spaces.msn.com/statcompute/blog) > > __ > 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. > -- Matthew C Keller Postdoctoral Fellow Virginia Institute for Psychiatric and Behavioral Genetics __ 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.
Re: [R] How to reorder rows in dataframe by text flag
Try this: DF <- data.frame( col1 = factor(c("31*", "0", "102*", "71*", "31", "66", "47")), col2 = factor(c("66", "0*", "66", "80", "2*", "31*", "38")) ) replace(DF, TRUE, as.numeric(sub("*", "", as.matrix(DF), fixed = TRUE))) On 2/6/07, Dale Steele <[EMAIL PROTECTED]> wrote: > Given two columns of type character in a dataframe of the form: > > col1col2 > 31* 66 > 0 0* > 102*66 > 71* 80 > 31 2* > 66 31* > 47 38* > > How do I generate the following dataframe? Ie. col1 contains row item > with "*" and col2 contains row member without "*" > > col1col2 > 31 66 > 0 0 > 102 66 > 71 80 > 231 > 31 66 > 38 47 > > Partial ideas thus far > grep("*",col1,fixed=T) > as.numeric(gsub("*","",col1)) > > Thanks. --Dale > > __ > 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-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.
Re: [R] multinomial logistic regression with equality constraints?
Hi again Jasjeet, Walter, I have a further question about an error message I get when running multinomRob. I am simulating a dataset where I look at the effect of making a previous categorical choice on the probability of making the same choice later on. Given the following code: n <- 20 choice <- c("A","B","C") intercepts <- c(0.5,0.3,0.2) prime.strength <- rep(0.4,length(intercepts)) counts <- c() for(i in 1:length(choice)) { u <- intercepts[1:length(choice)] u[i] <- u[i] + prime.strength[i] counts <- c(counts,rmultinomial(n = n, pr = multinomLogis(u))) } dim(counts) <- c(length(choice),length(choice)) counts <- t(counts) row.names(counts) <- choice colnames(counts) <- choice data <- data.frame(Prev.Choice=choice,counts) for(i in 1:length(choice)) { data[[paste("last",choice[i],sep=".")]] <- ifelse(data$Prev.Choice==choice[i],1,0) } multinomRob(list(A ~ last.A , B ~ last.B , C ~ last.C - 1 , ), data=data, print.level=1) I get the following error: multinomRob(): Grouped MNL Estimation Error in if (logliklambda < loglik) bvec <- blambda : missing value where TRUE/FALSE needed In addition: Warning message: NaNs produced in: sqrt(sigma2GN) It's not clear to me what this error means, or why the resulting dataset would be problematic for MLE estimation. Many thanks once again! Roger __ 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.
Re: [R] How to reorder rows in dataframe by text flag
I'm sorry, I forgot my definition of dat. dat in code of previous post is: > dat<-data.frame(col1=c("31*","0","102*","71*","31","66","47"),col2=c("66","0*","66","80","2*","31*","38*")) > dat col1 col2 1 31* 66 20 0* 3 102* 66 4 71* 80 5 31 2* 6 66 31* 7 47 38* On 2/7/07, talepanda <[EMAIL PROTECTED]> wrote: > I think several ways can do that. > my code is: > > data.frame(t(apply(dat,1,function(x)as.numeric(sub("\\*","",x[sort(1:2,grep("\\*",x)==2)]) > > HTH > > On 2/7/07, Dale Steele <[EMAIL PROTECTED]> wrote: > > Given two columns of type character in a dataframe of the form: > > > > col1col2 > > 31* 66 > > 0 0* > > 102*66 > > 71* 80 > > 31 2* > > 66 31* > > 47 38* > > > > How do I generate the following dataframe? Ie. col1 contains row item > > with "*" and col2 contains row member without "*" > > > > col1col2 > > 31 66 > > 0 0 > > 102 66 > > 71 80 > > 231 > > 31 66 > > 38 47 > > > > Partial ideas thus far > > grep("*",col1,fixed=T) > > as.numeric(gsub("*","",col1)) > > > > Thanks. --Dale > > > > __ > > 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-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.
Re: [R] How to reorder rows in dataframe by text flag
I think several ways can do that. my code is: data.frame(t(apply(dat,1,function(x)as.numeric(sub("\\*","",x[sort(1:2,grep("\\*",x)==2)]) HTH On 2/7/07, Dale Steele <[EMAIL PROTECTED]> wrote: > Given two columns of type character in a dataframe of the form: > > col1col2 > 31* 66 > 0 0* > 102*66 > 71* 80 > 31 2* > 66 31* > 47 38* > > How do I generate the following dataframe? Ie. col1 contains row item > with "*" and col2 contains row member without "*" > > col1col2 > 31 66 > 0 0 > 102 66 > 71 80 > 231 > 31 66 > 38 47 > > Partial ideas thus far > grep("*",col1,fixed=T) > as.numeric(gsub("*","",col1)) > > Thanks. --Dale > > __ > 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-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.
Re: [R] How-To construct a cov list to use a covariance matrix in factanal?
Alistair, > >I have worked through the examples. They work because the covmat >were produced by the cov.wt which provides output as a list object. >I am trying to construct my own list object to use as the covmat. >There are no obvious instructions on how to do this. > >So, here is what I have done so far. > >I reconstructed the covariance matrix in the example and created a dataframe: > > > testmatrix > general picture blocks maze reading vocab >1 24.641 5.991 33.520 6.023 20.755 29.701 >2 5.991 6.700 18.137 1.782 4.936 7.204 >3 33.520 18.137 149.831 19.424 31.430 50.753 >4 6.023 1.782 19.424 12.711 4.757 9.075 >5 20.755 4.936 31.430 4.757 52.604 66.762 >6 29.701 7.204 50.753 9.075 66.762 135.292 > >and then used this to construct a list object like the output from >the example; > >> tstcov<- list(cov=testmatrix, center=c(0,0,0,0,0), n.obs=112) > >I tested to see whether my list object looked like the examples > >> tstcov >$cov > general picture blocks maze reading vocab >1 24.641 5.991 33.520 6.023 20.755 29.701 >2 5.991 6.700 18.137 1.782 4.936 7.204 >3 33.520 18.137 149.831 19.424 31.430 50.753 >4 6.023 1.782 19.424 12.711 4.757 9.075 >5 20.755 4.936 31.430 4.757 52.604 66.762 >6 29.701 7.204 50.753 9.075 66.762 135.292 > >$centers >[1] 0 0 0 0 0 > >$n.obs >[1] 112 > >It looks the same. So I then used this list as the argument in >factanal and get the error message. > >> factanal(factors=2, covmat=tstcov, rotation="varimax") >Error in sqrt(diag(cv)) : Non-numeric argument to mathematical function > >I know that what you see of a list is not necessarily all that is >there. So, I figure I am missing some part of the object that makes >this list suitable for use by factanal. > So, I hope this is enough detail. Any thoughts would be appreciated. >-- >Dr Alistair Campbell, PhD >Senior Lecturer in Clinical Psychology >School of Psychology >James Cook University Townsville Queensland Australia The call to factanal requires you to specify that you have a covariance matrix (covmat). Using your matrix and specifying two factors: test.df general picture blocks maze reading vocab 1 24.641 5.991 33.520 6.023 20.755 29.701 2 5.991 6.700 18.137 1.782 4.936 7.204 3 33.520 18.137 149.831 19.424 31.430 50.753 4 6.023 1.782 19.424 12.711 4.757 9.075 5 20.755 4.936 31.430 4.757 52.604 66.762 6 29.701 7.204 50.753 9.075 66.762 135.292 > test.mat <- as.matrix(test.df) > tf <- factanal(factors=2,covmat=test.mat) > tf Call: factanal(factors = 2, covmat = test.mat) Uniquenesses: general picture blocksmaze reading vocab 0.455 0.589 0.218 0.769 0.052 0.334 Loadings: Factor1 Factor2 1 0.499 0.543 2 0.156 0.622 3 0.206 0.860 4 0.109 0.468 5 0.956 0.182 6 0.785 0.225 Factor1 Factor2 SS loadings 1.858 1.724 Proportion Var 0.310 0.287 Cumulative Var 0.310 0.597 The degrees of freedom for the model is 4 and the fit was 0.0572 Bill > -- William Revelle http://pmc.psych.northwestern.edu/revelle.html Professor http://personality-project.org/personality.html Department of Psychology http://www.wcas.northwestern.edu/psych/ Northwestern University http://www.northwestern.edu/ __ 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.
Re: [R] R in Industry
I've been looking for job that allows me to use R/S+ since I got out of graduate school 2 years ago but with no success. I am wondering if there is something that can be done to promote the use of R in industry. It's been very frustrating to see people doing statistics using excel/spss and even more frustrating to see people paying $$$ for something much inferior to R. On 2/6/07, Doran, Harold <[EMAIL PROTECTED]> wrote: > The other day, CNN had a story on working at Google. Out of curiosity, I > went to the Google employment web site (I'm not looking, but just > curious). In perusing their job posts for statisticians, preference is > given to those who use R and python. Other languages, S-Plus and > something called SAS were listed as lower priorities. > > When I started using Python, I noted they have a portion of the web site > with job postings. CRAN does not have something similar, but think it > might be useful. I think R is becoming more widely used in industry and > I wonder if helping it move along a bit, the maintainer of CRAN could > create a section of the web site devoted to jobs where R is a > requirement. > > Hence, we could have our own little "monster.com" kind of thing going > on. Of the multitude of ways the gospel can be spread, this is small. > But, I think every small step forward is good. > > Anyone think this is useful? > > Harold > > > [[alternative HTML version deleted]] > > __ > 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. > -- WenSui Liu A lousy statistician who happens to know a little programming (http://spaces.msn.com/statcompute/blog) __ 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] How to reorder rows in dataframe by text flag
Given two columns of type character in a dataframe of the form: col1col2 31* 66 0 0* 102*66 71* 80 31 2* 66 31* 47 38* How do I generate the following dataframe? Ie. col1 contains row item with "*" and col2 contains row member without "*" col1col2 31 66 0 0 102 66 71 80 231 31 66 38 47 Partial ideas thus far grep("*",col1,fixed=T) as.numeric(gsub("*","",col1)) Thanks. --Dale __ 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.
Re: [R] abbreviate dataframe for Sweave output
Chris, Not precisely what you want (does both rows and columns), but can be specialized to your case easily. Use with xtable in a chunk with 'results=tex' as in xtable( dot.matrix( diag(10) ) ) Chuck dot.matrix <- function(x , rws=NULL, cls=NULL, in.math=FALSE ) { ## Purpose: prepare a matrix like object for xtable printing with ## embedded cdots and vdots to stand in for omitted rows and columns ## -- ## Arguments: x - a data.frame or matrix, ##rws - rows to include , cls - cols to include , ##in.math - in math mode? dont use $ ## -- ## Author: CCB, Date: 13 Jan 2007, 12:54 if (length(rws)==1) {def.rows <- rws;rws <- NULL} else def.rows <- 2 if (length(cls)==1) {def.cols <- cls;cls <- NULL} else def.cols <- 2 if (in.math) { cdot <- "\\cdots" vdot <- "\\vdots" ddot <- "\\ddots" } else { cdot <- "$\\cdots$" vdot <- "$\\vdots$" ddot <- "$\\ddots$" } x <- as.data.frame(x) if (is.null(rws)) { rws <- rownames(x) if (is.null(rws)) rws <- seq(nrow(x)) rws <- list(head=head(rws,def.rows),tail=tail(rws,def.rows)) } if (is.null(cls)) { cls <- colnames(x) if (is.null(cls)) cls <- seq(ncol(x)) cls <- list(head=head(cls,def.cols),tail=tail(cls,def.cols)) } safe.dots <- structure(list(factor(cdot,c(cdot,ddot))),names=cdot,row.names=as.integer(1),class="data.frame") head.rows <- cbind( x[ rws$head, cls$head ,drop=FALSE ], safe.dots, x[ rws$head, cls$tail ,drop=FALSE ]) mid.row <- structure(matrix(rep(c(vdot,ddot,vdot),c(length(cls$head),1,length(cls$tail))),nr=1), dimnames=list(vdot,colnames(head.rows))) tail.rows <- cbind( x[ rws$tail, cls$head ,drop=FALSE ], safe.dots, x[ rws$tail, cls$tail ,drop=FALSE ] ) tab <- rbind(head.rows,mid.row,tail.rows) tab } On Tue, 6 Feb 2007, stubben wrote: > I wanted to print the first and last rows of some dataframes in Sweave > using dots in columns to separate the two parts. Head and tail almost > work, but I have problems with factors and row names. > > z<-data.frame(id=letters[1:26], x=sample(1:26,26)) > > rbind(head(z,3), ".", tail(z,1)) > > id x > 1 a 18 > 2 b 8 > 3 c 14 > 4. > 26z 10 > Warning message: > invalid factor level, NAs generated in... > > > I would like something like this if possible. Any ideas? > > id x > 1 a 18 > 2 b 8 > 3 c 14 > . . . > . . . > 26z 10 > > > Thanks, > > Chris Stubben > > > > -- > - > > Los Alamos National Lab > BioScience Division > MS M888 > Los Alamos, NM 87545 > > __ > 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. > Charles C. Berry(858) 534-2098 Dept of Family/Preventive Medicine E mailto:[EMAIL PROTECTED] UC San Diego http://biostat.ucsd.edu/~cberry/ La Jolla, San Diego 92093-0901 __ 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.
Re: [R] How-To construct a cov list to use a covariance matrix in factanal?
Thanks for that Brian, I have worked through the examples. They work because the covmat were produced by the cov.wt which provides output as a list object. I am trying to construct my own list object to use as the covmat. There are no obvious instructions on how to do this. So, here is what I have done so far. I reconstructed the covariance matrix in the example and created a dataframe: > testmatrix general picture blocks maze reading vocab 1 24.641 5.991 33.520 6.023 20.755 29.701 2 5.991 6.700 18.137 1.782 4.936 7.204 3 33.520 18.137 149.831 19.424 31.430 50.753 4 6.023 1.782 19.424 12.711 4.757 9.075 5 20.755 4.936 31.430 4.757 52.604 66.762 6 29.701 7.204 50.753 9.075 66.762 135.292 and then used this to construct a list object like the output from the example; > tstcov<- list(cov=testmatrix, center=c(0,0,0,0,0), n.obs=112) I tested to see whether my list object looked like the examples > tstcov $cov general picture blocks maze reading vocab 1 24.641 5.991 33.520 6.023 20.755 29.701 2 5.991 6.700 18.137 1.782 4.936 7.204 3 33.520 18.137 149.831 19.424 31.430 50.753 4 6.023 1.782 19.424 12.711 4.757 9.075 5 20.755 4.936 31.430 4.757 52.604 66.762 6 29.701 7.204 50.753 9.075 66.762 135.292 $centers [1] 0 0 0 0 0 $n.obs [1] 112 It looks the same. So I then used this list as the argument in factanal and get the error message. > factanal(factors=2, covmat=tstcov, rotation="varimax") Error in sqrt(diag(cv)) : Non-numeric argument to mathematical function I know that what you see of a list is not necessarily all that is there. So, I figure I am missing some part of the object that makes this list suitable for use by factanal. So, I hope this is enough detail. Any thoughts would be appreciated. -- Dr Alistair Campbell, PhD Senior Lecturer in Clinical Psychology School of Psychology James Cook University Townsville Queensland Australia Ph: +61 7 47816879 __ 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] 2 Courses: (1) R/Splus Advanced Programming - San Francisco - (2) Data Mining: Practical Tools and Techniques in R/Splus - Salt Lake City
XLSolutions Corporation (www.xlsolutions-corp.com) is proud to announce our*** R/S Advanced Programming ***course in San Francisco on March 15-16 and *** Data Mining: Practical Tools and Techniques in R/Splus *** course in Salt Lake City on March 26-27 Ask for group discount and reserve your seat Now - Earlybird Rates. Payment due after the class! Email Sue Turner: [EMAIL PROTECTED] (1) R/Splus Advanced Programming - San Francisco, March 15-16 http://www.xlsolutions-corp.com/Radv.htm Course Outline: - Overview of R/S fundamentals: Syntax and Semantics - Class and Inheritance in R/S-Plus - Concepts, Construction and good use of language objects - Coercion and efficiency - Object-oriented programming in R and S-Plus - Advanced manipulation tools: Parse, Deparse, Substitute, etc. - How to fully take advantage of Vectorization - Generic and Method Functions - Search path, databases and frames Visibility - Working with large objects - Handling Properly Recursion and iterative calculations - Managing loops; For (S-Plus) and for() loops - Consequences of Lazy Evaluation - Efficient Code practices for large computations - Memory management and Resource monitoring - Writing R/S-Plus functions to call compiled code - Writing and debugging compiled code for R/S-Plus system - Connecting R/S-Plus to External Data Sources - Understanding the structure of model fitting functions in R/S-Plus - Designing and Packaging efficiently a new model function Email us for group discounts. Email Sue Turner: [EMAIL PROTECTED] Phone: 206-686-1578 (2) Data Mining: Practical Tools and Techniques in R/Splus - Salt Lake City, March 26-27 http://www.xlsolutions-corp.com/RSMining.htm Please let us know if you and your colleagues are interested in this class to take advantage of group discount. Register now to secure your seat! Cheers, Elvis Miller, PhD Manager Training. XLSolutions Corporation 206 686 1578 www.xlsolutions-corp.com [EMAIL PROTECTED] __ 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.
Re: [R] R in Industry
That sounds like a good idea. The name R makes it especially hard to find job postings, resumes or do any other type of search. Googling resume+sas or "job opening"+sas is quick and fairly effective (less a few airline jobs). Doing that with R is of course futile. At the risk of getting flamed, it's too bad it's not called something more unique such as Rpackage, Rlanguage, etc. Cheers, Bob = Bob Muenchen (pronounced Min'-chen), Manager Statistical Consulting Center U of TN Office of Information Technology 200 Stokely Management Center, Knoxville, TN 37996-0520 Voice: (865) 974-5230 FAX: (865) 974-4810 Email: [EMAIL PROTECTED] Web: http://oit.utk.edu/scc, News: http://listserv.utk.edu/archives/statnews.html = -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Doran, Harold Sent: Tuesday, February 06, 2007 2:08 PM To: R-help@stat.math.ethz.ch Subject: [R] R in Industry The other day, CNN had a story on working at Google. Out of curiosity, I went to the Google employment web site (I'm not looking, but just curious). In perusing their job posts for statisticians, preference is given to those who use R and python. Other languages, S-Plus and something called SAS were listed as lower priorities. When I started using Python, I noted they have a portion of the web site with job postings. CRAN does not have something similar, but think it might be useful. I think R is becoming more widely used in industry and I wonder if helping it move along a bit, the maintainer of CRAN could create a section of the web site devoted to jobs where R is a requirement. Hence, we could have our own little "monster.com" kind of thing going on. Of the multitude of ways the gospel can be spread, this is small. But, I think every small step forward is good. Anyone think this is useful? Harold [[alternative HTML version deleted]] __ 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-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] abbreviate dataframe for Sweave output
I wanted to print the first and last rows of some dataframes in Sweave using dots in columns to separate the two parts. Head and tail almost work, but I have problems with factors and row names. z<-data.frame(id=letters[1:26], x=sample(1:26,26)) rbind(head(z,3), ".", tail(z,1)) id x 1 a 18 2 b 8 3 c 14 4. 26z 10 Warning message: invalid factor level, NAs generated in... I would like something like this if possible. Any ideas? id x 1 a 18 2 b 8 3 c 14 . . . . . . 26z 10 Thanks, Chris Stubben -- - Los Alamos National Lab BioScience Division MS M888 Los Alamos, NM 87545 __ 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.
Re: [R] Questions on counts by case
On 2/6/07, Serguei Kaniovski <[EMAIL PROTECTED]> wrote: > > > Hi all, > > > for the data below I would like to > > 1. generate a dummy variable for each group "gr" of the same composition by > people, then save each portion in a separate file, This gives back a list that you can go through and write out each element to a different file: > split(x, x$gr) $gr1 person gr x 1 mike gr1 1 2 jane gr1 0 3 bill gr1 0 $gr2 person gr x 4 jack gr2 1 5 mike gr2 1 6 jane gr2 0 7 bill gr2 0 8 alex gr2 1 9 james gr2 1 $gr3 person gr x 10 mike gr3 0 11 bill gr3 1 12 jane gr3 1 > > 2. compute the frequency of "1"'s in "x" for each person by group > "gr". So, "mike" will have freq=2/3, as he has two "1" and one "0" in 3 > groups. Is this what you want? > x person gr x 1mike gr1 1 2jane gr1 0 3bill gr1 0 4jack gr2 1 5mike gr2 1 6jane gr2 0 7bill gr2 0 8alex gr2 1 9 james gr2 1 10 mike gr3 0 11 bill gr3 1 12 jane gr3 1 > do.call(rbind, by(x, list(x$person), function(z)c("0"=sum(z$x == 0), > "1"=sum(z$x == 1 0 1 alex 0 1 bill 2 1 jack 0 1 james 0 1 jane 2 1 mike 1 2 > > > Thanks a lot, > > Serguei Kaniovski > > > The data looks like: > > person;gr;x > > mike;gr1;1 > > jane;gr1;0 > > bill;gr1;0 > > jack;gr2;1 > > mike;gr2;1 > > jane;gr2;0 > > bill;gr2;0 > > alex;gr2;1 > > james;gr2;1 > > mike;gr3;0 > > bill;gr3;1 > > jane;gr3;1 > ___ > > AustrianInstituteofEconomicResearch(WIFO) > > Name:SergueiKaniovski P.O.Box91 > Tel.:+43-1-7982601-231 ArsenalObjekt20 > Fax:+43-1-7989386 1103Vienna,Austria > Mail:[EMAIL PROTECTED] A-1030Wien > > http://www.wifo.ac.at/Serguei.Kaniovski >[[alternative HTML version deleted]] > > > __ > 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. > > -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem you are trying to solve? __ 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] formula for test statistics of arima coefficients
I have an object, ARestopt, that is the result of a call to the arima function. I want to calculate test statistics ( null is coeffs are zero ) for each of the estimated coefficients. My coefficents are in a vector called ARestopt$coef and my covariance matrix is ARestopt$var.coef. I thought my formula for calculating them should be ARestopt$coef/(sqrt(diag(ARestopt$var.coef) but then I started thinking about the square root of n in the variance for estimates. do the variances in the covariance matrix already incorporate square root of n or should i be putting a sqrt(n) in also ? I've seen a similar formula in an R book somewhere but I can't recall where. If someone could tell me if above is correct ( disregard the issue of the covariance matrix maybe not being a consistent estimate of the covariance ) or the book or doc where I have seen the formula , I would really appreciate it. This is not an offer (or solicitation of an offer) to buy/se...{{dropped}} __ 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.
Re: [R] R in Industry
"... two main drawbacks of R at our firm (as viewed by our IT dept) are lack of guaranteed support as well as the difficulty in finding candidates. -- Just an aside: "lack of guaranteed support" -- absolutely true in theory, absolutely false in practice. I doubt that the voluntary support found on r-help and other R lists can be matched by the "guaranteed" support of any commercial software product. Not that this makes a difference to the IT group's requirements, of course... Cheers, Bert __ 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.
Re: [R] R in Industry
Our (financial) firm has struggled immensely with finding appropriate candidates and I believe this would be *tremendously* useful. I really hope that your suggestion is implemented. Importantly, I believe it would help create a commercial presence for R, and secondly reduce use of products like S-Plus and SAS if the commercial appeal of the software would increase. The two main drawbacks of R at our firm (as viewed by our IT dept) are lack of guaranteed support as well as the difficulty in finding candidates. R is a great solution and I hope to see it prosper. -Tariq On 2/6/07, Kuhn, Max <[EMAIL PROTECTED]> wrote: > > As someone who has (reluctantly) sent job postings to R Help, I think > that a SIG would be a good idea. > > Max > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Doran, Harold > Sent: Tuesday, February 06, 2007 2:08 PM > To: R-help@stat.math.ethz.ch > Subject: [R] R in Industry > > The other day, CNN had a story on working at Google. Out of curiosity, I > went to the Google employment web site (I'm not looking, but just > curious). In perusing their job posts for statisticians, preference is > given to those who use R and python. Other languages, S-Plus and > something called SAS were listed as lower priorities. > > When I started using Python, I noted they have a portion of the web site > with job postings. CRAN does not have something similar, but think it > might be useful. I think R is becoming more widely used in industry and > I wonder if helping it move along a bit, the maintainer of CRAN could > create a section of the web site devoted to jobs where R is a > requirement. > > Hence, we could have our own little "monster.com" kind of thing going > on. Of the multitude of ways the gospel can be spread, this is small. > But, I think every small step forward is good. > > Anyone think this is useful? > > Harold > > > [[alternative HTML version deleted]] > > __ > 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. > > -- > LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}} > > __ > 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. > [[alternative HTML version deleted]] __ 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.
Re: [R] R in Industry
As someone who has (reluctantly) sent job postings to R Help, I think that a SIG would be a good idea. Max -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Doran, Harold Sent: Tuesday, February 06, 2007 2:08 PM To: R-help@stat.math.ethz.ch Subject: [R] R in Industry The other day, CNN had a story on working at Google. Out of curiosity, I went to the Google employment web site (I'm not looking, but just curious). In perusing their job posts for statisticians, preference is given to those who use R and python. Other languages, S-Plus and something called SAS were listed as lower priorities. When I started using Python, I noted they have a portion of the web site with job postings. CRAN does not have something similar, but think it might be useful. I think R is becoming more widely used in industry and I wonder if helping it move along a bit, the maintainer of CRAN could create a section of the web site devoted to jobs where R is a requirement. Hence, we could have our own little "monster.com" kind of thing going on. Of the multitude of ways the gospel can be spread, this is small. But, I think every small step forward is good. Anyone think this is useful? Harold [[alternative HTML version deleted]] __ 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. -- LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}} __ 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.
Re: [R] glm gamma scale parameter
On Tue, 6 Feb 2007, WILLIE, JILL wrote: > Thank you. You are correct, the shape parameter is what I need to > change & I think I see how to use the MASS package to do it...or if not, > at least I have enough now to figure it out. > > A question to reconcile terminology which will speed me up, if you have > time to help me a bit more: phi = 'scale parameter' vs. 'dispersion > parameter' vs. 'shape parameter'? Excerpt below from the R intro. > manual defining phi & the stats compliment discussion. You need to compare the complement with MASS the book. The dispersion is 1/shape in the conventional parametrization of the gamma. See ?gamma.dispersion. > > R intro: > > distribution of y is of the form > f_Y(y; mu, phi) = > exp((A/phi) * (y lambda(mu) - gamma(lambda(mu))) + tau(y, phi)) > > where phi is a scale parameter (possibly known), and is constant for all > observations, A represents a prior weight, assumed known but possibly > varying with the observations, and $\mu$ is the mean of y. So it is > assumed that the distribution of y is determined by its mean and > possibly a scale parameter as well. Bill Venables wrote that and the equivalent part of MASS. 'dispersion' is a more common name for phi. > > Statistics Complements to Modern Applied Statistics with S, Fourth > edition By W. N. Venables and B. D. Ripley Springer: > > 7.6 Gamma models > The role of dispersion parameter for the Gamma family is rather > different. This is a parametric family which can be fitted by maximum > likelihood, including its shape parameter > > > Jill Willie > Open Seas > Safeco Insurance > [EMAIL PROTECTED] > > > -Original Message- > From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 06, 2007 12:25 PM > To: WILLIE, JILL > Cc: r-help@stat.math.ethz.ch > Subject: Re: [R] glm gamma scale parameter > > On Tue, 6 Feb 2007, Prof Brian Ripley wrote: > >> I think you mean 'shape parameter'. If so, see the MASS package and >> ?gamma.shape. > > Also http://www.stats.ox.ac.uk/pub/MASS4/#Complements > leads to several pages of discussion. > >> >> glm() _is_ providing you with the MLE of the scale parameter, but > really no >> estimate of the shape (although summary.glm makes use of one). >> >> >> On Tue, 6 Feb 2007, WILLIE, JILL wrote: >> >>> I would like the option to specify alternative scale parameters when >>> using the gamma family, log link glm. In particular I would like the >>> option to specify any of the following: >>> >>> 1. maximum likelihood estimate >>> 2. moment estimator/Pearson's >>> 3. total deviance estimator >>> >>> Is this easy? Possible? >>> >>> In addition, I would like to know what estimation process (maximum >>> likelihood?) R is using to estimate the parameter if somebody knows > that >>> off the top of their head or can point me to something to read? >>> >>> I did read the help & search the archives but I'm a bit confused > trying >>> to reconcile the terminology I'm used to w/R terminology as we're >>> transitioning to R, so if I missed an obvious way to do this, or > stated >>> this question in a way that's incomprehensible, my apologies. >>> >>> Jill Willie >>> Open Seas >>> Safeco Insurance >>> [EMAIL PROTECTED] >>> >>> __ >>> 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. >>> >> >> > > -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ 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.
Re: [R] A question regarding cex and pch="." in lattice
On Feb 6, 2007, at 4:05 PM, Prof Brian Ripley wrote: > How do you know the points are not being plotted? > > All you can tell is that your graphics card / monitor / X11 driver > is not > displaying them, not at all the same thing. > Yes, that is what I meant but I suppose I conveyed it wrongly. > My guess is that the rectangle is being displayed only if the > differences in its discretized x and y coordinates are both > positive. R tries hard to ensure that pch='.', cex=1 does always > display a point, but not for smaller cex. This could be the case. Thanks Saptarshi > > On Tue, 6 Feb 2007, Saptarshi Guha wrote: > >> Hello, >> I'm using lattice and opened an X11 device with the following call >> X11(width=5,height=5,pointsize=1) >> I then ran the following code >> >> library(lattice) >> x<-rnorm(30,sd=2) >> y<-runif(30) >> xyplot(y~x,pch=".",col="black",cex=1) >> >> If i remove "cex=1", not all the points are plotted. From ?X11, i >> read,"pch='.' with cex=1 corresponds to a rectangle of sides the >> larger of one pixel and 0.01 inch" >> >> By way of information, i'm using a Dell 30", where the the pixel >> pitch is 0.250mm(0.0098 inch). >> >> My question, why is that some of the points are not being plotted >> when remove cex=1 ? > > The default cex for this plot is 0.8. See trellis.par.get > ("plot.symbol"). > >> Regards >> Saptarshi >> >> Saptarshi Guha | [EMAIL PROTECTED] | http://www.stat.purdue.edu/~sguha >> >> >> [[alternative HTML version deleted]] >> >> __ >> 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. >> > > -- > Brian D. Ripley, [EMAIL PROTECTED] > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UKFax: +44 1865 272595 __ 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.
Re: [R] glm gamma scale parameter
Thank you. You are correct, the shape parameter is what I need to change & I think I see how to use the MASS package to do it...or if not, at least I have enough now to figure it out. A question to reconcile terminology which will speed me up, if you have time to help me a bit more: phi = 'scale parameter' vs. 'dispersion parameter' vs. 'shape parameter'? Excerpt below from the R intro. manual defining phi & the stats compliment discussion. R intro: distribution of y is of the form f_Y(y; mu, phi) = exp((A/phi) * (y lambda(mu) - gamma(lambda(mu))) + tau(y, phi)) where phi is a scale parameter (possibly known), and is constant for all observations, A represents a prior weight, assumed known but possibly varying with the observations, and $\mu$ is the mean of y. So it is assumed that the distribution of y is determined by its mean and possibly a scale parameter as well. Statistics Complements to Modern Applied Statistics with S, Fourth edition By W. N. Venables and B. D. Ripley Springer: 7.6 Gamma models The role of dispersion parameter for the Gamma family is rather different. This is a parametric family which can be fitted by maximum likelihood, including its shape parameter Jill Willie Open Seas Safeco Insurance [EMAIL PROTECTED] -Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 12:25 PM To: WILLIE, JILL Cc: r-help@stat.math.ethz.ch Subject: Re: [R] glm gamma scale parameter On Tue, 6 Feb 2007, Prof Brian Ripley wrote: > I think you mean 'shape parameter'. If so, see the MASS package and > ?gamma.shape. Also http://www.stats.ox.ac.uk/pub/MASS4/#Complements leads to several pages of discussion. > > glm() _is_ providing you with the MLE of the scale parameter, but really no > estimate of the shape (although summary.glm makes use of one). > > > On Tue, 6 Feb 2007, WILLIE, JILL wrote: > >> I would like the option to specify alternative scale parameters when >> using the gamma family, log link glm. In particular I would like the >> option to specify any of the following: >> >> 1. maximum likelihood estimate >> 2. moment estimator/Pearson's >> 3. total deviance estimator >> >> Is this easy? Possible? >> >> In addition, I would like to know what estimation process (maximum >> likelihood?) R is using to estimate the parameter if somebody knows that >> off the top of their head or can point me to something to read? >> >> I did read the help & search the archives but I'm a bit confused trying >> to reconcile the terminology I'm used to w/R terminology as we're >> transitioning to R, so if I missed an obvious way to do this, or stated >> this question in a way that's incomprehensible, my apologies. >> >> Jill Willie >> Open Seas >> Safeco Insurance >> [EMAIL PROTECTED] >> >> __ >> 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. >> > > -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ 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.
Re: [R] A question regarding cex and pch="." in lattice
How do you know the points are not being plotted? All you can tell is that your graphics card / monitor / X11 driver is not displaying them, not at all the same thing. My guess is that the rectangle is being displayed only if the differences in its discretized x and y coordinates are both positive. R tries hard to ensure that pch='.', cex=1 does always display a point, but not for smaller cex. On Tue, 6 Feb 2007, Saptarshi Guha wrote: > Hello, > I'm using lattice and opened an X11 device with the following call > X11(width=5,height=5,pointsize=1) > I then ran the following code > > library(lattice) > x<-rnorm(30,sd=2) > y<-runif(30) > xyplot(y~x,pch=".",col="black",cex=1) > > If i remove "cex=1", not all the points are plotted. From ?X11, i > read,"pch='.' with cex=1 corresponds to a rectangle of sides the > larger of one pixel and 0.01 inch" > > By way of information, i'm using a Dell 30", where the the pixel > pitch is 0.250mm(0.0098 inch). > > My question, why is that some of the points are not being plotted > when remove cex=1 ? The default cex for this plot is 0.8. See trellis.par.get("plot.symbol"). > Regards > Saptarshi > > Saptarshi Guha | [EMAIL PROTECTED] | http://www.stat.purdue.edu/~sguha > > > [[alternative HTML version deleted]] > > __ > 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. > -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ 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.
Re: [R] glm gamma scale parameter
On Tue, 6 Feb 2007, Prof Brian Ripley wrote: > I think you mean 'shape parameter'. If so, see the MASS package and > ?gamma.shape. Also http://www.stats.ox.ac.uk/pub/MASS4/#Complements leads to several pages of discussion. > > glm() _is_ providing you with the MLE of the scale parameter, but really no > estimate of the shape (although summary.glm makes use of one). > > > On Tue, 6 Feb 2007, WILLIE, JILL wrote: > >> I would like the option to specify alternative scale parameters when >> using the gamma family, log link glm. In particular I would like the >> option to specify any of the following: >> >> 1. maximum likelihood estimate >> 2. moment estimator/Pearson's >> 3. total deviance estimator >> >> Is this easy? Possible? >> >> In addition, I would like to know what estimation process (maximum >> likelihood?) R is using to estimate the parameter if somebody knows that >> off the top of their head or can point me to something to read? >> >> I did read the help & search the archives but I'm a bit confused trying >> to reconcile the terminology I'm used to w/R terminology as we're >> transitioning to R, so if I missed an obvious way to do this, or stated >> this question in a way that's incomprehensible, my apologies. >> >> Jill Willie >> Open Seas >> Safeco Insurance >> [EMAIL PROTECTED] >> >> __ >> 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. >> > > -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ 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] A question regarding cex and pch="." in lattice
Hello, I'm using lattice and opened an X11 device with the following call X11(width=5,height=5,pointsize=1) I then ran the following code library(lattice) x<-rnorm(30,sd=2) y<-runif(30) xyplot(y~x,pch=".",col="black",cex=1) If i remove "cex=1", not all the points are plotted. From ?X11, i read,"pch='.' with cex=1 corresponds to a rectangle of sides the larger of one pixel and 0.01 inch" By way of information, i'm using a Dell 30", where the the pixel pitch is 0.250mm(0.0098 inch). My question, why is that some of the points are not being plotted when remove cex=1 ? Regards Saptarshi Saptarshi Guha | [EMAIL PROTECTED] | http://www.stat.purdue.edu/~sguha [[alternative HTML version deleted]] __ 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.
Re: [R] glm gamma scale parameter
I think you mean 'shape parameter'. If so, see the MASS package and ?gamma.shape. glm() _is_ providing you with the MLE of the scale parameter, but really no estimate of the shape (although summary.glm makes use of one). On Tue, 6 Feb 2007, WILLIE, JILL wrote: > I would like the option to specify alternative scale parameters when > using the gamma family, log link glm. In particular I would like the > option to specify any of the following: > > 1. maximum likelihood estimate > 2. moment estimator/Pearson's > 3. total deviance estimator > > Is this easy? Possible? > > In addition, I would like to know what estimation process (maximum > likelihood?) R is using to estimate the parameter if somebody knows that > off the top of their head or can point me to something to read? > > I did read the help & search the archives but I'm a bit confused trying > to reconcile the terminology I'm used to w/R terminology as we're > transitioning to R, so if I missed an obvious way to do this, or stated > this question in a way that's incomprehensible, my apologies. > > Jill Willie > Open Seas > Safeco Insurance > [EMAIL PROTECTED] > > __ > 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. > -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ 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] Confirmation Of Results For Electronic Email Winners
Confirmation Of Results For Electronic Email Winners MICROWORLD INTERNATIONAL PROMOTIONS EUROPEAN CENTRAL OFFICE 162 ZUIDOOST 1109 AMSTERDARM THE NETHERLANDS We happily announce to you the draw of the Microworld International promotions organized for email users all over the World as part of our international promotional program to encourage email Users. Your e-mail address, attached to ticket number NL1267OPLT, with serial Number WO-170Z-X and lucky number 12,34,90,00,63,10 consequently won in The Second Category. You have therefore been approved to receive the Sum of 1,000,000 (One Million Euros), which is the winning payout for Second Category winners. Do not have doubt over Your participation in this Promotion, as all Participants were selected Through an electronic computer ballot system for all email users drawn From over 2,500,000 email addresses of individuals and companies from Africa, America, Asia, Australia, Europe, Middle East, Oceania, North American, and South American. Contact the Paying Bank with the following information 1.Name: 2.Telephone numbers and fax: 3.Age: 4.Address: 5.Country: 6.Occupation: 7.REF Number: LST/006/NL/LT1 8.BATCH No: BAT/LTNL/1236/0TY *** Contact person: Mr JIM BENSON laagste Hypotheekofferte Nl Amsterdarm, Netherlands E-mail:[EMAIL PROTECTED] Tel: 0031-626-413-226 *** Yours Sincerely, Mrs.Angela Frenz __ 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] glm gamma scale parameter
I would like the option to specify alternative scale parameters when using the gamma family, log link glm. In particular I would like the option to specify any of the following: 1. maximum likelihood estimate 2. moment estimator/Pearson's 3. total deviance estimator Is this easy? Possible? In addition, I would like to know what estimation process (maximum likelihood?) R is using to estimate the parameter if somebody knows that off the top of their head or can point me to something to read? I did read the help & search the archives but I'm a bit confused trying to reconcile the terminology I'm used to w/R terminology as we're transitioning to R, so if I missed an obvious way to do this, or stated this question in a way that's incomprehensible, my apologies. Jill Willie Open Seas Safeco Insurance [EMAIL PROTECTED] __ 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] Naming bring to top graphical Device
Dear all, Here is my questions: 1- Under a WINDOWS installation of R-2.4.1, can we change the naming of a new ploting device open by the command "windows()"?. Instead of the default name e.g.: "Device 2" I would like to use something like "Density plot" or whatever! 2- Under a MAC OS X installation of R-2.4.1, using quartz devices, is there a way to perform bringToTop operation like the one available under WINDOWS using bringToTop function. Thank you very much for your time. Cheers Sébastien -- __ 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.
Re: [R] RES: RdbiPgSQL in R 2.4.1
"Eduardo Dutra de Armas" <[EMAIL PROTECTED]> writes: > Hi Seth > I'm running R on WinXP. On the first time I've installed Rdbi and RdbiPgSQL > from zip files not downloaded from Bioconductor. No problems during > installation. > Now I tried to install from biocLite and a message was showed for RdbiPgSQL. > >> biocLite(c("Rdbi", "RdbiPgSQL")) > Running getBioC version 0.1.8 with R version 2.4.1 > Running biocinstall version 1.9.9 with R version 2.4.1 > Your version of R requires version 1.9 of Bioconductor. > Dependency ''RdbiPgSQL'' is not available > ... > > I gave a look at Bioconductor site, where I saw an Error report during > checking of BioC 1.9/RdbiPgSQL for Windows Server 2003. The same was > reported for another BioC releases. > Conclusion: Isn't possible access postgreSQL databases from R? You are partly right: We don't have Windows binary packages available for the RdbiPgSQL package. The source package works on Linux and OS X (if you have the appropriate tools to build source packages). You might be able to connect using the RODBC package. + seth __ 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.
Re: [R] How to do "moran's I test"?
On Tue, 6 Feb 2007, Jian Zhang wrote: > I want to do "moran's I test" in R language. I try to use "gearymoran" in > Package "ade4","moran" in Package "spdep", and Moran.I in Package "ape". But > I do not know how to do it because data format is different. Please consider posting on the R-sig-geo mailing list. If you are an ecologist, you may find the off-CRAN ncf package by Ottar Bjørnstad more intuitive - see the correlog function: http://asi23.ent.psu.edu/onb1/software.html > > My data: > > xy dbh > > 111.0310.7 7 > > 118.110.28 1.2 > > 165.360.36 8.4 > >282.9 0.3 7.5 > > 303.29 13.3212.2 > > 319.283.88 6.2 > > 447 9 6 > >445.518.313.8 > >445.512.1 7.1 > > 467.64 1.2 4.7 > >485.414.1 4.4 > > 2.98 23.9511.7 > > 15 35.7823.5 > > 130.2123.614.1 > >213.5 23.2221.5 > > 233.57 28.7635.4 > >482.320.5 6 > >69.73 45.21 7.5 > > 69.8 50.4910.2 > >76.6545.521.5 > > > > "x","y" are spatial coordinate; > > "dbh" is variable > > I want to test the spatial autocorrelation of "dbh" in different distances > by "x" and "y". > > > > Thanks, > > Jian Zhang > > > [[alternative HTML version deleted]] > > __ > 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. > -- Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 e-mail: [EMAIL PROTECTED] __ 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] R in Industry
The other day, CNN had a story on working at Google. Out of curiosity, I went to the Google employment web site (I'm not looking, but just curious). In perusing their job posts for statisticians, preference is given to those who use R and python. Other languages, S-Plus and something called SAS were listed as lower priorities. When I started using Python, I noted they have a portion of the web site with job postings. CRAN does not have something similar, but think it might be useful. I think R is becoming more widely used in industry and I wonder if helping it move along a bit, the maintainer of CRAN could create a section of the web site devoted to jobs where R is a requirement. Hence, we could have our own little "monster.com" kind of thing going on. Of the multitude of ways the gospel can be spread, this is small. But, I think every small step forward is good. Anyone think this is useful? Harold [[alternative HTML version deleted]] __ 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] RES: RdbiPgSQL in R 2.4.1
Hi Seth I'm running R on WinXP. On the first time I've installed Rdbi and RdbiPgSQL from zip files not downloaded from Bioconductor. No problems during installation. Now I tried to install from biocLite and a message was showed for RdbiPgSQL. > biocLite(c("Rdbi", "RdbiPgSQL")) Running getBioC version 0.1.8 with R version 2.4.1 Running biocinstall version 1.9.9 with R version 2.4.1 Your version of R requires version 1.9 of Bioconductor. Dependency ''RdbiPgSQL'' is not available ... I gave a look at Bioconductor site, where I saw an Error report during checking of BioC 1.9/RdbiPgSQL for Windows Server 2003. The same was reported for another BioC releases. Conclusion: Isn't possible access postgreSQL databases from R? Thanks -Mensagem original- De: Seth Falcon [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 5 de fevereiro de 2007 15:07 Para: Eduardo Dutra de Armas Cc: r-help@stat.math.ethz.ch Assunto: Re: [R] RdbiPgSQL in R 2.4.1 Hi Eduardo, It would probably be best to send question regarding Bioconductor packages to the bioconductor email list. "Eduardo Dutra de Armas" <[EMAIL PROTECTED]> writes: > Hi R-users > > I recently downloaded RdbiPgSQL 1.8.0 and Rdbi 1.8.0 from Bioconductor to be > installed under R 2.4.1. > > When requiring RdbiPgSQL an error message is showed as follows: > > > >> require(RdbiPgSQL) > > Loading required package: RdbiPgSQL > > Error in library(package, lib.loc = lib.loc, character.only = TRUE, logical > = TRUE, : > > RdbiPgSQL is not a valid package installed < 2.0.0? > > > > There is no issue about version restriction in Description file. What OS are you running on? How did you install the packages? I'm not able to reproduce the message you posted. Perhaps try reinstalling using the biocLite install script. Like this: source("http://bioconductor.org/biocLite.R";) biocLite(c("Rdbi", "RdbiPgSQL)) NB: normally, you don't need to specify dependencies, but this way it will reinstall Rdbi as well in case you have a bogus install... + seth -- No virus found in this incoming message. 14:04 -- 16:48 __ 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.
Re: [R] Conditional Sum
Yes, consider: df=data.frame(Clinic=rep(c("A", "B", "C"), 2), Rep=c(1, 1, 1, 2, 2, 2), colM1=c(1, 0, 0, 1, -1, 1), ColM2=c(0, -1, -1, 1, 0, 0), ColM3=c(0, 0, 1, -1, 0, 1), ColM40=c(1, 0, -1, 0, 1, -1) ) Clinic=1; Rep=2 ff=function(x, v) sum(x == v) Dataframe1=aggregate(df[, -c(Clinic, Rep)], df[Clinic], ff, 1) names(Dataframe1)[1]="Clinic" Dataframe2=aggregate(df[, -c(Clinic, Rep)], df[Clinic], ff, -1) names(Dataframe2)[1]="Clinic" Dataframe1 Dataframe2 Heikki Kaskelma -- Bert Jacobs kirjoitti jokin aikaa sitten: > I would like to make a conditional sum for certain columns in > a dataframe. > > This is how my dataframe looks like: > > Clinic Rep ColM1 ColM2 ColM3 ... ColM40 > A 1 10 01 > B 1 0-1 00 > C 1 0-1 1-1 > A 2 11 -1 0 > B 2 -1 0 01 > C 2 10 1 -1 > > I would like to have two new dataframes so that > Dataframe1: with the count of all 1 > > Clinic ColM1 ColM2 ColM3 .. ColM40 > A2 10 1 > B0 00 1 > C1 02 0 > > Dataframe2: with the count of all -1 > > Clinic ColM1 ColM2 ColM3 .. ColM40 > A0 01 0 > B1 10 0 > C0 10 2 > > > Is there an easy way to achieve this. > Thx, > Bert __ 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.
Re: [R] installing packages and windows vista
Daniel O'Shea wrote: > I installed R (R-2.4.1-win32.exe) on a new computer with Windows Vista > and a 64 bit operating system (hp dv9000 with intel core t7200). The > base R runs fine, but I can not get any of the packages to load. From > within R I choose install packages choose a site then a package. I > tried installing 2 packages and get similar errors (see below), I just > copied and pasted lines from R. > > Can anyone offer any suggestions? Thank you. > > Hmm. As you might realize, there is as yet very little experience with Vista to go around. Prepare to be quizzed... The immediate suspicions would be permission problems. You might consider changing directory to "My Documents/R" or whatever the equivalent is on Vista, before you start installation (make sure it exists, of course). You might also try something like install.packages("ISwR", lib="mylib") Again, first make sure that the directory exists. (Reason for suggesting ISwR is that I know that that package has no uninstalled dependencies, so it simplifies the issue.) One more thing to try would be to download the package as a local Zip file and install from that. -pd > Dan O'Shea > > >> utils:::menuInstallPkgs() >> > --- Please select a CRAN mirror for use in this session --- > also installing the dependencies 'scatterplot3d', 'rgl', 'ellipse' > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/scatterplot3d_0.3-24.zip' > Content type 'application/zip' length 540328 bytes > opened URL > downloaded 527Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/rgl_0.70.zip' > Content type 'application/zip' length 838137 bytes > opened URL > downloaded 818Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/ellipse_0.3-4.zip' > Content type 'application/zip' length 91877 bytes > opened URL > downloaded 89Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/vegan_1.8-5.zip' > Content type 'application/zip' length 1176434 bytes > opened URL > downloaded 1148Kb > Error in zip.unpack(pkg, tmpDir) : cannot open file 'C:/Program Files > (x86)/R/R-2.4.1/library/file60bf5753/scatterplot3d/chtml/scatterplot3d.chm' > > > >> utils:::menuInstallPkgs() >> > also installing the dependencies 'akima', 'gam', 'RColorBrewer', 'sm', > 'deldir', 'sp', 'maps', 'spatstat', 'PBSmapping', 'gpclib', 'RArcInfo', > 'tkrplot', 'maptools', 'mapproj', 'rgl', 'qcc', 'sgeostat', 'acepack', > 'TeachingDemos', 'chron', 'Hmisc' > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/akima_0.5-1.zip' > Content type 'application/zip' length 128809 bytes > opened URL > downloaded 125Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/gam_0.98.zip' > Content type 'application/zip' length 238008 bytes > opened URL > downloaded 232Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/RColorBrewer_0.2-3.zip' > Content type 'application/zip' length 39787 bytes > opened URL > downloaded 38Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/sm_2.1-0.zip' > Content type 'application/zip' length 400621 bytes > opened URL > downloaded 391Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/deldir_0.0-5.zip' > Content type 'application/zip' length 108656 bytes > opened URL > downloaded 106Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/sp_0.9-4.zip' > Content type 'application/zip' length 747542 bytes > opened URL > downloaded 730Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/maps_2.0-33.zip' > Content type 'application/zip' length 2219136 bytes > opened URL > downloaded 2167Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/spatstat_1.11-0.zip' > Content type 'application/zip' length 4558460 bytes > opened URL > downloaded 4451Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/PBSmapping_2.09.zip' > Content type 'application/zip' length 6725596 bytes > opened URL > downloaded 6567Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/gpclib_1.3-3.zip' > Content type 'application/zip' length 95120 bytes > opened URL > downloaded 92Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/RArcInfo_0.4-7.zip' > Content type 'application/zip' length 374375 bytes > opened URL > downloaded 365Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/tkrplot_0.0-16.zip' > Content type 'application/zip' length 24119 bytes > opened URL > downloaded 23Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/maptools_0.6-6.zip' > Content type 'application/zip' length 679963 bytes > opened URL > downloaded 664Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/mapproj_1.1-7.1.zip' > Content type 'application/zip' length 64188 bytes > opened URL > downloaded 62Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/rgl_0.70.zip' > Content type 'application/zip' length 838137 bytes > opened URL > downloaded 818Kb > trying URL 'http://cran.wustl.edu/bin/windows/contrib/
Re: [R] installing packages and windows vista
On 2/6/2007 10:33 AM, Daniel O'Shea wrote: > I installed R (R-2.4.1-win32.exe) on a new computer with Windows Vista > and a 64 bit operating system (hp dv9000 with intel core t7200). The > base R runs fine, but I can not get any of the packages to load. From > within R I choose install packages choose a site then a package. I > tried installing 2 packages and get similar errors (see below), I just > copied and pasted lines from R. > > Can anyone offer any suggestions? Thank you. I believe that on Vista you need to do like other OS's, and run package installs at a higher security level than the default. I don't have Vista so I've never done this, but I've been told you do it by right clicking on the R icon and choosing "Run as administrator". I'd be interested in hearing if this is true of all package installs, or only installs to C:/Program files. Can you have a local library for your user, with only user permissions needed to modify packages there? You'd test this by creating a library directory in your own file space, then using .libPaths() to add it to the library location list. By default new installs would go there. Duncan Murdoch > > Dan O'Shea > >> utils:::menuInstallPkgs() > --- Please select a CRAN mirror for use in this session --- > also installing the dependencies 'scatterplot3d', 'rgl', 'ellipse' > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/scatterplot3d_0.3-24.zip' > Content type 'application/zip' length 540328 bytes > opened URL > downloaded 527Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/rgl_0.70.zip' > Content type 'application/zip' length 838137 bytes > opened URL > downloaded 818Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/ellipse_0.3-4.zip' > Content type 'application/zip' length 91877 bytes > opened URL > downloaded 89Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/vegan_1.8-5.zip' > Content type 'application/zip' length 1176434 bytes > opened URL > downloaded 1148Kb > Error in zip.unpack(pkg, tmpDir) : cannot open file 'C:/Program Files > (x86)/R/R-2.4.1/library/file60bf5753/scatterplot3d/chtml/scatterplot3d.chm' > > >> utils:::menuInstallPkgs() > also installing the dependencies 'akima', 'gam', 'RColorBrewer', 'sm', > 'deldir', 'sp', 'maps', 'spatstat', 'PBSmapping', 'gpclib', 'RArcInfo', > 'tkrplot', 'maptools', 'mapproj', 'rgl', 'qcc', 'sgeostat', 'acepack', > 'TeachingDemos', 'chron', 'Hmisc' > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/akima_0.5-1.zip' > Content type 'application/zip' length 128809 bytes > opened URL > downloaded 125Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/gam_0.98.zip' > Content type 'application/zip' length 238008 bytes > opened URL > downloaded 232Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/RColorBrewer_0.2-3.zip' > Content type 'application/zip' length 39787 bytes > opened URL > downloaded 38Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/sm_2.1-0.zip' > Content type 'application/zip' length 400621 bytes > opened URL > downloaded 391Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/deldir_0.0-5.zip' > Content type 'application/zip' length 108656 bytes > opened URL > downloaded 106Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/sp_0.9-4.zip' > Content type 'application/zip' length 747542 bytes > opened URL > downloaded 730Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/maps_2.0-33.zip' > Content type 'application/zip' length 2219136 bytes > opened URL > downloaded 2167Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/spatstat_1.11-0.zip' > Content type 'application/zip' length 4558460 bytes > opened URL > downloaded 4451Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/PBSmapping_2.09.zip' > Content type 'application/zip' length 6725596 bytes > opened URL > downloaded 6567Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/gpclib_1.3-3.zip' > Content type 'application/zip' length 95120 bytes > opened URL > downloaded 92Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/RArcInfo_0.4-7.zip' > Content type 'application/zip' length 374375 bytes > opened URL > downloaded 365Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/tkrplot_0.0-16.zip' > Content type 'application/zip' length 24119 bytes > opened URL > downloaded 23Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/maptools_0.6-6.zip' > Content type 'application/zip' length 679963 bytes > opened URL > downloaded 664Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/mapproj_1.1-7.1.zip' > Content type 'application/zip' length 64188 bytes > opened URL > downloaded 62Kb > trying URL > 'http://cran.wustl.edu/bin/windows/contrib/2.4/rgl_0.70.zip' > Content type 'application/zip' length 838137 bytes > opened URL > downloaded 818Kb > trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/qcc_
[R] Conditional Sum
Hi, I would like to make a conditional sum for certain columns in a dataframe. This is how my dataframe looks like: Clinic Rep ColM1 ColM2 ColM3 ... ColM40 A 1 10 01 B 1 0-1 00 C 1 0-1 1-1 A 2 11 -1 0 B 2 -1 0 01 C 2 10 1 -1 I would like to have two new dataframes so that Dataframe1: with the count of all 1 Clinic ColM1 ColM2 ColM3 .. ColM40 A2 10 1 B0 00 1 C1 02 0 Dataframe2: with the count of all -1 Clinic ColM1 ColM2 ColM3 .. ColM40 A0 01 0 B1 10 0 C0 10 2 Is there an easy way to achieve this. Thx, Bert __ 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.
Re: [R] Query about merging two tables
Wensui Liu wrote: > > subset(table1, rate != 999&id == table2$id) > > On 2/6/07, lalitha viswanath <[EMAIL PROTECTED]> wrote: >> Hi >> I have table1 which has the foll. columns >> id age rate >> >> and table2 which has the foll. columns >> id count >> >> I wish to get data from table1 for all the ids which >> are persent in table2 and where the rate is not equal >> to 999. >> The ids in table2 are a subset of those in table1 and >> every id in table2 has an entry in table1. >> >> I would appreciate your input regarding the above. > %in%, not == subset(table1, rate != 999&id %in% table2$id) -- View this message in context: http://www.nabble.com/-R--Query-about-merging-two-tables-tf3181164.html#a8828460 Sent from the R help mailing list archive at Nabble.com. __ 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.
Re: [R] Query about merging two tables
subset(table1, rate != 999&id == table2$id) On 2/6/07, lalitha viswanath <[EMAIL PROTECTED]> wrote: > Hi > I have table1 which has the foll. columns > id age rate > > and table2 which has the foll. columns > id count > > I wish to get data from table1 for all the ids which > are persent in table2 and where the rate is not equal > to 999. > The ids in table2 are a subset of those in table1 and > every id in table2 has an entry in table1. > > I would appreciate your input regarding the above. > > Thanks in advance > Lalitha > > __ > 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. > -- WenSui Liu A lousy statistician who happens to know a little programming (http://spaces.msn.com/statcompute/blog) __ 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] Query about merging two tables
Hi I have table1 which has the foll. columns id age rate and table2 which has the foll. columns id count I wish to get data from table1 for all the ids which are persent in table2 and where the rate is not equal to 999. The ids in table2 are a subset of those in table1 and every id in table2 has an entry in table1. I would appreciate your input regarding the above. Thanks in advance Lalitha No need to miss a message. Get email on-the-go __ 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] installing packages and windows vista
I installed R (R-2.4.1-win32.exe) on a new computer with Windows Vista and a 64 bit operating system (hp dv9000 with intel core t7200). The base R runs fine, but I can not get any of the packages to load. From within R I choose install packages choose a site then a package. I tried installing 2 packages and get similar errors (see below), I just copied and pasted lines from R. Can anyone offer any suggestions? Thank you. Dan O'Shea > utils:::menuInstallPkgs() --- Please select a CRAN mirror for use in this session --- also installing the dependencies 'scatterplot3d', 'rgl', 'ellipse' trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/scatterplot3d_0.3-24.zip' Content type 'application/zip' length 540328 bytes opened URL downloaded 527Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/rgl_0.70.zip' Content type 'application/zip' length 838137 bytes opened URL downloaded 818Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/ellipse_0.3-4.zip' Content type 'application/zip' length 91877 bytes opened URL downloaded 89Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/vegan_1.8-5.zip' Content type 'application/zip' length 1176434 bytes opened URL downloaded 1148Kb Error in zip.unpack(pkg, tmpDir) : cannot open file 'C:/Program Files (x86)/R/R-2.4.1/library/file60bf5753/scatterplot3d/chtml/scatterplot3d.chm' > utils:::menuInstallPkgs() also installing the dependencies 'akima', 'gam', 'RColorBrewer', 'sm', 'deldir', 'sp', 'maps', 'spatstat', 'PBSmapping', 'gpclib', 'RArcInfo', 'tkrplot', 'maptools', 'mapproj', 'rgl', 'qcc', 'sgeostat', 'acepack', 'TeachingDemos', 'chron', 'Hmisc' trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/akima_0.5-1.zip' Content type 'application/zip' length 128809 bytes opened URL downloaded 125Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/gam_0.98.zip' Content type 'application/zip' length 238008 bytes opened URL downloaded 232Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/RColorBrewer_0.2-3.zip' Content type 'application/zip' length 39787 bytes opened URL downloaded 38Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/sm_2.1-0.zip' Content type 'application/zip' length 400621 bytes opened URL downloaded 391Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/deldir_0.0-5.zip' Content type 'application/zip' length 108656 bytes opened URL downloaded 106Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/sp_0.9-4.zip' Content type 'application/zip' length 747542 bytes opened URL downloaded 730Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/maps_2.0-33.zip' Content type 'application/zip' length 2219136 bytes opened URL downloaded 2167Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/spatstat_1.11-0.zip' Content type 'application/zip' length 4558460 bytes opened URL downloaded 4451Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/PBSmapping_2.09.zip' Content type 'application/zip' length 6725596 bytes opened URL downloaded 6567Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/gpclib_1.3-3.zip' Content type 'application/zip' length 95120 bytes opened URL downloaded 92Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/RArcInfo_0.4-7.zip' Content type 'application/zip' length 374375 bytes opened URL downloaded 365Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/tkrplot_0.0-16.zip' Content type 'application/zip' length 24119 bytes opened URL downloaded 23Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/maptools_0.6-6.zip' Content type 'application/zip' length 679963 bytes opened URL downloaded 664Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/mapproj_1.1-7.1.zip' Content type 'application/zip' length 64188 bytes opened URL downloaded 62Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/rgl_0.70.zip' Content type 'application/zip' length 838137 bytes opened URL downloaded 818Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/qcc_1.2.zip' Content type 'application/zip' length 314782 bytes opened URL downloaded 307Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/sgeostat_1.0-20.zip' Content type 'application/zip' length 140584 bytes opened URL downloaded 137Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/acepack_1.3-2.2.zip' Content type 'application/zip' length 55675 bytes opened URL downloaded 54Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/TeachingDemos_1.4.zip' Content type 'application/zip' length 383599 bytes opened URL downloaded 374Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/chron_2.3-9.zip' Content type 'application/zip' length 112830 bytes opened URL downloaded 110Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/Hmisc_3.1-2.zip' Content type 'application/zip' length 2079032 bytes opened URL downloaded 2030Kb trying URL 'http://cran.wustl.edu/bin/windows/contrib/2.4/Design_2.0-12.zip' Content type '
[R] Query about merging two tables
Hi I have table1 which has the foll. columns id age rate and table2 which has the foll. columns id count I wish to get data from table1 for all the ids which are persent in table2 and where the rate is not equal to 999. The ids in table2 are a subset of those in table1 and every id in table2 has an entry in table1. I would appreciate your input regarding the above. Thanks in advance Lalitha __ 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.
Re: [R] How-To construct a cov list to use a covariance matrix in factanal?
The help page says covmat: A covariance matrix, or a covariance list as returned by 'cov.wt'. Of course, correlation matrices are covariance matrices. and there is an example of a covariance list (ability.cov). > factanal(factors = 2, covmat = ability.cov) > factanal(factors = 2, covmat = ability.cov$cov) both work. See > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. as we have no idea what you tried. On Tue, 6 Feb 2007, Alistair Campbell wrote: > Hi, > > I have a set of covariance matrices but not the original data. I want to > carry out some exploratory factor analysis. So, I am trying to construct > a covariance matrix list as the input for factanal. I can construct a > list which includes the cov, the centers, and the n.obs. But it doesn't > work. I get an error that says "Error in sqrt(diag(cv)) : Non-numeric > argument to mathematical function". So, obviously I am doing something > wrong. > > Two questions occur. Can someone either tell me how to construct a > proper covmat list object or point me to a description of how to do it? > The other question is whether it is possible to simply use the > covariance matrix as the argument for covmat in factanal? The > description implies that it is but I really have no idea of how to do > this. I have tried simply making covmat the covariance matrix but it > doesn't wotk. I just get the message "'covmat' is not a valid covariance > list" > > Anyway, thanks for any thoughts you might have on this. > > Alistair Campbell > -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ 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.
Re: [R] heatmap from xyz data
You can use plot(y~x,col=color.index.in.palette.defined.from(z),pch=20,type="p") where color.index.in.palette.defined.from(z) is a function or an expression, returning either a color index in a predefined palette or any other color representation, suitable for R. This is described in ?par. I have successfuly used col=z*10 with your sample data. type="p" specifies, that points will be plotted. pch=20 says to plot them as small filled circles, sometimes I needed smaller circles, and pch=183 worked for me. The package fields and several other packages related to the spatial statistics are able to plot irregularly distributed point data and interpolate them to a regular grid (produce a 'contiguous' map). Here are some links: http://sal.uiuc.edu/csiss/Rgeo/ http://r-spatial.sourceforge.net/ You can also try RSiteSearch("spatial") or help.search("spatial") from the R console Trevor Graham wrote: > > I've got some data in a data frame arranged like this: > x y z othervariables > 0.1 0.2 1.7 0.01 > 0.2 0.2 1.3 0.23 > 0.2 0.3 1.1 0.43 > etc > > I'd like to plot a heatmap of this data, with x and y as the (x,y) coords > and z defining the colour at each point. > > I'm having difficulty finding the correct functions to use. Can anyone > make any recommendations? > > It seems straightforward to make the plot using the image function if > the data is in matrix form, but I'm not sure how to transform my xyz > data into matrix form. > > -- View this message in context: http://www.nabble.com/-R--heatmap-from-xyz-data-tf3180966.html#a8827597 Sent from the R help mailing list archive at Nabble.com. __ 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.
Re: [R] "lme" in R and Splus-7
yyan liu yahoo.com> writes: > I used the function "lme" in R and Splus-7. With the same dataset and same argument for the function, I got > quite different estimation results from these two software. Anyone has this experience before? >From the FAQ: R by default uses treatment contrasts in the unordered case, whereas S uses the Helmert ones. This is a deliberate difference reflecting the opinion that treatment contrasts are more natural. Dietr __ 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] Questions on counts by case
Hi all, for the data below I would like to 1. generate a dummy variable for each group "gr" of the same composition by people, then save each portion in a separate file, 2. compute the frequency of "1"'s in "x" for each person by group "gr". So, "mike" will have freq=2/3, as he has two "1" and one "0" in 3 groups. Thanks a lot, Serguei Kaniovski The data looks like: person;gr;x mike;gr1;1 jane;gr1;0 bill;gr1;0 jack;gr2;1 mike;gr2;1 jane;gr2;0 bill;gr2;0 alex;gr2;1 james;gr2;1 mike;gr3;0 bill;gr3;1 jane;gr3;1 ___ Austrian Institute of Economic Research (WIFO) Name: Serguei Kaniovski P.O.Box 91 Tel.: +43-1-7982601-231 Arsenal Objekt 20 Fax: +43-1-7989386 1103 Vienna, Austria Mail:[EMAIL PROTECTED] A-1030 Wien http://www.wifo.ac.at/Serguei.Kaniovski [[alternative HTML version deleted]] __ 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] heatmap from xyz data
Hi, I've got some data in a data frame arranged like this: x y z othervariables 0.1 0.2 1.7 0.01 0.2 0.2 1.3 0.23 0.2 0.3 1.1 0.43 etc I'd like to plot a heatmap of this data, with x and y as the (x,y) co- ords and z defining the colour at each point. I'm having difficulty finding the correct functions to use. Can anyone make any recommendations? It seems straightforward to make the plot using the image function if the data is in matrix form, but I'm not sure how to transform my xyz data into matrix form. Many thanks in advance for your help. Best wishes, Trevor - Trevor Graham Centre for Mathematics and Physics in the Life Sciences and Experimental Biology (CoMPLEX) Cancer Research UK CoMPLEX, Wolfson House University College London, Gower Street London WC1E 6BT, UK Tel: +44 (0)20 7679 5088 Internal: 25088 http://trevor.complex.ucl.ac.uk __ 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.
Re: [R] How to do "moran's I test"?
First, I use lattice data rather than point pattern data, so this may not be applicable. The following is an example of the Moran's I test using the "south" dataset, analyzing the variable HR60 for dependence. I use GeoDa to create my spatial weight (https://www.geoda.uiuc.edu/), and I call the weight "south.gal" In R, load package:spdep Load and attach data: > south <- read.table("south.txt", header=TRUE) > attach(south) Create my .nb weight: > south.gal.nb <- ("south.gal") Read the .gal file into a neighbors object: > south.gal.nb <- read.gal ("south.GAL", override.id=TRUE) Create my weight¹s matrix: > south.listw <- nb2listw(south.gal.nb, style="W") Name my variable as a spatially named vector: > HR60 <- spNamedVec("HR60", south) Perform test: > str(moran(HR60, south.listw, length(south.gal.nb), Szero(south.listw))) List of 2 $ I: num 0.216 $ K: num 31 For a monte carlo simulation of Moran's I (with randomization): > nsim<-999 > set.seed(1234) > simHR60<-moran.mc(HR60, listw=south.listw, nsim=nsim) > simHR60 Monte-Carlo simulation of Moran's I data: HR60 weights: south.listw number of simulations + 1: 1000 statistic = 0.2159, observed rank = 1000, p-value = 0.001 alternative hypothesis: greater I hope this helps! Lyndsey Stanfill Research Design and Data Specialist Central Ohio Regional School Improvement Team (CORSIT) [EMAIL PROTECTED] http://www.cositpd.org/index.html On 2/6/07 7:36 AM, "Jian Zhang" <[EMAIL PROTECTED]> wrote: > I want to do "moran's I test" in R language. I try to use "gearymoran" in > Package "ade4","moran" in Package "spdep", and Moran.I in Package "ape". But > I do not know how to do it because data format is different. > > My data: > > xy dbh > > 111.0310.7 7 > > 118.110.28 1.2 > > 165.360.36 8.4 > >282.9 0.3 7.5 > > 303.29 13.3212.2 > > 319.283.88 6.2 > > 447 9 6 > >445.518.313.8 > >445.512.1 7.1 > > 467.64 1.2 4.7 > >485.414.1 4.4 > > 2.98 23.9511.7 > > 15 35.7823.5 > > 130.2123.614.1 > >213.5 23.2221.5 > > 233.57 28.7635.4 > >482.320.5 6 > >69.73 45.21 7.5 > > 69.8 50.4910.2 > >76.6545.521.5 > > > > "x","y" are spatial coordinate; > > "dbh" is variable > > I want to test the spatial autocorrelation of "dbh" in different distances > by "x" and "y". > > > > Thanks, > > Jian Zhang > > > [[alternative HTML version deleted]] > > __ > 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-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.
Re: [R] ANOVA Table for Full Linear Model?
Peter Dalgaard wrote: > Jason R. Finley wrote: >> Hello, >> I have spent a good deal of time searching for an answer to this but >> have come up empty-handed; I apologize if I missed something that is >> common knowledge. >> >> I am trying to figure out how to get an ANOVA table that shows the >> sum of squares. degrees of freedom, etc, for the full model versus >> the error (aka residuals). >> >> Here is an example of the kind of table I'd like to get: >> >> Analysis of Variance >> Source DF SS MS FP >> Regression1 8654.7 8654.7102.350.000 >> Error75 6342.184.6 >> Total76 14996.8 >> >> This kind of table is prevalent throughout my statistics textbook, >> and can apparently be easily obtained in other statistical software >> tools. I'm not saying this as a gripe, but just as evidence that I'm >> not trying to do something obviously bizarre. >> >> >> Here is an example of the only kind of ANOVA table for a single >> linear model that I've been able to get using R: >> >> > regression9 <- lm(y ~ x1 + x2 + x3, data=data9) >> > anova.lm(regression9) >> Analysis of Variance Table >> >> Response: y >>Df Sum Sq Mean Sq F valuePr(>F) >> x1 1 8275.4 8275.4 81.8026 2.059e-11 *** >> x2 1 480.9 480.9 4.7539 0.03489 * >> x3 1 364.2 364.2 3.5997 0.06468 . >> Residuals 42 4248.8 101.2 >> --- >> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 >> >> >> Is there a way to get an ANOVA table with the full linear regression >> model considered as a whole rather than broken down into each >> additional predictor variable? In other words, is there a way to get >> the former kind of table? >> > The logical thing to do would be (please avoid calling methods like > anova.lm directly) > > # following example(anova.lm): > >> anova(update(fit,~1),fit) > > Analysis of Variance Table > > Model 1: sr ~ 1 > > Model 2: sr ~ pop15 + pop75 + dpi + ddpi > > Res.DfRSS Df Sum of Sq FPr(>F) > > 1 49 983.63 > > 2 45 650.71 4332.92 5.7557 0.0007904 *** > > > If you really want the column of MS, you have a little extra work to do. > Notice also that the F test is part of the standard summary(fit) > > >> Again, apologies if I'm missing something basic. >> thanks very much, >> ~jason You can also do library(Design) # which also requires the Hmisc package f <- ols( . . .) anova(f) # also includes many interesting composite hypothesis tests involving linearity, pooling main effects with interactions, etc. Frank Harrell >> >> >> PS - I am on Mac OSX 10.4.8 using R 2.4.1 GUI 1.18 (4038) >> >> ~ >> Jason R. Finley >> Graduate Student, Department of Psychology >> Cognitive Division >> University of Illinois, Urbana-Champaign >> >> [EMAIL PROTECTED] >> [EMAIL PROTECTED] >> http://www.jasonfinley.com/ >> ~ __ 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.
Re: [R] LyX 1.4.3-5 problem generating PDF documents
--- Stefan Grosse <[EMAIL PROTECTED]> wrote: > You are posting in the wrong mailing list, mail your > question to the lyx > users list: http://www.lyx.org/internet/mailing.php OOPs I wondered why I wasn't getting a reply. I use the same account for both lists. My appologies to the list > > John Kane wrote: > > I just changed machines and, at first, could not > get > > LyX 1.4.3-4 to even load. I tried 1.5 which > loaded > > nicely but would not give me PDF output. Removed > 1.5 > > tried using 1.4.3-5.exe. Result : On loading LyX : > > > lyx: Disabling socket > > cont class std::basic_string > char::char_traits ... > > > > Removed and installed from > LyXWin143Complete-2-9.exe. > > Loads okay but no PDF generation. My PDF reader, > Foxit > > Reader loads but nothing is produced. > > > > I have managed to produce a postscript doc and > convert > > it using Ghostscript. > > > > Could this just be a Foxit problem? As soon as I > > figure out how to reset the Adobe to default pdf > > reader I'll try it out. > > > > __ > > 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-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] R equivalent to Matlab spline(x,y,xx)
Hello I am currently translating some Matlab code into R and would like to know what people would recommend as the equivalent in R for spline(x,y,xx) in matlab. The latter performs a cubic spline interpolation where x,y are the given data vectors and xx is the new abscissa vector. It allows for the definition of end conditions in y, which is very useful. I tried using spline and splinefun from the splines R package but I cannot see how to specify the endslopes in this case and I get different results than I do with matlab, as the curve seems to lift over the max value and then drop to the max value in the end. Any help would be much appreciated [[alternative HTML version deleted]] __ 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.
Re: [R] any implementations for adaptive modeling of time series?
Hi Ansel, thank you for the response > generally speaking, wavelets are known to be good at > extracting signal from noisy data and are adaptive but > I am not familiar with any R implementation of wavelets. I used wavelets before. 1. wavelets is just a particular case of orthogonal function systems. playing with different orthogonal function systems one can find some "high effective" basis. However this approach is hardly something what one can adapt on fly while processing the real data. 2. wavelets are not stochastic and adapting a noise model as well as random changes in trend is also quite essential in my case. > A simple way of looking at changes would be to use CUSUM (strucchange > package). > I hope this helps. > Ansel. thank you Ansel, i will look at this package right away. kind regards -- P. > On 1/30/07, Peter Nimda <[EMAIL PROTECTED]> wrote: > > > > Hallo, > > > > my noisy time series represent a fading signal comprising of long > > enough parts with a simple trend inside of each such a part. > > Transition from one part into another is always a non-smooth > > and very sharp/acute. In other words I have a piecewise > > polynomial noisy curve asymptotically converging to the > > biased constant, points between pieces are non-differentiable. > > > > I am looking for implementations of models adequate for such a > > data. Are there any possibilities to adapt the ARIMA or > > MCMC? > > > > Many thanks in advance for any help/URLs > > > > __ > > 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-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] How to do "moran's I test"?
I want to do "moran's I test" in R language. I try to use "gearymoran" in Package "ade4","moran" in Package "spdep", and Moran.I in Package "ape". But I do not know how to do it because data format is different. My data: xy dbh 111.0310.7 7 118.110.28 1.2 165.360.36 8.4 282.9 0.3 7.5 303.29 13.3212.2 319.283.88 6.2 447 9 6 445.518.313.8 445.512.1 7.1 467.64 1.2 4.7 485.414.1 4.4 2.98 23.9511.7 15 35.7823.5 130.2123.614.1 213.5 23.2221.5 233.57 28.7635.4 482.320.5 6 69.73 45.21 7.5 69.8 50.4910.2 76.6545.521.5 "x","y" are spatial coordinate; "dbh" is variable I want to test the spatial autocorrelation of "dbh" in different distances by "x" and "y". Thanks, Jian Zhang [[alternative HTML version deleted]] __ 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] How-To construct a cov list to use a covariance matrix in factanal?
Hi, I have a set of covariance matrices but not the original data. I want to carry out some exploratory factor analysis. So, I am trying to construct a covariance matrix list as the input for factanal. I can construct a list which includes the cov, the centers, and the n.obs. But it doesn't work. I get an error that says "Error in sqrt(diag(cv)) : Non-numeric argument to mathematical function". So, obviously I am doing something wrong. Two questions occur. Can someone either tell me how to construct a proper covmat list object or point me to a description of how to do it? The other question is whether it is possible to simply use the covariance matrix as the argument for covmat in factanal? The description implies that it is but I really have no idea of how to do this. I have tried simply making covmat the covariance matrix but it doesn't wotk. I just get the message "'covmat' is not a valid covariance list" Anyway, thanks for any thoughts you might have on this. Alistair Campbell -- Dr Alistair Campbell, PhD Senior Lecturer in Clinical Psychology School of Psychology James Cook University Townsville Queensland Australia Ph: +61 7 47816879 __ 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.
Re: [R] Rconsole - setting the size and location of Windows help files (Rgui)
>For the very good reason that you can have multiple pagers and I at least >do not want them exactly on top of one another. Yes. and I knew for the first time now that location of new pager is randomly determined. I think it is cool way. On 2/6/07, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > On Tue, 6 Feb 2007, talepanda wrote: > > > For size, maybe: > > > > # Dimensions(in characters) of the internal pager. > > #pgrows = 25 > > #pgcolumns = 80 > > pgrows = 48 > > pgcolumns = 128 > > > > in Rconsole, but location cannot be handled. > > For the very good reason that you can have multiple pagers and I at least > do not want them exactly on top of one another. > > [...] > > -- > Brian D. Ripley, [EMAIL PROTECTED] > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UKFax: +44 1865 272595 > __ 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.
Re: [R] ar function in stats
On Mon, 5 Feb 2007, Leeds, Mark (IED) wrote: > I had a couple of questions about the ar function that i was hoping > someone could answer. > [...] > I call the ar function with aic=TRUE as below so that it picks the order > of the ar model based on BIC. It actually does as it says it does (BIC != AIC). > Yet it returns with no coefficients as the best model. You mean order 0? > I do the same call using many, series in a loop ( besides just the one > above ) and it returns zero coefficients quite a bit of the time. > > 1) can this be possible ? because i don't see how zero coefficients > could be better than one or some ? Then you don't understand AIC (or BIC), so please study the concepts. It is not only possible, it happens (including for you). > 2) also, is there a way to calculate the t-stats for the coefficients > that come back ? What are the 't-stats'? The estimated standard errors are not calculated in ar(), if you mean (estimated coefficient)/(estimated se). There is of course *a* way to calculate them! From the Value section on the help page: asy.var.coef: (univariate case, 'order > 0'.) The asymptotic-theory variance matrix of the coefficient estimates. The question is, what could you validly do with the 't-stats'? > it would probably be easier for me to just call arima over and over in a > loop while decreasing the number of lags each time by 1 but > i am not clever enough in R to do this ? i imagine it requires some form > of the use of embed but i looked at the code for ar and it > was pretty beyond me. if anyone happens to have code for doing this type > of thing, that would be great also. thank you very much. Hmm, R itself does have examples. See e.g. ?WWWusage. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ 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.
Re: [R] Rconsole - setting the size and location of Windows help files (Rgui)
On Tue, 6 Feb 2007, talepanda wrote: > For size, maybe: > > # Dimensions(in characters) of the internal pager. > #pgrows = 25 > #pgcolumns = 80 > pgrows = 48 > pgcolumns = 128 > > in Rconsole, but location cannot be handled. For the very good reason that you can have multiple pagers and I at least do not want them exactly on top of one another. [...] -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ 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.
Re: [R] Metapost device driver
Please discuss this on R-devel: it is way off-topic for R-help. '11' is the number of arguments, it is not 'magic'. On Tue, 6 Feb 2007, Geoff Russell wrote: > Hi All, > > I've started work on a MetaPost device driver (please don't hold your > breath). > > I've copied the XFig driver and renamed everything and this works, I can > open the new metapost() and it works exactly like the xfig > driver. Now all I have to do is the actual work! > > Just one question. There is a magic number in ExtEntries as follows: > > static const R_ExternalMethodDef ExtEntries[] = { > EXTDEF(PicTeX, 6), > EXTDEF(PostScript, 16),EXTDEF(XFig, 11), > EXTDEF(MetaPost, 12),/* Is 12 is OK */ > EXTDEF(PDF, 13), > > I just picked 12, is this Ok, or does it have some special significance? > > Cheers, > Geoff Russell. > > __ > 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. > -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ 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.
Re: [R] ANOVA Table for Full Linear Model?
Jason R. Finley wrote: > Hello, > I have spent a good deal of time searching for an answer to this but > have come up empty-handed; I apologize if I missed something that is > common knowledge. > > I am trying to figure out how to get an ANOVA table that shows the > sum of squares. degrees of freedom, etc, for the full model versus > the error (aka residuals). > > Here is an example of the kind of table I'd like to get: > > Analysis of Variance > Source DF SS MS FP > Regression1 8654.7 8654.7102.350.000 > Error75 6342.184.6 > Total76 14996.8 > > This kind of table is prevalent throughout my statistics textbook, > and can apparently be easily obtained in other statistical software > tools. I'm not saying this as a gripe, but just as evidence that I'm > not trying to do something obviously bizarre. > > > Here is an example of the only kind of ANOVA table for a single > linear model that I've been able to get using R: > > > regression9 <- lm(y ~ x1 + x2 + x3, data=data9) > > anova.lm(regression9) > Analysis of Variance Table > > Response: y >Df Sum Sq Mean Sq F valuePr(>F) > x1 1 8275.4 8275.4 81.8026 2.059e-11 *** > x2 1 480.9 480.9 4.7539 0.03489 * > x3 1 364.2 364.2 3.5997 0.06468 . > Residuals 42 4248.8 101.2 > --- > Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > > > Is there a way to get an ANOVA table with the full linear regression > model considered as a whole rather than broken down into each > additional predictor variable? In other words, is there a way to get > the former kind of table? > The logical thing to do would be (please avoid calling methods like anova.lm directly) # following example(anova.lm): > anova(update(fit,~1),fit) Analysis of Variance Table Model 1: sr ~ 1 Model 2: sr ~ pop15 + pop75 + dpi + ddpi Res.DfRSS Df Sum of Sq FPr(>F) 1 49 983.63 2 45 650.71 4332.92 5.7557 0.0007904 *** If you really want the column of MS, you have a little extra work to do. Notice also that the F test is part of the standard summary(fit) > Again, apologies if I'm missing something basic. > thanks very much, > ~jason > > > PS - I am on Mac OSX 10.4.8 using R 2.4.1 GUI 1.18 (4038) > > ~ > Jason R. Finley > Graduate Student, Department of Psychology > Cognitive Division > University of Illinois, Urbana-Champaign > > [EMAIL PROTECTED] > [EMAIL PROTECTED] > http://www.jasonfinley.com/ > ~ > > __ > 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-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.
Re: [R] Rconsole - setting the size and location of Windows help files (Rgui)
Hi, > # Dimensions(in characters) of the internal pager. > pgrows = 48 > pgcolumns = 128 Thanks, that worked. Regards, John. > -Original Message- > From: talepanda [mailto:[EMAIL PROTECTED] > Sent: 06 February 2007 06:37 > To: Gavin, John > Cc: R-help@stat.math.ethz.ch > Subject: Re: [R] Rconsole - setting the size and location of > Windows help files (Rgui) > > For size, maybe: > > # Dimensions(in characters) of the internal pager. > #pgrows = 25 > #pgcolumns = 80 > pgrows = 48 > pgcolumns = 128 > > in Rconsole, but location cannot be handled. > > On 2/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Using the Rconsole file I can specify the size and location > of the Rgui > > windows on NT. > > e.g. > > # Dimensions (in characters) of the console. > > rows = 51 > > columns = 100 > > > > How can I specify the size of the help windows that popups > > when I ask for help? e.g. '?help' > > I would like the popup window to have say rows = 51 and > columns = 100, > > just like the main window but a different location on the screen. > > > > In my .Rprofile file I have set 'options(winhelp=FALSE)'. > > > > platform i386-pc-mingw32 > > arch i386 > > os mingw32 > > system i386, mingw32 > > status > > major 2 > > minor 4.1 > > year 2006 > > month 12 > > day18 > > svn rev40228 > > language R > > version.string R version 2.4.1 (2006-12-18) > > > > Regards, > > > > John. > > > > John Gavin <[EMAIL PROTECTED]>, > > Commodities, FIRC, > > UBS Investment Bank, 2nd floor, > > 100 Liverpool St., London EC2M 2RH, UK. > > Phone +44 (0) 207 567 4289 This communication is issued by UBS AG and/or affiliates to\...{{dropped}} __ 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.
Re: [R] ANOVA Table for Full Linear Model?
summary.lm tells you F, df, and p value. try: summary(regression9) On 2/6/07, Jason R. Finley <[EMAIL PROTECTED]> wrote: > Hello, > I have spent a good deal of time searching for an answer to this but > have come up empty-handed; I apologize if I missed something that is > common knowledge. > > I am trying to figure out how to get an ANOVA table that shows the > sum of squares. degrees of freedom, etc, for the full model versus > the error (aka residuals). > > Here is an example of the kind of table I'd like to get: > > Analysis of Variance > Source DF SS MS FP > Regression1 8654.7 8654.7102.350.000 > Error75 6342.184.6 > Total76 14996.8 > > This kind of table is prevalent throughout my statistics textbook, > and can apparently be easily obtained in other statistical software > tools. I'm not saying this as a gripe, but just as evidence that I'm > not trying to do something obviously bizarre. > > > Here is an example of the only kind of ANOVA table for a single > linear model that I've been able to get using R: > > > regression9 <- lm(y ~ x1 + x2 + x3, data=data9) > > anova.lm(regression9) > Analysis of Variance Table > > Response: y >Df Sum Sq Mean Sq F valuePr(>F) > x1 1 8275.4 8275.4 81.8026 2.059e-11 *** > x2 1 480.9 480.9 4.7539 0.03489 * > x3 1 364.2 364.2 3.5997 0.06468 . > Residuals 42 4248.8 101.2 > --- > Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > > Is there a way to get an ANOVA table with the full linear regression > model considered as a whole rather than broken down into each > additional predictor variable? In other words, is there a way to get > the former kind of table? > > Again, apologies if I'm missing something basic. > thanks very much, > ~jason > > > PS - I am on Mac OSX 10.4.8 using R 2.4.1 GUI 1.18 (4038) > > ~ > Jason R. Finley > Graduate Student, Department of Psychology > Cognitive Division > University of Illinois, Urbana-Champaign > > [EMAIL PROTECTED] > [EMAIL PROTECTED] > http://www.jasonfinley.com/ > ~ > > __ > 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-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.