[R] Need Help on Batch forecasting for multiple items at one go

2018-03-12 Thread Manish Mukherjee
Hi All, I have time series weekly data for number of servers for 62 weeks. i have to forecast for next 8 weeks on what will be the usage. i have a challenge in the code where it is giving output for the last week value of all the servers, instead i need the output for next 8 weeks . i am att

Re: [R] ggplot and boxplots

2018-03-12 Thread Richard M. Heiberger
It looks like your V3 is a factor. testing_ggplot <- data.frame( V1=factor(c(256, 256, 256, 272, 272, 272)), V2=c("Disabled", "Disabled", "Enabled", "Disabled", "Enabled", "Enabled"), V3=681:686) library(ggplot2) ggplot(testing_ggplot, aes(V2,V3 )) + geom_boxplot() + facet_wrap( ~ V

Re: [R] Bug report: override stopifnot() ?

2018-03-12 Thread Duncan Murdoch
On 12/03/2018 2:43 PM, Bert Gunter wrote: Please stop this line of queries/"suggestions/speculations and read the relevant docs **carefully**. For example, from ?"==" "Note Do not use == and != for tests, such as in if expressions, where you must get a single TRUE or FALSE. Unless you are abso

[R] ggplot and boxplots

2018-03-12 Thread Yectli Huerta via R-help
Hi, I was wondering if someone could give me a hint or two. I'm having problems generating ggplot2 boxplots . The plot that is has dots but no boxplots. Below is the dataset > testing_ggplot V1V2 V3 1 256 Disabled 688.61 2 256 Disabled 698.63 3 256 Disabled 700.02 4 256

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

2018-03-12 Thread Gabor Grothendieck
split any mixed columns into letter and number columns and then order can be used on that: DF <- data.frame(x = c("a10", "a2", "a1")) o <- do.call("order", transform(DF, let = gsub("\\d", "", x), no = as.numeric(gsub("\\D", "", x)),

[R] Error - PMML Conversion of a Random-Forest Model using the randomForest Package

2018-03-12 Thread Karthiko S
Hi All, I am trying to convert random forest model developed into a pmml file. randomForest package was used to build the model. The input to the model is in the form of a matrix (term frequency matrix used for text analytics). While i try to convert the model into a pmml file an error pops. Err

Re: [R] Bug report: override stopifnot() ?

2018-03-12 Thread Bert Gunter
Please stop this line of queries/"suggestions/speculations and read the relevant docs **carefully**. For example, from ?"==" "Note Do not use == and != for tests, such as in if expressions, where you must get a single TRUE or FALSE. Unless you are absolutely sure that nothing unusual can happen,

Re: [R] Bug report: override stopifnot() ?

2018-03-12 Thread Stepan Kasal
Hello, I'm sorry that I aswer to my own mail; I forgot to attach the patch. Patch below, Stepan Kasal On Mon, Mar 12, 2018 at 06:53:00PM +0100, Stepan Kasal wrote: > When thinking about it, stopifnot() should really issue a better error > message in this case. Patch attached. But I should per

Re: [R] Bug report: override stopifnot() ?

2018-03-12 Thread Stepan Kasal
Hello, On Mon, Mar 12, 2018 at 09:30:59AM -0700, William Dunlap wrote: > Why don't you use >stopifnot( all(m1 == m2) ) > ? good question. Even though I use aseert np.all(m1 == m2) when working with NumPy, I got accustomed to the "handy shortcut" that I can omit all() with R vectors and ma

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

2018-03-12 Thread Sebastien Bihorel
Thanks for your reply. I take this is also a no to my question and appreciated the suggested mixedrank function and its usage with do.call. Thanks - Original Message - From: "Jeff Newmiller" To: "Bert Gunter" Cc: "Sebastien Bihorel" , "R-help" Sent: Monday, March 12, 2018 2:11:03 A

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

2018-03-12 Thread Sebastien Bihorel
Hi, Point taken... although this error is not returned in older version of R (3.1.2 does not have any issue with your test case... not sure when the added layer of check was introduced). From: "William Dunlap" To: "Sebastien Bihorel" Cc: r-help@r-project.org Sent: Monday, March 12, 2018

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

2018-03-12 Thread Sebastien Bihorel
So I take this is a no to my initial question. Cheers too. PS: some users just ask questions to get straight answers not to get a solution to their problem :D From: "Bert Gunter" To: "Sebastien Bihorel" Cc: "R-help" Sent: Monday, March 12, 2018 12:57:00 AM Subject: Re: [R] Equivalen

Re: [R] Bug report: override stopifnot() ?

2018-03-12 Thread William Dunlap via R-help
Why don't you use stopifnot( all(m1 == m2) ) ? Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Mar 12, 2018 at 8:15 AM, Stepan Kasal wrote: > Hello, > I stumbled over a problem: >stopifnot(m1 == m2) > > It works with vector or matrix, but does not work for classes from Matrix > pack

[R] Bug report: override stopifnot() ?

2018-03-12 Thread Stepan Kasal
Hello, I stumbled over a problem: stopifnot(m1 == m2) It works with vector or matrix, but does not work for classes from Matrix package. In the source of stopifnot(), there is all(m1 == m2) that would just work, but there is also is.logical(m1 == m2) that id FALSE. Would it be possible if Ma

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

2018-03-12 Thread William Dunlap via R-help
1- mixedorder does not work in a "do.call(mixedorder, mydataframe)" call like the order function does This is tangential, but do.call(order, mydataframe) is not safe to use in a general purpose function either - you need to remove the names from the second argument: > d <- data.frame(meth

[R] Package gamlss used inside foreach() and %dopar% fails to find an object

2018-03-12 Thread Nik Tuzov
Hello Mikis: Thanks a lot, it worked. Could you tell me what the problem was? Regards, Nik - Original Message - From: r-help-requ...@r-project.org To: "r-help" Sent: Sunday, March 11, 2018 6:00:02 AM Subject: R-help Digest, Vol 181, Issue 11 Send R-help mailing list submissions to

Re: [R] Help on Aggregation

2018-03-12 Thread PIKAL Petr
Hi The first question is simple. You should use aggregate and cut but first you need to transfer your data to date/time format by strptime. test<-read.table("clipboard", header=T) test$cas<-strptime(paste(test$Date, test$Time), format="%Y/%m/%d %H:%M:%S") Below is the data. aggregate(test[,4:6

[R] Help on Aggregation

2018-03-12 Thread Emeka Don
Dear All, 1.I have been trying to aggregate my data but I have not been getting it correctly. In the data I want to convert hourly data into daily averages. Here is a sample of the data: Neph_no Date Time Temp_C Pressure_kPa RH 9 2014/03/28 10:00:00 38.4 95.9 29.7 9 2014/03/28 11:00:00 37.8