[R] Change data frame to time series data

2024-10-01 Thread roslinazairimah zakaria
Dear all, I have a data in data frame and would like to change to time series data. Thank you for any help given. > str(dt)'data.frame': 525600 obs. of 3 variables: $ time : chr "2014-01-01 00:00:00" "2014-01-01 00:01:00" "2014-01-01 00:02:00" "2014-01-01 00:03:00" ... $ cnt_

Re: [R] (no subject)

2024-10-01 Thread avi.e.gross
Grant, I think, Your NO SUBJECT message confused me as it seems a continuation of an earlier discussion of a new and likely irrelevant metric of the worthiness of R programs. Did you make a mistake here? I tried your code as well and the results did not look like what the OP asked for. It took m

Re: [R] How to install this package

2024-10-01 Thread Enrico Schumann
On Wed, 25 Sep 2024, Christofer Bogaso writes: > Hi, > > I would like to install an R library from > https://cran.r-project.org/src/contrib/Archive/termstrc/ > > I executed below code without success. > > Any help would be appreciated. > >> install.packages('/Users/termstrc_1.3.tar.gz', repos = NU

[R] (no subject)

2024-10-01 Thread Izmirlian, Grant (NIH/NCI) [E] via R-help
I would go with unlist on x,single bracket subsetted on f x <- list(`1` = c(7, 13, 1, 4, 10), `2` = c(2, 5, 14, 8, 11), `3` = c(6, 9, 15, 12, 3)) f <- factor(rep(1:3,5)) unlist(x[f]) Yes, unsplit() it is. I was messing around with ave() (which can be hammered into submiss