[R] Suggest method

2015-04-21 Thread Lalitha Kristipati
Hi, I want to do a use case in R language. My problem statement is to upgrade the passengers from one membership level to another membership level in airlines based on their characteristics. It is like customer profiling based on their usage characteristics. Suggest a method that intakes a larg

[R] rgdal installation with two versions of GDAL

2015-04-21 Thread Rob Skelly
Hello, I am using GDAL 2.0 for most of my work, but rgdal depends on GDAL < 2. I have built and installed GDAL 1.11.2 in /opt/gdal-1.11.2, and rgdal compiles and installs into R, using the following command: sudo R CMD INSTALL --configure-args="--with-gdal-config=/opt/gdal.1.11.2/bin/gdal-config"

Re: [R] high density plots using lattice dotplot()

2015-04-21 Thread Duncan Mackay
Hi Luigi I should have made up an example to make things easier when I replied today This should get you going set.seed(1) PLATE <- data.frame(Delta.Rn = rnorm(500), Cycle = rnorm(500), Well = rep(1:50, each = 10)) head(PLATE) xyplot(Delta.Rn ~ Cycle | Well, da

[R] Rtools 3.3 is not compatible with R 3.2.0.?

2015-04-21 Thread Shi, Tao
hi list, Any updates on this issue? Thank you very much! Tao > devtools::install_github("rstudio/packrat") WARNING: Rtools 3.3 found on the path at c:/Rtools is not compatible with R 3.2.0. Please download and install Rtools 3.1 from http://cran.r-project.org/bin/windows/Rtools/, remove t

Re: [R] How numerical data is stored inside ts time series objects

2015-04-21 Thread William Dunlap
> Interesting that a 2D matrix of size Nx1 is treated as a different > animal from a length N vector. I think we can call this a bug in stl(). Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Apr 21, 2015 at 6:39 PM, Paul wrote: > William Dunlap tibco.com> writes: > > Use the str() functi

Re: [R] How numerical data is stored inside ts time series objects

2015-04-21 Thread Paul
William Dunlap tibco.com> writes: > Use the str() function to see the internal structure of most > objects. In your case it would show something like: > > > Data <- data.frame(theData=round(sin(1:38),1)) > > x <- ts(Data[[1]], frequency=12) # or Data[,1] > > y <- ts(Data, frequency=12) > > str(x)

Re: [R] high density plots using lattice dotplot()

2015-04-21 Thread Duncan Mackay
Hi Luigi The layout.heights is in the wrong place try par.settings = list( strip.background=list(col="white"), axis.text = list(cex = 0.6), par.xlab.text = list(cex = 0.75), par.ylab.text = list(cex = 0.75), superpose.symbol = list(p

Re: [R] Phi coefficient matrix (package psych)

2015-04-21 Thread Kumar Mainali
Hi Jim, That solves my problem. Than you. -- Kumar ᐧ Postdoctoral Associate Fagan Lab, Department of Biology University of Maryland On Tue, Apr 21, 2015 at 5:31 PM, Jim Lemon wrote: > HI Kumar, > A simple way is: > > phimat<-function(x) { > xcol<-dim(x)[2] > newx<-matrix(NA,nrow=xcol,ncol=x

Re: [R] Rtools 3.3 is not compatible with R 3.2.0.?

2015-04-21 Thread Hadley Wickham
It's been fixed in the dev version, and I'm planning on submitting to CRAN in the near future. Hadley On Tue, Apr 21, 2015 at 6:01 PM, Shi, Tao wrote: > hi list, > > Any updates on this issue? Thank you very much! > > Tao > > >> devtools::install_github("rstudio/packrat") > WARNING: Rtools 3.3 f

Re: [R] R_Calculating Thiessen weights for an area with irregular boundary

2015-04-21 Thread Rolf Turner
(1) The manner in which you presented your data was a total mess. If you ask for help, please have the courtesy to present your data in such a manner that a potential "helper" can access it without needing to do a great deal of editing and processing. Like so: pts <- as.data.frame(matrix(c(4

Re: [R] Phi coefficient matrix (package psych)

2015-04-21 Thread Jim Lemon
HI Kumar, A simple way is: phimat<-function(x) { xcol<-dim(x)[2] newx<-matrix(NA,nrow=xcol,ncol=xcol) for(i in 1:xcol) { for(j in 1:xcol) newx[i,j]<-phi(table(x[,i],x[,j])) } rownames(newx)<-colnames(newx)<-colnames(x) return(newx) } phimat(df) Jim On Wed, Apr 22, 2015 at 6:34 AM, Kumar

[R] Phi coefficient matrix (package psych)

2015-04-21 Thread Kumar Mainali
I want to calculate phi coefficient for every pair of the columns. Is there a way to generate a matrix like a correlation matrix? I know cor function in the case below gives same answer as phi coefficient. ​x <- sample(c(0,1), 10, replace=TRUE) y <- sample(c(0,1), 10, replace=TRUE) z <- sample(c(0

[R] Exhaustive CHAID package

2015-04-21 Thread Michael Grant
Dear R-Help: >From multiple sources comparing methods of tree classification and tree >regressions on various data sets, it seems that Exhaustive CHAID (distinct >from CHAID), most commonly generates the most useful tree results and, in >particular, is more effective than ctree or rpart which a

Re: [R] Question on funcion and npar

2015-04-21 Thread Bert Gunter
Have you gone thruway any T tutorials yet? This is a very basic question that I do not believe would arise if you had done so. The answer is that it is a logical that controls whether means and sd's or medians and mads are calculated and returned. But I don't think this answer will be comprehensib

Re: [R] Question on funcion and npar

2015-04-21 Thread Marc Schwartz
> On Apr 21, 2015, at 1:05 PM, Luciano La Sala > wrote: > > Dear everyone, > > The following function, taken from Quick-R, gets measures of central tendency > and spread for a numeric vector x. > > I can't figure out what the argument npar means in each instance. > Any tips will be most appr

[R] Question on funcion and npar

2015-04-21 Thread Luciano La Sala
Dear everyone, The following function, taken from Quick-R, gets measures of central tendency and spread for a numeric vector x. I can't figure out what the argument npar means in each instance. Any tips will be most appreciated. mysummary <- function(x, npar=TRUE, print=TRUE) { if (!npar) {

Re: [R] cannot find package colbycol in R 3.2.0

2015-04-21 Thread Ye Lin
Thanks! The package still cannot be installed and I've found an alternative way which is using package "limma" On Tue, Apr 21, 2015 at 10:20 AM, Marc Schwartz wrote: > > > On Apr 21, 2015, at 12:01 PM, Ye Lin wrote: > > > > Hi All, after installing the new version of R (3.2.0), I cannot find >

Re: [R] cannot find package colbycol in R 3.2.0

2015-04-21 Thread Marc Schwartz
> On Apr 21, 2015, at 12:01 PM, Ye Lin wrote: > > Hi All, after installing the new version of R (3.2.0), I cannot find > package "colbycol", is there anyway to use it with the new version? > > I want to use function cbc.read.table, which is in package "colbycol". If > this package is no longer

[R] cannot find package colbycol in R 3.2.0

2015-04-21 Thread Ye Lin
Hi All, after installing the new version of R (3.2.0), I cannot find package "colbycol", is there anyway to use it with the new version? I want to use function cbc.read.table, which is in package "colbycol". If this package is no longer available in the new version, is there anyway around it? Tha

[R] R_Calculating Thiessen weights for an area with irregular boundary

2015-04-21 Thread Manoranjan Muthusamy
Hi R users, I want to calculate Thiessen weights to compute areal rainfall from number of point measurements. I am using R and thanks to some previous question in the same topic, I got to know that I can usedeldir. But the problem is my boundary polygon is not a rectangle; it's an irregular polygo

Re: [R] Two Factorial Experiment with a Single Control Group

2015-04-21 Thread Darcy Trimpe
Good Morning, I am not asking for a method by how to implement, if possible, the method in R. I am pretty confident of my statistical approach, I do not want to do it by hand :-). Although, I do have the formulas to do it by hand. The groups are measured once. The animal is treated short or lo

Re: [R] Two Factorial Experiment with a Single Control Group

2015-04-21 Thread Darcy Trimpe
The statistical analysis I want to conduct is a 2x2 factorial analysis with a single control group. There are 3 animals per group.The low n is accepted in my area of research. My factors are Treatment (No Treatment and Treatment) and Duration (Acute and 3 weeks). The No Treatment level represent

Re: [R] Metafor - rma.mv function - variance components

2015-04-21 Thread Michael Dewey
Dear Carlijn You might shed some light on what is going on by using profile.rma.mv Michael On 21/04/2015 09:42, Carlijn Wibbelink wrote: Thank you for your reaction, it worked. However, I'm wondering if this is the right way to test whether there is significant variation on one of the two leve

Re: [R] Predict in glmnet for Cox family

2015-04-21 Thread Therneau, Terry M., Ph.D.
On 04/21/2015 05:00 AM, r-help-requ...@r-project.org wrote: Dear All, I am in some difficulty with predicting 'expected time of survival' for each observation for a glmnet cox family with LASSO. I have two dataset 5 * 450 (obs * Var) and 8000 * 450 (obs * var), I considered first one as t

Re: [R] Metafor - rma.mv function - variance components

2015-04-21 Thread Viechtbauer Wolfgang (STAT)
This is correct (for getting likelihood ratio tests). Manually setting a component to 0 is also the same as just leaving out the corresponding random effect. So, you could also do: model2 <- rma.mv(y, v, random = list(~ 1 | y, ~ 1 | ID), data=dat) model3 <- rma.mv(y, v, random = ~ 1 | y, data=da

Re: [R] Metafor - rma.mv function - variance components

2015-04-21 Thread Carlijn Wibbelink
Thank you for your reaction, it worked. However, I'm wondering if this is the right way to test whether there is significant variation on one of the two levels. The results of the anova tests do not correspond to the results of the Z-test in metaSEM. (In metaSEM only one of the variances is sign

[R] Multinomial Fitting Distrbution

2015-04-21 Thread Alaios via R-help
Dear all,I am trying to fit a heavy tailed distribution and I have tried working with the mix function of the mixdist package.It looks like that this package allows fitting two distributions (or move) of the same family  and not combining different distributions (so mixing a geometric with a nor