Re: [R] RStudio: Place for Storing Options

2017-02-22 Thread Martin Maechler
> Jeff Newmiller > on Sat, 11 Feb 2017 08:09:36 -0800 writes: > For the record, then, Google listened to my incantation of > "rstudio configuration file" and the second result was: > https://support.rstudio.com/hc/en-us/articles/200534577-Resetting-RStudio-Desktop-s-Stat

Re: [R] vars package - irf() does not work

2017-02-22 Thread PIKAL Petr
Hi You sent it to wrong person. I am not the one who have problems with vars code. It was T.Riedle who had. I am cc’ing it to R help so he can answer you if he read it. Cheers Petr From: John C Frain [mailto:fra...@gmail.com] Sent: Wednesday, February 22, 2017 9:51 PM To: PIKAL Petr Subject:

[R] forecast using linear model

2017-02-22 Thread Mayukh Dass
Hello, I have a time series with sales data of two products A and B. The sales data are reported weekly. I want to forecast next 26 weeks sales data for product A using trend, seasonality and sales of B. So first I forecast next 26 weeks sales of B with only trend and season. Next, I tried to cr

Re: [R] single strip for the same group in dotplot lattice

2017-02-22 Thread Duncan Mackay
Resending the previous email as the data = mdata2 is wrong for the first plot should be mdata dotplot( value ~ type|ct, mdata, groups = typeT, par.settings = list(strip.background = list(col="paleturquoise"), superpose.symbol = list(col = c(2:4),

Re: [R] single strip for the same group in dotplot lattice

2017-02-22 Thread Duncan Mackay
Hi Liugi Here are some ideas quickly 4 panels diagonals are blank mdata = my.data mdata$ct <- paste(target, "Run", rep(1:2, each = 6)) mdata$typeT <- paste(mdata$target,mdata$type) dotplot( value ~ type|ct, mdata2, groups = typeT, par.settings = list(strip.background = list(col="paletur

Re: [R] optimisation - Error in checkFunc(Func2, times, y, rho) : The number of derivatives returned by func() (22) must equal the length of the initial conditions vector (2)

2017-02-22 Thread Jim Lemon
I'm not really familiar with what you are doing. when I try to debug something like this, I run each step separately to determine where the error is. For example, if I clean up the code a bit and run the derivs function: derivs(time,y,parms) [[1]] [1] 429.709540 438.844035 281.741953 404.175

Re: [R] converting time format

2017-02-22 Thread Jim Lemon
Sure: df.count.mon$time<-format(as.Date(paste(df.count.mon$year, df.count.mon$mon,1), '%Y %m %d'),"%Y %m") > df.count.mon count year montime 1 22 2014 1 2014 01 2 12 2014 2 2014 02 ... Jim On Thu, Feb 23, 2017 at 8:18 AM, lily li wrote: > Yes, it is a little different. Is t

Re: [R] converting time format

2017-02-22 Thread lily li
Yes, it is a little different. Is there a way to get '-mm' format? Thanks. On Wed, Feb 22, 2017 at 2:10 PM, Jim Lemon wrote: > Hi Lily. > Two problems. You have named the month field "mon" and then refer to > it as "month". Second, as the resolution of as.Date is days, it can't > produce a v

Re: [R] converting time format

2017-02-22 Thread Jim Lemon
Hi Lily. Two problems. You have named the month field "mon" and then refer to it as "month". Second, as the resolution of as.Date is days, it can't produce a valid date without specifying the day. Thus: df.count.mon<-data.frame(count=sample(1:24,24), year=rep(2014:2015,each=2),mon=rep(1:12,2)) #

Re: [R] [FORGED] function for remove white space

2017-02-22 Thread José Luis
Oh, thank you so much!! It's perfect!! Enviado desde mi iPhone > El 22 feb 2017, a las 17:49, William Dunlap escribió: > > Try the following function to apply gsub to all character or factor > columns of a data.frame (and maintain change the class of all > columns): > > gsubDataFrame <- fun

[R] converting time format

2017-02-22 Thread lily li
Hi R users, I have a dataframe, with year, month, day, and other variables. I wanted to calculated monthly values of the variables. For example, there is one variable called 'count'. I use the code below to convert daily data to monthly data. df.count.mon = aggregate(count ~ year+month, data= df,

[R] how we combine more than one matrix aafter finding their variance

2017-02-22 Thread Tahira Perveen
[[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide comm

Re: [R] [FORGED] function for remove white space

2017-02-22 Thread William Dunlap via R-help
Try the following function to apply gsub to all character or factor columns of a data.frame (and maintain change the class of all columns): gsubDataFrame <- function(pattern, replacement, x, ...) { stopifnot(is.data.frame(x)) for(i in seq_len(ncol(x))) { if (is.character(x[[i]])) {

Re: [R] How to search t value when you know degree of freedom?

2017-02-22 Thread Rui Barradas
Hello, It would be ?pt not pnorm. And as you can see in that help page you need another value, the value of the quantile. (Don't worry about the arguments ncp or log just q and df) Hope this helps, Rui Barradas Em 22-02-2017 15:53, vod vos escreveu: Hi everyone, How to search t value when

[R] How to search t value when you know degree of freedom?

2017-02-22 Thread vod vos
Hi everyone, How to search t value when you know degree of freedom? For example, the degree of freedom is 29, how to use R to calculate the t value for it? t.test does not help, or pnorm? I am not sure. Thanks. __ R-help@r-project.org mailing lis

Re: [R] vars package - irf() does not work

2017-02-22 Thread PIKAL Petr
Hi I have no knowledge of vars package. However from what you describe that it sometimes works and sometimes not (although I wonder what it does mean) it seems to me that you either mask some arguments used by the function in your environment or misspell sometimes arguments or use invalid strin

[R] Facebook package error - Can't get reactions

2017-02-22 Thread Vivek kumar Singh
Hi All, I am using facebook package in R. Following is my code. install.packages('Rfacebook',dependencies = T) library('Rfacebook') #create a favebook app and add http://localhost:1410/ to your app fb_oauth <- fbOAuth(app_id="***", app_secret="*") fb_page <-

Re: [R] single strip for the same group in dotplot lattice

2017-02-22 Thread Luigi Marongiu
Dear Philip, the data is indeed a toy data: the real one will have 15 panels (=targets) and two or three clusters. this means that I will have 15 strips with the label "run 1" = "cluster 1" etc. the point of the toy data is that I get a 4x4 panel plot with 8 strips labelled "run 1", "run 2", "A" an

[R] vars package - irf() does not work

2017-02-22 Thread T.Riedle
Dear all, I have not received any response on this email. Is there anybody who can help me? I want to run an impulse response analysis using the vars() package. The code looks as follwows. # list of class varest varest.USA<-VAR(VAR_analsis_DataUSA, lag.max = 24, ic = "SC", type = "both")

Re: [R] single strip for the same group in dotplot lattice

2017-02-22 Thread P Tennant
Hi Luigi, I'm afraid I don't understand your toy data as you've described it, but if you really don't have run 2 for target A, and don't have run 1 for target B, why not just create another factor that reflects this, and plot that? my.data$clus2 <- with(my.data, interaction(cluster, target)

[R] single strip for the same group in dotplot lattice

2017-02-22 Thread Luigi Marongiu
dear all, I have a set of data that is subdivided in cluster (run 1/run 2) and in target (A/B). When plotting, I obtain a panel strip with "run 1" and "run 2" for each "A" and "B" panel, so "run 1" appears twice and so does "run 2". It is possible to merge the strip together so that I will have "ru