Re: [R] sorting a dataframe

2015-06-21 Thread Bert Gunter
Diego: Nonsense! Look at the results of your code -- you have failed to order the results as had been requested by the OP. It's also unnecessarily complicated. The following suffices (where I have used regular expressions rather substring() to get the numeric part of the strings -- **assuming**

Re: [R] sorting a dataframe

2015-06-21 Thread Diego Miro
Bogdan, Follow my suggestion. letter - substring(A, 1, 1) number - substring(A, 2, nchar(A)) new.data - paste0(letter, formatC(as.numeric(number), width = 2, flag = 0)) Em 20/06/2015 21:21, Bogdan Tanasa tan...@gmail.com escreveu: Dear all, I am looking for a suggestion please regarding

[R] Obtaining the Hessian for the last iteration of a BFGS in optimx

2015-06-21 Thread Olu Ola via R-help
Hello, I am running a BFGS using optimx and would like to obtain the Hessian for the last iteration. How can I go about this? Thank you __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] two problems

2015-06-21 Thread Jeff Newmiller
I an not aware of any function or package named qcomhd in base R or in the CRAN contributed packages, nor did it turn up when I went searching for it there, so your failure to access it seems unsurprising. Google does find some references to a Github package called WRS that supposedly contains

Re: [R] sorting a dataframe

2015-06-21 Thread Bogdan Tanasa
Thank you all again. It works with : library(gtools) dat[mixedorder(A),] considering : A = c(A1,A10,A11,A2) B = c(1,2,3,4) dat = data.frame(A,B On Sun, Jun 21, 2015 at 10:52 AM, Bert Gunter bgunter.4...@gmail.com wrote: Diego: Nonsense! Look at the results of your code -- you have failed

Re: [R] more complex by with data.table???

2015-06-21 Thread Arunkumar Srinivasan
Ramiro, `dt[, lapply(.SD, mean), by=name]` is the idiomatic way. I suggest reading through the new HTML vignettes at https://github.com/Rdatatable/data.table/wiki/Getting-started Ista, thanks for linking to the new vignette. On Wed, Jun 10, 2015 at 2:17 AM, Ista Zahn istaz...@gmail.com wrote:

[R] two problems

2015-06-21 Thread Juan Wu
Hi, list experts I am totally a new user of the R package. I just tried to use qcomhd, but it gives me an error alarm, as below. qcomhd(RT1, RT2, q = seq(.1, .9, by=.1)) Error: could not find function qcomhd Then I try to install it, however, it seems that I am not able to install it. Also, in