Re: [R] Convert list of data frames to one data frame

2018-06-29 Thread Jeff Newmiller
Code below... a) Just because something can be done with dplyr does not mean that is the best way to do it. A solution in the hand is worth two on the Internet, and dplyr is not always the fastest method anyway. b) I highly recommend that you read Hadley Wickham's paper on tidy data [1]. Als

Re: [R] Convert list of data frames to one data frame

2018-06-29 Thread Bert Gunter
Well, I don't know your constraints, of course; but if I understand correctly, in situations like this, it is usually worthwhile to reconsider your data structure. This is a one-liner if you simply rbind all your data frames into one with 2 columns. Here's an example to indicate how: ## list of t

Re: [R] Convert list of data frames to one data frame

2018-06-29 Thread Ira Sharenow via R-help
Sarah and David, Thank you for your responses.I will try and be clearer. Base R solution: Sarah’smethod worked perfectly Is there a dplyrsolution? START: list of dataframes FINISH: one data frame DETAILS: The initiallist of data frames might have hundreds or a few thousand data frames. Eve

Re: [R] [FORGED] Plot multiple time series on a seasonal plot

2018-06-29 Thread Rolf Turner
On 30/06/18 01:41, Jérôme François via R-help wrote: Dear members, I would like to plot a second time series (a forecast) to a seasonal plot made with function seasonplot() from the package forecast. Here is a reproducible example: ts1 <- structure(c(112035, 82, 111015, 109331, 107525, 10

Re: [R] trouble with exiting loop if condition is met

2018-06-29 Thread Kelly Wu
Hi Jim & Don, I was trying to use the break command originally before posting but for some reason it was making almost all of the p-values in the replications non significant. I think I am going to change the flow of the loop so I don’t have to use a break, such as the code Jim wrote. Thanks f

Re: [R] Convert list of data frames to one data frame

2018-06-29 Thread David Winsemius
> On Jun 29, 2018, at 7:28 AM, Sarah Goslee wrote: > > Hi, > > It isn't super clear to me what you're after. Agree. Had a different read of ht erequest. Thought the request was for a first step that "harmonized" the names of the columns and then used `dplyr::bind_rows`: library(dplyr) new

Re: [R] Σχετ: x-axis tick marks length in ggplot2

2018-06-29 Thread Rui Barradas
Hello, I don't believe what you want is possible because: axis.ticks.x and axis.ticks.y change the width of the tick marks axis.ticks.length changes the length but there is no x and y axis versions, just a general purpose one. Sorry I couldn't be of much help, Rui Barradas Às 11:01 de 29-0

[R] Plot multiple time series on a seasonal plot

2018-06-29 Thread Jérôme François via R-help
Dear members, I would like to plot a second time series (a forecast) to a seasonal plot made with function seasonplot() from the package forecast. Here is a reproducible example: ts1 <- structure(c(112035, 82, 111015, 109331, 107525, 107749, 111435, 111629, 112462, 112256, 109496, 107917,

Re: [R] Convert list of data frames to one data frame

2018-06-29 Thread Sarah Goslee
Hi, It isn't super clear to me what you're after. Is this what you intend? > dfbycol(employees4BList) first1 last1 first2 last2 first3 last3 1 Al Jones 2 Al Jones Barb Smith 3 Al Jones Barb Smith Carol Adams 4 Al Jones > > dfbycol(employees4List)

Re: [R] inconsistency in list subsetting in R in linux

2018-06-29 Thread Jeff Newmiller
Read the Value section of ?mclapply. That error is an encapsulated error from the forecast function. I suggest not debugging your code running in parallel... temporarily replace mclapply with lapply to debug so you can step into your worker fictions. You may also want to temporarily reduce the

Re: [R] inconsistency in list subsetting in R in linux

2018-06-29 Thread William Dunlap via R-help
> args(parallel::mclapply) function (X, FUN, ..., mc.preschedule = TRUE, mc.set.seed = TRUE, mc.silent = FALSE, mc.cores = 1L, mc.cleanup = TRUE, mc.allow.recursive = TRUE) You gave it 'fun=forecast' instead of 'FUN=forecast'. Case matters in R. Bill Dunlap TIBCO Software wdunlap tibco.com

Re: [R] Fwd: Quadratic programming, for loop

2018-06-29 Thread Berwin A Turlach
G'day Maija, On Wed, 27 Jun 2018 08:48:08 +0300 Maija Sirkjärvi wrote: > Thanks for your reply! Unfortunately something is still wrong. > > After the transpose, dvec and Amat are still incompatible. > > > d <- -hsmooth > > dvec <- t(d) > > c <- dvec*Amat > Error in dvec * Amat : non-conforma

[R] Σχετ: x-axis tick marks length in ggplot2

2018-06-29 Thread Maria Lathouri via R-help
Dear Walter,  I tried to use scale_x_continuous but the arguments that I found was to change the labels, the limits and the breaks. I was only able to increase the number of the tick marks.  Best,Maria Στις 3:14 μ.μ. Πέμπτη, 28 Ιουνίου 2018, ο/η Walter Pina έγραψε: Dear Maria, you are