Re: [R] data reshape

2019-12-19 Thread Bert Gunter
Did you even make an attempt to do this? -- or would you like us do all your work for you? If you made an attempt, show us your code and errors. If not, we usually expect you to try on your own first. If you have no idea where to start, perhaps you need to spend some more time with tutorials to le

[R] data reshape

2019-12-19 Thread Yuan Chun Ding
Hi R users, I have a folder (called genotype) with 652 files; the file names are GTEX-1A3MV.out, GTEX-1A3MX.out, GTEX-1B8SF.out, etc; in each file, only one column of data without a header as below 201 2/2 238 3/4 245 1/2 . 983255 3/3 983766 None A total of 20528 rows; I need to read al

Re: [R] [FORGED] Re: date

2019-12-19 Thread Rolf Turner
On 20/12/19 1:30 am, Bert Gunter wrote: "But the important point is: If you know the structure of the data you want to parse, then it is best to tell R (or any other language) this structure explicitly. " Fortune nomination! Second the nomination! cheers, Rolf Turner -- Honorary Research Fe

Re: [R] date

2019-12-19 Thread David Stevens
Val Another all-base R solution: as.Date(strptime(gs$date,format="%m/%d/%y")) or if you want to add a time field later as.POSIXct(strptime(gs$date,format="%m/%d/%y"))) since strptime produces a list version of the date: class is POSIXt and the subclass is POSIXlt, that can be convenient for e

[R] Nominations sought for the 2021 ASA Statistical Computing and Graphics Award

2019-12-19 Thread Yan, Jun
(Apologies for cross-posting) Dear Colleagues, The ASA Section on Statistical Computing and Section on Statistical Graphics are inviting nominations of deserving individuals or teams for the 2021 ASA  Statistical Computing and Graphics Award (https://community.amstat.org/jointscsg-section/award

Re: [R] date

2019-12-19 Thread Jeff Newmiller
I agree that having convenience functions can be in the spirit of R, but I find that lubridate puts the cart before the horse so I avoid it. Specifically, the conceptual sequence - convert character to timestamp in GMT - "fix" erroneous timestamps to correct time zone more inefficient and error

Re: [R] How to convert ARMA process to infinite AR?

2019-12-19 Thread 傅强
Hi, AR<-c(.4,.45) MA<-c(1,.25) ARMAtoMA(ar =AR, ma = MA, lag.max = 30) picoefs <- c(1, ARMAtoMA(ar = -MA, ma = -AR, lag.max = 30)) picoefs Maybe it works! [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To U

Re: [R] date

2019-12-19 Thread Eric Berger
[ ... taking the bait regarding the "unnecessary discussion" ... ] The "Fortune nomination" that Bert sent includes the phrase "...then it is best to tell R ..." What metric is being used to do the ranking to get the "best"? If the metric is related to "providing the most unambiguous information

Re: [R] date

2019-12-19 Thread Bert Gunter
"But the important point is: If you know the structure of the data you want to parse, then it is best to tell R (or any other language) this structure explicitly. " Fortune nomination! -- Bert Thu, Dec 19, 2019, 2:49 AM Enrico Schumann wrote: > > Quoting Eric Berger : > > > Martin writes

Re: [R] date

2019-12-19 Thread Enrico Schumann
Quoting Eric Berger : Martin writes: "there's really no reason for going beyond base R" I disagree. Lubridate is a fantastic package. I use it all the time. It makes working with dates really easy, as evidenced by John Kane's suggestion. I strongly recommend learning to work with it. The bo

Re: [R] date

2019-12-19 Thread Eric Berger
Martin writes: "there's really no reason for going beyond base R" I disagree. Lubridate is a fantastic package. I use it all the time. It makes working with dates really easy, as evidenced by John Kane's suggestion. I strongly recommend learning to work with it. The bottom line: as is often the

Re: [R] date

2019-12-19 Thread Martin Maechler
> John Kane > on Tue, 17 Dec 2019 20:28:17 -0500 writes: > library(lubridate) > gs$dat1 <- mdy(gs$date) there's really no reason for going beyond base R. Using the proper format as per Patrick and Peter's advice (below) is perfectly clear and actually more robust (for the