Re: [R] Equivalent of gtools::mixedsort in R base

2018-03-11 Thread Bert Gunter
??? > y <- sort( c("a1","a2","a10","a12","a100")) > y [1] "a1" "a10" "a100" "a12" "a2" > mixedsort(y) [1] "a1" "a2" "a10" "a12" "a100" **Please read the docs!** They say that mixedsort() and mixedorder() both take a **single vector** as the argument to be sorted or ordered and, as

[R] Equivalent of gtools::mixedsort in R base

2018-03-11 Thread Sebastien Bihorel
Hi, Searching for functions that would order strings that mix characters and numbers in a "natural" way (ie, "a1 a2 a10" instead of "a1 a10 a2"), I found the mixedsort and mixedorder from the gtools package. Problems: 1- mixedorder does not work in a "do.call(mixedorder, mydataframe)" call

[R] Dataframe Subsetting comparison

2018-03-11 Thread Neha Aggarwal
Hello All, I am facing a unique issue and am unable to find any help in R help pages or online. I will appreciate your help for the following problem: I have 2 data-frames, samples below and there is an expected output R Dataframe1: C1 C2 C3 C4.. CN R1

[R] Subsetting comparison problem

2018-03-11 Thread Neha Aggarwal
Hello All, I am facing a unique problem and am unable to find any help in R help pages or online. I will appreciate your help for the following problem: I have 2 data-frames, samples below and there is an expected output R Dataframe1: C1 C2 C3 C4.. CN R1

[R] Fwd: subsetting comparison problem

2018-03-11 Thread Neha Aggarwal
Hello All, I am facing a unique problem and am unable to find any help in R help pages or online. I will appreciate your help for the following problem: I have 2 data-frames, samples below and there is an expected output R Dataframe1: C1 C2 C3 C4.. CN R1

Re: [R] subsetting comparison problem

2018-03-11 Thread Jim Lemon
Hi Neha, This might help: R<-read.table(text="C1 C2 C3 C4 R1 0 1 0 1 R2 1 0 1 1 R3 1 0 0 0", header=TRUE) U<-read.table(text="C1 C2 C3 C4 U1 1 1 0 1 U2 1 1 1 1", header=TRUE) # these are matrices - I think this will work for dataframes as well for(ui in 1:dim(U)[1]) { for(ri in 1:dim(R)[1]) {

Re: [R] Empirical density estimation

2018-03-11 Thread Jeff Newmiller
cwhmisc package provides essentially the algorithm outlined by Dan. If you want answers outside your original data (extrapolation) then the following code at least won't give broken answers, though it is not necessarily any more "correct" for extrapolation than the approx solution is.

Re: [R] subsetting comparison problem

2018-03-11 Thread David Winsemius
> On Mar 11, 2018, at 3:32 PM, Neha Aggarwal wrote: > > Hello All, > I am facing a unique problem and am unable to find any help in R help pages > or online. I will appreciate your help for the following problem: > I have 2 data-frames, samples below and there is an

Re: [R] subsetting comparison problem

2018-03-11 Thread Jeff Newmiller
Responses inline. On Sun, 11 Mar 2018, Neha Aggarwal wrote: Hello All, I am facing a unique problem and am unable to find any help in R help pages or online. I will appreciate your help for the following problem: I have 2 data-frames, samples below and there is an expected output R

Re: [R] Empirical density estimation

2018-03-11 Thread Daniel Nordlund
On 3/11/2018 3:35 PM, Christofer Bogaso wrote: But for my reporting purpose, I need to generate a bell curve like plot based on empirical PDF, that also contains original points. Any idea would be helpful. Thanks, Christofer, something like the following may get you what you want: ## get

[R] subsetting comparison problem

2018-03-11 Thread Neha Aggarwal
Hello All, I am facing a unique problem and am unable to find any help in R help pages or online. I will appreciate your help for the following problem: I have 2 data-frames, samples below and there is an expected output R Dataframe1: C1 C2 C3 C4.. CN R1

Re: [R] Empirical density estimation

2018-03-11 Thread Christofer Bogaso
But for my reporting purpose, I need to generate a bell curve like plot based on empirical PDF, that also contains original points. Any idea would be helpful. Thanks, On Mon, Mar 12, 2018 at 3:49 AM, Bert Gunter wrote: > You need to re-read ?density and perhaps think

Re: [R] Empirical density estimation

2018-03-11 Thread Jim Lemon
Hi Christofer, You may be looking for ecdf (stats) for a start, then working out a way to translate the cumulative density values into probability values. Jim On Mon, Mar 12, 2018 at 5:45 AM, Christofer Bogaso wrote: > Hi, > > Let say I have below vector of

Re: [R] Empirical density estimation

2018-03-11 Thread Bert Gunter
You need to re-read ?density and perhaps think again -- or do some study -- about how a (kernel) density estimate works. The points at which the estimate is calculated are *not* the values given, nor should they be! Cheers, Bert Bert Gunter "The trouble with having an open mind is that people

[R] Empirical density estimation

2018-03-11 Thread Christofer Bogaso
Hi, Let say I have below vector of data-points : Dat = c(-0.444, -0.25, -0.237449799196787, -0.227467046669042, -0.227454464682363, -0.22, -0.214876033057851, -0.211781206171108, -0.199891067538126, -0.192920353982301, -0.192307692307692, -0.186046511627907, -0.184418145956608,

Re: [R] Your browser do not suport oracle bi presentation services

2018-03-11 Thread KENNETH ROY CABRERA TORRES
Thank you José María: You are very kind. I will study and use your advice. The first step, takes more information, but not what I want. (I want the whole data set of "TRM"). I'm going to try with Selenium (RSelenium). Thank you very much for your help. Kenneth - Mensaje original -

Re: [R] Your browser do not suport oracle bi presentation services

2018-03-11 Thread José María Mateos
On Sun, Mar 11, 2018 at 09:12:56AM -0500, KENNETH ROY CABRERA TORRES wrote: > Hi dear R users: > > I'm trying the following code to download an information from the web. > > url1 <- >

[R] Your browser do not suport oracle bi presentation services

2018-03-11 Thread KENNETH ROY CABRERA TORRES
Hi dear R users: I'm trying the following code to download an information from the web. url1 <-