[R] Help to simulate data to model pump failure use case

2017-06-15 Thread Sunny Singha
Hi, I need help to simulate data to model pump's failure. Below is thought process to simulate the data: - For each Pump readings are captured via sensors each minute for period of 3 months. There are 10 pumps in total. - The failure rate or occurrences of event in 3 months for each Pump is defined

[R] Generate correlated expontial distribution -- lamda please guide

2017-06-15 Thread Sunny Singha
Hi, I need to generate correlated (positive as well as negative) bivariate exponential distribution with rate of 1/5 or any rate I need some guidance here. Please help. Regards, Sunny __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

Re: [R] (no subject)

2017-06-15 Thread David Winsemius
> On Jun 15, 2017, at 3:05 PM, oussama bouldjedri > wrote: > > Hi every one I am working on shiny app using bnlearn for Bayesian networks > and using r studio I get a fatal error and when I use R GUI I get this error > > ** caught segfault *** > > address 0xfffc0fcd6248, cause 'memory no

[R] (no subject)

2017-06-15 Thread oussama bouldjedri
Hi every one I am working on shiny app using bnlearn for Bayesian networks and using r studio I get a fatal error and when I use R GUI I get this error ** caught segfault *** address 0xfffc0fcd6248, cause 'memory not mapped' Traceback: 1: .Call("mappred", node = node, fitted = fitted, data =

Re: [R] about fitting a regression line

2017-06-15 Thread Don McKenzie
Did you perhaps accidentally include your response as a predictor? > On Jun 15, 2017, at 12:48 PM, lily li wrote: > > Thanks for your replies. I tried the regression, but then got a NA value > for the slope. And here is the error message: > Coefficients: (1 not defined because of singularities)

Re: [R] "reverse" quantile function

2017-06-15 Thread Andras Farkas via R-help
David, thanks for the response. In your response the quantile function (if I see correctly) runs on the columns versus I need to run it on the rows, which is an easy fix, but that is not exactly what I had in mind... essentially we can remove t() from my original code to make "res" look like t

Re: [R] "reverse" quantile function

2017-06-15 Thread David Winsemius
> On Jun 15, 2017, at 12:37 PM, Andras Farkas via R-help > wrote: > > Dear All, > > we have: > > t<-seq(0,24,1) > a<-10*exp(-0.05*t) > b<-10*exp(-0.07*t) > c<-10*exp(-0.1*t) > d<-10*exp(-0.03*t) > z<-data.frame(a,b,c,d) > > res<-t(apply(z, 1, quantile, probs=c(0.3))) > > > > my goa

Re: [R] Changing font of a certrain column in an excel file

2017-06-15 Thread Jim Lemon
Hi Persian, While this is not a forum for Excel: Right click on the alphabetic label at the top of the column Select "Format Cells" Select the "Font" tab Pick your font I will leave it to others to deliver sermons about the moral dangers of using Excel. Jim On Thu, Jun 15, 2017 at 10:33 PM, Per

Re: [R] glmmTMB

2017-06-15 Thread David Winsemius
> On Jun 15, 2017, at 9:53 AM, Alice Domalik wrote: > > Hi List, > > I'm having some trouble finding documentation for the package glmmTMB. I had no trouble finding documentation with the search strategy copied from your sentence: "documentation for the package glmmTMB." Can you describe w

Re: [R] about fitting a regression line

2017-06-15 Thread William Dunlap via R-help
You really have to show what you did to get the result you showed. E.g., something like the following: > d <- data.frame(x=1:7, y=c(7,4,2,3,6,8,7)) > fit <- lm( y~cos(x), data=d) > coef(fit) (Intercept) cos(x) 5.0791903.022805 > sfit <- summary(fit) > sfit$r.squared [1] 0.9915548 > wi

Re: [R] about fitting a regression line

2017-06-15 Thread Christopher W Ryan
Rather than just posting your error message, it helps immensely to post the code that produced the error--indeed with some small sample data that reproduces the problem. x <- rnorm(40) y <- 0.6 * x + rnorm(40, sd = 0.3) plot(y ~ x) model <- lm(y ~ cos(x)) summary(model) plot(y ~ cos(x)) abline(mod

Re: [R] about fitting a regression line

2017-06-15 Thread lily li
Thanks for your replies. I tried the regression, but then got a NA value for the slope. And here is the error message: Coefficients: (1 not defined because of singularities) On Thu, Jun 15, 2017 at 12:20 AM, PIKAL Petr wrote: > Hi > > But X can be some function like - sin, cos, log, exp... > >

[R] "reverse" quantile function

2017-06-15 Thread Andras Farkas via R-help
Dear All, we have: t<-seq(0,24,1) a<-10*exp(-0.05*t) b<-10*exp(-0.07*t) c<-10*exp(-0.1*t) d<-10*exp(-0.03*t) z<-data.frame(a,b,c,d) res<-t(apply(z, 1, quantile, probs=c(0.3))) my goal is to do a 'reverse" of the function here that produces "res" on a data frame, ie: to get the answer

[R] Estimating Unbiased Standard Deviation with Autocorrelation

2017-06-15 Thread Robert McGehee
Hello, I have a vector of values with significant autocorrelation, and I want to calculate an unbiased standard deviation that adjusts for the autocorrelation. The formula linked below purports to provide what I want: https://en.wikipedia.org/wiki/Unbiased_estimation_of_standard_deviation#Effect

[R] glmmTMB

2017-06-15 Thread Alice Domalik
Hi List, I'm having some trouble finding documentation for the package glmmTMB. I would like to fit a zero-truncated poisson, what do I need to specify in "family = " for this distribution? Thanks! Alice [[alternative HTML version deleted]] _

Re: [R] is.null(mylist[1]) and is.null(mylist$a) returns different values

2017-06-15 Thread Massoud Boroujerdi
I think look at the manual Is.null(mylist[[1]]) Will work -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of ce Sent: 15 June 2017 16:33 To: r-help@r-project.org Subject: [R] is.null(mylist[1]) and is.null(mylist$a) returns different values Hi I have a l

Re: [R] is.null(mylist[1]) and is.null(mylist$a) returns different values

2017-06-15 Thread Rui Barradas
Hello, You have to be aware that mylist[1] and mylist[[1]] are different things. class(mylist[1]) [1] "list" class(mylist[[1]]) [1] "NULL" Apparently you want/need the latter: is.null(mylist[[1]]) [1] TRUE Hope this helps, Rui Barradas Em 15-06-2017 16:33, ce escreveu: Hi I have a list

Re: [R] understanding I() in lmer formula

2017-06-15 Thread Don Cohen
The suggestion to post on R-sig-ME was a good one. The problem turned out to be a bug in lmer parsing, which is now fixed. S Ellison writes: > > Is there a difference between I(x*y) and I(y*x) ? > > I have a call to lmer that results in this complaint: > > Error in is.alpha2.subordinate * ~z

[R] Changing font of a certrain column in an excel file

2017-06-15 Thread Persian Irani
Hi all! I need an example/reference to show me how to change the font of a certain column in an existing .xlsx document. Thank you in advance __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-he

Re: [R] draw stripes in a circle in R

2017-06-15 Thread David Winsemius
> On Jun 15, 2017, at 1:35 AM, jean-philippe > wrote: > > hi david > > Thank you very much for the hack of draw.circle that you proposed me. > I don't understand some part of the code, why do you pass radius as a vector > in the function (if I understand well the purpose of the for loop) ? Al

Re: [R] is.null(mylist[1]) and is.null(mylist$a) returns different values

2017-06-15 Thread William Dunlap via R-help
By the way, NULL is not a "null list", it has class (and type and mode) "NULL" not "list". "NULL" is an odd class, in that it can have only one instance and hence can never have any attributes. "list" objects, like other vector objects, may have length zero, but such objects are not the same as

Re: [R] is.null(mylist[1]) and is.null(mylist$a) returns different values

2017-06-15 Thread ce
Thank you all , very informative, never thought of doing a str( mylist[1] ) -Original Message- From: "Jeff Newmiller" [jdnew...@dcn.davis.ca.us] Date: 06/15/2017 11:56 AM To: r-help@r-project.org, "Huzefa Khalil" , "ce" Subject: Re: [R] is.null(mylist[1]) and is.null(mylist$a) returns

Re: [R] is.null(mylist[1]) and is.null(mylist$a) returns different values

2017-06-15 Thread Jeff Newmiller
I find that the str function is more helpful for understanding the difference between a null list and a list containing a null list than the implicit print function call that the interpreter invokes when you enter an expression at the console. str( mylist[1] ) -- Sent from my phone. Please e

Re: [R] is.null(mylist[1]) and is.null(mylist$a) returns different values

2017-06-15 Thread Huzefa Khalil
Hi, Try > is.null(mylist[[1]]) [1] TRUE Notice the double square brackets. From: ?`[` "The most important distinction between [, [[ and $ is that the [ can select more than one element whereas the other two select a single element." On Thu, Jun 15, 2017 at 11:33 AM, ce wrote: > Hi > > I have

[R] is.null(mylist[1]) and is.null(mylist$a) returns different values

2017-06-15 Thread ce
Hi I have a list : mylist <- list( a = NULL, b = 1, c = 2 ) > mylist[1] $a NULL > is.null(mylist[1]) [1] FALSE > is.null(mylist$a) [1] TRUE why? I need to use mylist[1] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://st

Re: [R] understanding I() in lmer formula

2017-06-15 Thread S Ellison
> Is there a difference between I(x*y) and I(y*x) ? > I have a call to lmer that results in this complaint: > Error in is.alpha2.subordinate * ~z.min.co.res : A reproducible example would help ... In the absence of that, check the classes of the two variables in I() and, if you run the produc

Re: [R] draw stripes in a circle in R

2017-06-15 Thread jean-philippe
hi david Thank you very much for the hack of draw.circle that you proposed me. I don't understand some part of the code, why do you pass radius as a vector in the function (if I understand well the purpose of the for loop) ? Also what is ymult? If I set the radius to the value 0.85 as I wante