Re: [R] ggplot2 geom_bar arrangement

2017-06-27 Thread Thomas Mailund
The order the bars are plotted in is determined by the levels in a factor, and your labels are treated as a factor. You can make sure you keep the order of your labels by simply doing this: Lab <- factor(Lab, levels = Lab) before constructing the data frame. Cheers On 27 Jun 2017, 20.43 +0200

Re: [R] Nash equilibrium and other game theory tools implemented in networks using igraph or similar

2017-06-27 Thread Suzen, Mehmet
Why don't you implement and uplad the package to CRAN? On 27 Jun 2017 17:45, "Chris Buddenhagen" wrote: Does anyone know of some code, and examples that implement game theory/Nash equilibrium hypothesis testing using existing packages like igraph/statnet or similar? Perhaps along the lines of t

[R] Finding optim.R function

2017-06-27 Thread Tauras Vilgalys
Hello, could anybody direct me where to find code for optim.R? I was able to find the C code at http://docs.rexamine.com/R-devel/optim_8c.html, but the R version would be easier for me to work with and modify. Thank you! [[alternative HTML version deleted]] __

Re: [R] Nash equilibrium and other game theory tools implemented in networks using igraph or similar

2017-06-27 Thread Rui Barradas
Hello, A Google search for "R package Local Nash Equilibrium" got https://cran.r-project.org/web/packages/GNE/GNE.pdf as the first hit. Hope this helps, Rui Barradas Em 27-06-2017 16:45, Chris Buddenhagen escreveu: Does anyone know of some code, and examples that implement game theory/Nash

Re: [R] Fwd: Please help(immediate) - How to simulate transactional data for reliability/survival analysis

2017-06-27 Thread Bert Gunter
There is no member id. Anyone can sign up to post on this list. I already responded to your prior post. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) O

[R] Fwd: Please help(immediate) - How to simulate transactional data for reliability/survival analysis

2017-06-27 Thread Sunny Singha
I apologise as I had mistakenly posted this message via non- member mail. So I'm reposting it with member id. I need help in this case. > Hi friends, > I haven't done such a simulation before and any help would be greatly > appreciated. I need your guidance. > > I need to simulate end to end

Re: [R] ggplot2 geom_bar arrangement

2017-06-27 Thread Brian Smith
Thanks Jean, that worked! On Tue, Jun 27, 2017 at 3:58 PM, Adams, Jean wrote: > You just have to change the levels of the factor ... > > library(ggplot2) > > Lab = c(letters[4:6], letters[1:3]) > valuex = c(3.1,2.3,0.4,-0.4,-1.2,-4.4) > df <- data.frame(Lab,valuex) > > # set the factor levels to

[R] ggplot2 geom_bar label justification

2017-06-27 Thread Brian Smith
Hi, I was trying to make a horizontal bar plot. The barplot works when the text labels are of reasonable length, but not if some of them are slightly long. I think the long ones get 'squeezed' by default before the plot is flipped and keep the skew after the flip. Is there a way I can get around t

Re: [R] ggplot2 geom_bar arrangement

2017-06-27 Thread Adams, Jean
You just have to change the levels of the factor ... library(ggplot2) Lab = c(letters[4:6], letters[1:3]) valuex = c(3.1,2.3,0.4,-0.4,-1.2,-4.4) df <- data.frame(Lab,valuex) # set the factor levels to the same order as observed in the data frame df$Lab <- factor(df$Lab, levels=unique(df$Lab)) p

[R] ggplot2 geom_bar arrangement

2017-06-27 Thread Brian Smith
Hi, I was trying to draw a geom_bar plot. However, by default, the bars are arranged according to the label, which I don't want. I want the bars to appear exactly as they appear in the data frame. For example in the code: Lab=c(letters[4:6],letters[1:3]) valuex = c(3.1,2.3,0.4,-0.4,-1.2,-4.4)

[R] Nash equilibrium and other game theory tools implemented in networks using igraph or similar

2017-06-27 Thread Chris Buddenhagen
Does anyone know of some code, and examples that implement game theory/Nash equilibrium hypothesis testing using existing packages like igraph/statnet or similar? Perhaps along the lines of this article: Zhang, Y., Aziz-Alaoui, M. A., Bertelle, C., & Guan, J. (2014). Local Nash Equilibrium in Soc

Re: [R] Please help(urgent) - How to simulate transactional data for reliability/survival analysis

2017-06-27 Thread Bert Gunter
I think you need to find a local consultant. Someone here might have a suggestion or two where to look (as I do below), but this list only provides help on R programming code, not statistical issues (see programming guide below for details). You might wish to have a look at the CRAN survival analy

[R] Please help(urgent) - How to simulate transactional data for reliability/survival analysis

2017-06-27 Thread sandeep Rana
Hi friends, I haven't done such a simulation before and any help would be greatly appreciated. I need your guidance. I need to simulate end to end data for Reliability/survival analysis of a Pump ,with correlation in place, that is at 'Transactional level' or at the granularity of time-minutes

Re: [R] Wrong function when import from module using get

2017-06-27 Thread Jakub Jankiewicz
By module I mean a package instaled using: R CMD INSTAL /path/ On Tue, 27 Jun 2017 10:06:16 +0200 Jakub Jankiewicz wrote: > Hi, > > I found this issue: > > when I have 3 modules: > > * AnalysisA > * AnalysisB > * AnalysisC > > I load all modules at the beginning from list of modules: > > a

[R] Wrong function when import from module using get

2017-06-27 Thread Jakub Jankiewicz
Hi, I found this issue: when I have 3 modules: * AnalysisA * AnalysisB * AnalysisC I load all modules at the beginning from list of modules: analyses <- list('AnalysisA', 'AnalysisB', 'AnalysisC') for (module in analyses) { library(module, character.only = TRUE) } and I want to add a func

Re: [R] [Rd] setReplaceMethod creates 'object' in the userworkspace

2017-06-27 Thread Martin Maechler
> Jonathan Fritzemeier > on Fri, 23 Jun 2017 16:15:30 +0200 writes: > Hi, > I recognized that the function 'setReplaceMethod' is creating a > character vector in the user workspace having the name (e.g. "newClass") > of the class used as value. If you can sort out a mi