[R] numeric of length 1

2015-06-22 Thread Ragia Ibrahim
Dear group, I have the following object > pr_sub$vector[1] 14 0.07782809 > class( pr_sub$vector[1]) [1] "numeric" > length( pr_sub$vector[1]) [1] 1 how can I separate pr_sub$vector[1] and get 14 only thanks in advance Ragia [[alter

Re: [R] issue in running timeseries forecasting related package

2015-06-22 Thread PIKAL Petr
Hi It is weird. Maybe others could come with some sensible answer. I would try to start R with -vanilla switch Rgui.exe --vanilla and try if everything is OK. If yes, you could start loading packages and see how all is working. If not I think that the only option is reinstaling R and packges

[R] repeated measures: multiple comparisons with pairwise.t.test and multcomp disagree

2015-06-22 Thread Denis Chabot
Hi, I am working on a problem which I think can be handled as a repeated measures analysis, and I have read many tutorials about how to do this with R. This part goes well, but I get stuck with the multiple comparisons I'd like to run afterward. I tried two methods that I have seen in my readin

Re: [R] Random Forest -

2015-06-22 Thread David Winsemius
On Jun 22, 2015, at 10:46 AM, synapse 123 wrote: > Hi > I wanted to know if I cn use Random Forest in R for time to event data. I > cannot use Random Survival Forest since my data is not censored. Any > suggestions. > I'm not sure why that should be a problem for RandomSurvivalForests. It's not

Re: [R] sampling rows with values never sampled before

2015-06-22 Thread C W
Hi Jean, Thanks! Daniel, Yes, you are absolutely right. I want sampled vectors to be as different as possible. I added a little more to the earlier data set. x1 x2 x3 [1,] 1 3.7 2.1 [2,] 2 3.7 5.3 [3,] 3 3.7 6.2 [4,] 4 3.7 8.9 [5,] 5 3.7 4.1 [6,] 1 2.9 2.1 [7,] 2 2

Re: [R] spline basis

2015-06-22 Thread David Winsemius
On Jun 22, 2015, at 1:09 PM, Glenn Schultz wrote: > I have the following code which creates a spline function > > x <- c(1, 12, 24, 36, 60, 120, 200, 240, 300, 360) > y <- c(.2, 8, 8, 8, 8, 8, 8, 8, 18, 50) > > > Baseline <- cbind(x,y) > Turnover <- splinefun(Baseline[,1], Baseline[,2], method

[R] spline basis

2015-06-22 Thread Glenn Schultz
I have the following code which creates a spline function x <- c(1, 12, 24, 36, 60, 120, 200, 240, 300, 360) y <- c(.2, 8, 8, 8, 8, 8, 8, 8, 18, 50) Baseline <- cbind(x,y) Turnover <- splinefun(Baseline[,1], Baseline[,2], method = "natural") plot(Turnover(seq(1, 360, 1)), type = "l") If I chan

[R] Random Forest -

2015-06-22 Thread synapse 123
Hi I wanted to know if I cn use Random Forest in R for time to event data. I cannot use Random Survival Forest since my data is not censored. Any suggestions. Thanks Azi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] issue in running timeseries forecasting related package

2015-06-22 Thread AshokVarma.Nadakuduti
Hi Petr, Thanks for the mail. Please find below the required information Version: R-3.1.1 console sessionInfo(): Attached the session info for your reference Did you install new packages/R version? No Did you load the package by library(xts)? Yes. I was able to run all the functions related t

Re: [R] sampling rows with values never sampled before

2015-06-22 Thread Daniel Nordlund
On 6/22/2015 9:42 AM, C W wrote: Hello R list, I am have question about sampling unique coordinate values. Here's how my data looks like dat <- cbind(x1 = rep(1:5, 3), x2 = rep(c(3.7, 2.9, 5.2), each=5)) dat x1 x2 [1,] 1 3.7 [2,] 2 3.7 [3,] 3 3.7 [4,] 4 3.7 [5,] 5 3.7

Re: [R] Omitting NA's using dcast (reshape2 package)

2015-06-22 Thread David L Carlson
You could apply na.omit() to just the columns you are using: > dcast(na.omit(df[,1:2]), v1 ~ v2, length, margins = TRUE) Using v2 as value column: use value.var to override. v1 X Y Z (all) 1 A 1 2 2 5 2 B 1 2 1 4 3 (all) 2 4 3 9 - Davi

Re: [R] sampling rows with values never sampled before

2015-06-22 Thread Adams, Jean
Mike, There may be a more efficient way to do this, but this works on your example. # mix up the order of the rows mix <- dat[order(runif(dim(dat)[1])), ] # get rid of duplicate x1s and x2s sub <- mix[!duplicated(mix[, "x1"]) & !duplicated(mix[, "x2"]), ] sub Jean On Mon, Jun 22, 2015 at 11:42

[R] ASA Conference on Statistical Practice - deadline Thursday

2015-06-22 Thread Adams, Jean
R users, Abstracts are now being accepted for the 2016 ASA Conference on Statistical Practice, February 18-20, San Diego, CA, USA. Past conference attendees have shown particular interest in R, reproducibility, and data visualization. The deadline for submission is June 25. Prese

[R] sampling rows with values never sampled before

2015-06-22 Thread C W
Hello R list, I am have question about sampling unique coordinate values. Here's how my data looks like > dat <- cbind(x1 = rep(1:5, 3), x2 = rep(c(3.7, 2.9, 5.2), each=5)) > dat x1 x2 [1,] 1 3.7 [2,] 2 3.7 [3,] 3 3.7 [4,] 4 3.7 [5,] 5 3.7 [6,] 1 2.9 [7,] 2 2.9 [8,] 3 2.9

Re: [R] issue in running timeseries forecasting related package

2015-06-22 Thread Jeff Newmiller
With so little to go on, we are not likely to be much help. A reproducible example and output of sessionInfo would be the minimum information that the Posting Guide would tell you to provide. A wild guess is that you need to have a conversation with your system administrator. If your R version

[R] Omitting NA's using dcast (reshape2 package)

2015-06-22 Thread Michael . Laviolette
I'm using the "dcast" function from Hadley's "reshape2" package to do some tabulations. I can't get it to exclude NA's in the variables being tabulated. Here's a simple example. v1 <- c(rep("A", 5), rep("B", 5), NA) v2 <- c("X", "Y", "Y", "Z", "Z", "X", "Y", "Y", "Z", NA, "Z") v3 <- c(rep("a", 4)

Re: [R] issue in running timeseries forecasting related package

2015-06-22 Thread PIKAL Petr
Hi Please some aditional info: version sessionInfo() Did you install new packages/R version? Did you load the package by library(xts)? And preferably no HTML post. Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of > ashokvarma.nadaku

[R] Simple monte carlo

2015-06-22 Thread Mohan.Radhakrishnan
Hi, I am a developer and I code 'R'. We have some project tasks and durations(Expected, 50% - Average Case and 90% - Worst Case ) and I am trying to understand how a simulation of this using monte carlo would help. Most of the websites deal with either the math or some commercial package.

[R] issue in running timeseries forecasting related package

2015-06-22 Thread AshokVarma.Nadakuduti
Hi, I am trying to run packages timeseries, forecast, xts packages to execute some task. I was using this R-console for 8months. I had never faced any issue. Now, It's throwing an error saying 'Error: could not find function "forecast" Similarly for other packages as well. Could you please sha

[R] gen.inits error for non-linear hierarchical model using R2winBUGS

2015-06-22 Thread Dominik Jaskierniak
Hi, I am relatively new to Bayesian statistics and am trying to apply a non-linear hierarchical model using R2winBUGS on some tree stocking density data. I am hoping someone may be able to help me find the reason why R2winBUGS is giving me the following error: *gen.inits cannot be executed (is

Re: [R] CHAID Usage in R

2015-06-22 Thread Achim Zeileis
On Mon, 22 Jun 2015, My List wrote: All: I am trying to implement CHAID decision tree. Can anyone please help me to know which package can be used for it or lead me to the documentation to the same. A CHAID implementation is available on R-Forge at: https://R-Forge.R-project.org/R/?group_id=3

[R] CHAID Usage in R

2015-06-22 Thread My List
All: I am trying to implement CHAID decision tree. Can anyone please help me to know which package can be used for it or lead me to the documentation to the same. I did read a web page says that only the source for the CHAID package is available. Kindly,advice on the package to be used. Thanks i

[R] [R-pkgs] Version 0.8.5 of metricsgraphics is on CRAN

2015-06-22 Thread boB Rudis
Version 0.8.5 of metricsgraphics is now on CRAN. It provides an 'htmlwidgets' interface to the 'MetricsGraphics.js' ('D3'-based) charting library which is geared towards displaying time-series data. There are routines for scatterplots, histograms and even 'grid.arrange'-like functionality for layi