[R] Help with Flexmix- multivariate time series data

2015-02-13 Thread atesh koul
Hi all, I am trying to use R package flexmix for data clustering which I find extremely useful. I would like to know how many clusters could be there in the data and the assignment of trials to these clusters. The data are hand kinematics data- 16 variables at 10 discrete time points for 17

[R] [BUG] or [undocumented] boxplot - horizontal swaps ylim and xlim

2015-02-13 Thread Rainer M Krug
When using the function boxplot() together with the argument , | horizontal = TRUE ` xlim and ylim become swapped, i.e. ylim refers to the x-axis instead of the y-axis: --8---cut here---start-8--- x - runif(1000) boxplot(x) boxplot( x, ylim =

[R] difference between max in summary table and max function

2015-02-13 Thread Franckx Laurent
Dear all I have found out that the max in the summary of an integer vector is not always equal to the actual maximum of that vector. For example: testrow - c(1:131509) summary(testrow) Min. 1st Qu. MedianMean 3rd Qu.Max. 1 32880 65760 65760 98630 131500

Re: [R] difference between max in summary table and max function

2015-02-13 Thread Martyn Byng
Its a formatting thing, try summary(testrow,digits=20) -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Franckx Laurent Sent: 13 February 2015 11:00 To: r-help@r-project.org Subject: [R] difference between max in summary table and max function Dear all

[R-es] 2ª reunión de usuario de R de Sevilla

2015-02-13 Thread Francisco Viciana
Para los que estéis por Sevilla o cerca, el próximo martes os recuerdo que a las 20:00 en el Bulebar Café de la Alameda, tendremos la 2ª reunión del grupo de usuario de R de Sevilla, con un participante de excepción Romain François coautor de dplyr y Rccp. Mas información en este enlace:

[R] replace values in one df by values from key pairs in another df

2015-02-13 Thread arnaud gaboury
I have been searching for a while now, but can't put all pieces of the puzzle together. Goal : I want to replace all these kinds of patterns @U032FHV3S by this @agreenmamba. In a more generic way, it is replacing 'id' by user 'name'. I have two df: The first, 'history', is some message history

Re: [R] [BUG] or [undocumented] boxplot - horizontal swaps ylim and xlim

2015-02-13 Thread S Ellison
When using the function boxplot() together with the argument | horizontal = TRUE xlim and ylim become swapped, i.e. ylim refers to the x-axis instead of the y- axis: It is neither a bug nor undocumented, though the documentation is a not in ?boxplot (because xlim and ylim aren't defined

Re: [R] suggestion for optimal plotting to show significant differences

2015-02-13 Thread PIKAL Petr
Hi Rich As usual in R one can come to same result by different means. Using lme from nlme fit- lme(value ~ day, data=test, random= ~1|item) ranef(fit) (Intercept) a -4.8794330 b -3.5063635 c -1.7121614 d -0.2002288 e 0.5118846 f 1.7805122 g 3.4489819 h 4.5568079 fixef(fit)

Re: [R] SIMPLE question

2015-02-13 Thread S Ellison
I want to do a boxcox transformation, but I got this: Error: could not find function boxcox What can I do? Well, the recommended 'homework' in the posting guide would be a start. i) ??boxcox, if you have any packages installed that include something with that functionality. ii)

Re: [R] Sorting Surv objects

2015-02-13 Thread Therneau, Terry M., Ph.D.
Your work around is not as easy looking to me. Survival times come in multiple flavors: left censored, right censored, interval censored, left-truncated and right censored, and multi-state. Can you give me guidance on how each of these should sort? If a sort method is added to the package it

Re: [R] [BUG] or [undocumented] boxplot - horizontal swaps ylim and xlim

2015-02-13 Thread Rainer M Krug
S Ellison s.elli...@lgcgroup.com writes: When using the function boxplot() together with the argument | horizontal = TRUE xlim and ylim become swapped, i.e. ylim refers to the x-axis instead of the y- axis: It is neither a bug nor undocumented, though the documentation is a not in

Re: [R] problems with packages installation

2015-02-13 Thread Jeff Newmiller
I agree that the PG muddies the water a bit on this topic. However, the web page from which you downloaded the patched version warns: This is not an official release of R. Please check bugs in this version against the official release before reporting them. When a new version is under

[R] 2d rotation: vegan?

2015-02-13 Thread Randall Morris-Ostrom
I've been working at interpreting the results of a non-metric multidimensional scaling analysis. I have been using metaMDS in the vegan package because one of the benefits is that it also rotates to solution to its principal components. (Eventually I realized that there is no reason why my

Re: [R] sd, mean with a frequency distribution matrix

2015-02-13 Thread JS Huang
Hi, Try this. sd(unlist(sapply(1:dim(p)[1],function(i)rep(p[i,1],p[i,2] -- View this message in context: http://r.789695.n4.nabble.com/sd-mean-with-a-frequency-distribution-matrix-tp4703218p4703220.html Sent from the R help mailing list archive at Nabble.com.

[R] Why I am getting error when writing a function for optim?

2015-02-13 Thread Jonsson
I have three directories where there is inside each of them 5 files.each file is a matrix lines 500 and columns 300. I want to perform an optimization using values from three corresponding pixels.Finally I get a matrix of lines 500 and columns 300 for each parameter in my equation:

[R] How to get the error and error variance after HB using bayesm

2015-02-13 Thread Michael Langmaack
Hello all, I have a question concerning bayesian regression in R using the package bayesm (version 2.2-5) by Peter Rossi. I have binary choice data and estimated individual coefficients using the command rhierBinLogit(Data=Data,Mcmc=Mcmc). That worked out properly, conversion plots,

Re: [R-es] Duda sobre GLM

2015-02-13 Thread Jesus Herranz
Entiendo que el problema es que si haces una tabla de contingencia entre la variable binaria respuesta Y y la variable X que tiene 4 categorías, en esa tabla hay un 0; y por eso los beta y sus SE se disparan. Hay una regresión logística sesgada que corrige este problema, con el paquete

Re: [R] Why I am getting error when writing a function for optim?

2015-02-13 Thread S Ellison
You don't appear to be supplying a valid parameter set to optim. The first argument in optim (par) must be a vector of parameters to optimise; you're passing a vector of NAs. Thise are not finite. Also, temp is defined as a value and optim will not be able to optimise that. You need to define

Re: [R] ggplot2 shifting bars to only overlap in groups

2015-02-13 Thread John Kane
Both files came through.  The R-help list is picky. For example it will accept cat.txt but not cat.csv. Now I see what you are after. and I must admit I haven't a clue at the moment. I suspect others who know more about ggplot can help.  If not there is ggplot2 Google Groups that has a lot of

Re: [R] qq-Plot function in version 3.1.2.

2015-02-13 Thread John Fox
Dear Xavier, Perhaps you mean the qqPlot() function in the car package. If so, you should install the car package. As well, if anc0 is a linear or generalized linear model, qqPlot() has a method for plotting studentized residuals and you'd probably prefer to use that rather than extracting the

[R] lme: Can not find groupData object in a function could this be a scoping problem?

2015-02-13 Thread John Sorkin
I resolved my program by restating RStudio . . . Thanks you, John R 3.1.0, RStudio 0.98.95 Windows 7 I have written a function that uses lme: doit- function(TS,rho,premean,presd,RxEffect) { . . . # Prepare data frames for regression analyses. data -

Re: [R] How to get the error and error variance after HB using bayesm

2015-02-13 Thread ARNAB KR MAITY
Hello Michael, I have a question here. Does Bayesian paradigm deal with MSE kind of stuff? Thanks Regards, Arnab Arnab Kumar Maity Graduate Teaching Assistant Division of Statistics Northern Illinois University DeKalb, IL 60115 Email: ma...@math.niu.edu Ph: 779-777-3428 On Fri, Feb 13,

Re: [R] How to get the error and error variance after HB using bayesm

2015-02-13 Thread Bert Gunter
This is primarily about statistics, not R, and so is off topic here. I believe you would do better posting on a stats site like stats.stackexchange.com, where you could engage in a full (and likely complicated) discussion of the pros and cons of Bayesian regression vs. standard frequentist

[R] lme: Can not find groupData object in a function could this be a scoping problem?

2015-02-13 Thread John Sorkin
R 3.1.0, RStudio 0.98.95 Windows 7 I have written a function that uses lme: doit- function(TS,rho,premean,presd,RxEffect) { . . . # Prepare data frames for regression analyses. data - data.frame(group=c(rep(Cont,SS),rep(Exp,SS)), pre=pre,post=post) . . .

Re: [R] qq-Plot function in version 3.1.2.

2015-02-13 Thread Spencer Graves
On Feb 13, 2015, at 1:32 PM, CHIRIBOGA Xavier xavier.chirib...@unine.ch wrote: Hello! SORRY PROBLEMS WITH FUNCTIONS AGAIN... I NEED TO RUN A qqPlot ...I TRIED TO INSTALL IT , BUT A WARNING MESSAGE SAID qqPlot is not available for version 3.1.2. What do you want?

Re: [R] qq-Plot function in version 3.1.2.

2015-02-13 Thread Sarah Goslee
Let's see... You can spell it qqplot. You can avoid trying to install nonexistent packages with made-up names. You can learn to use www.rseek.org You can learn how to undo your caps lock key. ;) But do try the first one, in the form of ?qqplot Sarah On Fri, Feb 13, 2015 at 4:32 PM, CHIRIBOGA

Re: [R] Unable to use `eval(parse(text))' in nlme::lme

2015-02-13 Thread William Dunlap
ff - reformulate(termlabels=c(time,as.factor(gvhd)), response=yname, intercept=TRUE) If the right hand side of the formula were more complicated than an additive list of terms, say '~ time * as.factor(gvhd)' or the left side were more than a name, say 'log(yname)' you could use bquote() instead

[R] qq-Plot function in version 3.1.2.

2015-02-13 Thread CHIRIBOGA Xavier
Hello! SORRY PROBLEMS WITH FUNCTIONS AGAIN... I NEED TO RUN A qqPlot ...I TRIED TO INSTALL IT , BUT A WARNING MESSAGE SAID qqPlot is not available for version 3.1.2. qqPlot(residuals(anc0),id.method=identify) Error: could not find function qqPlot install.packages(qqPlot) Installing

Re: [R] replace values in one df by values from key pairs in another df

2015-02-13 Thread arnaud gaboury
This is the wrong part of my code. idName=users[users$id %in% ext] idname 1: U03AEKWTL agreenmamba 2: U032FHV3S poisonivy 3: U03AEKYL4 vairis Best is to use: idNames - users[pmatch(ext, users$id, duplicates.ok = T)]. This leave me with an ordered and duplicate

Re: [R] problems with packages installation

2015-02-13 Thread PIKAL Petr
Hi Jeff Can you be more specific why question about using R-devel shall be directed to R-devel help list? Posting guide tells me: R-help is intended to be comprehensible to people who want to use R to solve problems but who are not necessarily interested in or knowledgeable about

Re: [R] A portfolio return function?

2015-02-13 Thread Joshua Ulrich
Hi Ernie, You seem confused. sqrt(t(w) %*% V %*% w) calculates portfolio volatility, not returns. You can calculate portfolio volatility with PerformanceAnalytics::StdDev. require(PerformanceAnalytics) data(edhec) set.seed(21) w - runif(ncol(edhec)) w - w/sum(w) sqrt(t(w) %*% cov(edhec) %*%

Re: [R] difference between max in summary table and max function

2015-02-13 Thread Allen Bingham
I thought I'd chime in ... submitting the following: ?summary Provides the following documentation for the default for generalized argument (other than class=data.frame, factor, or matrix): ## Default S3 method: summary(object, ..., digits = max(3, getOption(digits)-3)) so passing