Re: [R] R / JMP interface

2014-05-08 Thread Meyners, Michael
Not sure about JMP 11, but remember that JMP 10 did not run with R version = 3.0.0 It depends a bit on the changes that come with new R versions; with JMP 10, several versions of the 2.x series were compatible even though JMP officially only supported earlier versions. I had hoped that with

Re: [R] Fitting a Mixture of Noncentral Student t Distributions to a one-dimensional sample

2014-05-08 Thread Ingmar Visser
Hi Johannes, Below code gives good results for me; note that trying multiple starting is often important in fitting mixture models, even in simple cases like this. Note also that the sigma and nu parameters in gamlssMX are fitted on a log scale, hence the possible occurrence of negative results.

Re: [R] R / JMP interface

2014-05-08 Thread Robert Douglas Kinley
thanks Michael. That fits in with the response from JMP and with the experience of colleagues. Guess I'll just stick with R :) cheers Bob -Original Message- From: Meyners, Michael [mailto:meyner...@pg.com] Sent: 08 May 2014 07:20 To: Samuel J Gardner; Robert Douglas

[R] problem in r-code

2014-05-08 Thread thanoon younis
dear all members is there anyone explain to me the code below and how can i transfer this code to winbugs program. q[i,1]=qnorm(runif(1,min=.5,max=1),0,1) thanks in advance thanoon [[alternative HTML version deleted]] __

[R] group by and merge two dataframes

2014-05-08 Thread Massimo Bressan
given this bare bone example: df1 - data.frame(id=rep(1:3,each=2), item=c(rep(A,2), rep(B,2), rep(C,2))) df2 - data.frame(id=c(1,2,3), who=c(tizio,caio,sempronio)) I need to group the first dataframe df1 by id and then merge with the second dataframe df2 (again by id) so far I've manged to

Re: [R] MRF smoothers in MGCV - specifying neighbours

2014-05-08 Thread Roger Bivand
Mark Payne markpayneatwork at gmail.com writes: Hi, Does anyone have an example of a Markov Random Field smoother (MRF) in MGCV where they have specified the neighbourhood directly, rather than supplying polygons? Does anyone understand how the rules should be? Based on the columb

Re: [R] group by and merge two dataframes

2014-05-08 Thread Rui Barradas
Hello, There are some alternatives without using sqldf or another package. 1. tmp2 - aggregate(item ~ id, data = df1, FUN = unique) Then merge() like you've done. 2. tmp3 - merge(df1, df2) tmp3[!duplicated(tmp3), ] Hope this helps, Rui Barradas Em 08-05-2014 10:44, Massimo Bressan

[R] R for Android

2014-05-08 Thread Kevin E. Thorpe
This is a question asked purely out of idle curiosity (and may also be in wrong list). Are there plans for porting R to Android devices or chromebooks? Maybe it's as simple as compiling the source, but I don't know what tools are available. One of the current advantages of R is it runs on all

Re: [R] Outlier Detection with k-Means

2014-05-08 Thread marioger
Thank you very much. This was exactly what I was looking for. -- View this message in context: http://r.789695.n4.nabble.com/Outlier-Detection-with-k-Means-tp4690098p4690186.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] MRF smoothers in MGCV - specifying neighbours

2014-05-08 Thread Simon Wood
Hi Mark, I'm not sure what is happening here - there is no chance that nb.l contains a neighbourhood not in the levels of obs$xy.idx, I suppose? i.e. is all(names(nb.l)%in%levels(obs$xy.idx)) also TRUE? Here is some code illustrating what nb should look like (and in response to Roger

Re: [R] MRF smoothers in MGCV - specifying neighbours

2014-05-08 Thread Mark Payne
Hi Roger and Simon, Thanks for the replies. Simon's suggestion of an isolated or missing neighbourhood doesn't hold either. I've attached the code below - its my attempt to solve the FELSPLINE sausage using mrf rather than a soap smoother. Its a bit convoluted, but should run ok. I thought this

Re: [R] group by and merge two dataframes

2014-05-08 Thread arun
Hi, May be this helps:  merge(unique(df1),df2) A.K. On Thursday, May 8, 2014 5:46 AM, Massimo Bressan mbres...@arpa.veneto.it wrote: given this bare bone example: df1 - data.frame(id=rep(1:3,each=2), item=c(rep(A,2), rep(B,2), rep(C,2))) df2 - data.frame(id=c(1,2,3),

Re: [R] MRF smoothers in MGCV - specifying neighbours

2014-05-08 Thread Simon Wood
Hi Mark, The problem here is that the constructor expects there to be at least one observation per location. The nb.l list has neighbourhood information for 166 locations, while the 'obs' data contains observations for only 99 of them (unique(obs$xy.idx)). The solution probably requires

Re: [R] R for Android

2014-05-08 Thread Jeremy Miles
It exists: https://play.google.com/store/apps/details?id=com.appsopensource.R No graphics. Jeremy On 8 May 2014 05:44, Kevin E. Thorpe kevin.tho...@utoronto.ca wrote: This is a question asked purely out of idle curiosity (and may also be in wrong list). Are there plans for porting R to

Re: [R] R for Android

2014-05-08 Thread Kevin E. Thorpe
Thanks. I guess I could have searched for that. Apologies. I'll have to try it on my tablet. Kevin On 05/08/2014 11:57 AM, Jeremy Miles wrote: It exists: https://play.google.com/store/apps/details?id=com.appsopensource.R No graphics. Jeremy On 8 May 2014 05:44, Kevin E. Thorpe

Re: [R] group by and merge two dataframes

2014-05-08 Thread Massimo Bressan
yes, thank you for all your replies, they worked out correctly indeed... ...but because of my fault, by then working on my real data I fully realised that I should have mentioned something that is changing (quite a lot, in fact) the terms of the problem... please would you consider the

Re: [R] group by and merge two dataframes

2014-05-08 Thread arun
Hi, May be: indx - !duplicated(as.character(interaction(df1[,-3]))) merge(df1[indx,],df2) A.K. On Thursday, May 8, 2014 12:34 PM, Massimo Bressan mbres...@arpa.veneto.it wrote: yes, thank you for all your replies, they worked out correctly indeed... ...but because of my fault, by then

[R] Capture change in variable in R

2014-05-08 Thread Abhinaba Roy
Hi R helpers, I have a dataframe like ID Yr_Mnth AMT_PAID AMT_DUEpaidToDue CS0026A201301 320.48 19040.168319328 CS0026A2013024881.31157080.310753119 CS0026A2013037609.04255850.297402384 CS0026A201304

Re: [R] Capture change in variable in R

2014-05-08 Thread David Winsemius
On May 8, 2014, at 9:49 AM, Abhinaba Roy wrote: Hi R helpers, I have a dataframe like ID Yr_Mnth AMT_PAID AMT_DUEpaidToDue CS0026A201301 320.48 19040.168319328 CS0026A2013024881.31157080.310753119 CS0026A201303

[R] How can I make this nested loop faster?

2014-05-08 Thread Ludwig Hilger
Hello everybody, I have written a nested for-loop, but as length(uc) 170,000, this would take VERY long. I have tried to use sapply or something but I cannot get it to work, I would be happy if someone could point out to write this more efficiently. Thank you all, Ludwig ergsens -

Re: [R] How can I make this nested loop faster?

2014-05-08 Thread William Dunlap
I cannot run your code because not all the variables are defined, but try not doing the nested replacements, rftab$masskg[...] - newValue, in the loop. Instead, pull out masskg as a new stand-along object before the start of the loop and put it back into rftab at the end of the loop. E.g.,

Re: [R] overdispersed zero inflated continuous data

2014-05-08 Thread Ben Bolker
Jenushka jhazlehu at tulane.edu writes: I'm a beginning R user. The data: Volume of nectar in flowers under 4 different treatments, nested for individual (measures were taken mutliple times from different flowers of the same individual- never the same flower). This is really more

Re: [R] as.character(quote(x$y) ) = $ x y not x$y?

2014-05-08 Thread Spencer Graves
as.character.call seems not to work as an alias for deparse. Consider the following: xDy - quote(x$y) class(xDy) call as.character.call - function(x, ...)deparse(x, ...) as.character(xDy) [1] $ x y # fails str(xDy) # language x$y as.character.language - function(x, ...)language

Re: [R] as.character(quote(x$y) ) = $ x y not x$y?

2014-05-08 Thread Bert Gunter
[1] x$y Spencer: Does deparse(substitute(x$y)) [1] x$y do what you want? Cheers, Bert -- Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is not information. Information is not knowledge. And knowledge is certainly not wisdom. H. Gilbert Welch On Thu, May

Re: [R] as.character(quote(x$y) ) = $ x y not x$y?

2014-05-08 Thread Spencer Graves
On 5/8/2014 8:05 PM, Bert Gunter wrote: [1] x$y Spencer: Does deparse(substitute(x$y)) [1] x$y do what you want? No: The problem is methods dispatch. class(quote(x$y)) = 'call', but as.character(quote(x$y)) does NOT go to as.character.call. deparse(quote(x$y)) returns

[R] Error in split.default

2014-05-08 Thread Jason Rupert
split(df, Status) Error in split.default(x = seq_len(nrow(x)), f = f, drop = drop, ...) :   object 'Status' not found names(PCR_duplicatedCheck_df)  [1] Key  MinCreated  MaxUpdated   [4] Status I am totally confused...what do I need to try next?

Re: [R] set axis limit in lattice

2014-05-08 Thread Duncan Mackay
Luigi I suspect that it is in accessing the correct groups within the panel function I suggest that printing the values before plotting within the panel function may give you some idea. Without specific data I cannot suggest anything else Duncan -Original Message- From: Luigi

Re: [R] Error in split.default

2014-05-08 Thread Jim Lemon
On Thu, 8 May 2014 09:01:06 PM Jason Rupert wrote: split(df, Status) Error in split.default(x = seq_len(nrow(x)), f = f, drop = drop, ...) : object 'Status' not found names(PCR_duplicatedCheck_df) [1] Key MinCreated MaxUpdated [4] Status I am totally confused...what

[R] Help with passing in name of XTS file into write.table as a variable.

2014-05-08 Thread yanni...@gmail.com
Hi y'all, I'm using quantmod's getSymbols function, which retrieves data in XTS format. I'm trying to pass IBM into the ticker variable, then write the table referencing ticker. However, when I run the write.table command, it writes IBM, not the data inside IBM. Do you have any thoughts on how

[R] how di I write a for loop in which i is in POSIX?

2014-05-08 Thread peregrine
Hallo, I have a table in which I would like to insert the min and max values of another colum (date and time in as.POSIXct Format). This is my row table, where su and sa are still the same as Vollzeit: head(treat) Vollzeit Datum Zugnacht su

[R] How to write a loop in which i has to be in POSIX format?

2014-05-08 Thread peregrine
Hallo, I have a table in which I would like to insert the min and max values of another column (date and time in as.POSIXct Format). This is my row table, where su and sa are still the same as Vollzeit: head(treat) Vollzeit Datum Zugnacht su

[R] GLMNet Question for Multinomial Data For Determining The Right Number of Questions

2014-05-08 Thread bill messina
I just started to use the Glmnet function for doing analysis of multinomial data. See the attached code for the analysis of the Fisher iris data as an example. My question is. When I want to determine the coefficients for the best lambda value, it returns more than one set of coefficents..

[R-es] Error al comprobar el pakete

2014-05-08 Thread Daliana Ramos Garcia
hola, estoy creando un paquete en R y me da el siguiente error, si alguien sabe como solucionarlo espero su ayuda. LaTeX errors when creating PDF version. This typically indicates Rd problems. * checking PDF version of manual without hyperrefs or index ... ERROR Re-running with no