Re: [R] Subset a data frame with specific date

2020-01-14 Thread PIKAL Petr
-Original Message- > From: R-help On Behalf Of Bert Gunter > Sent: Tuesday, January 14, 2020 8:10 AM > To: ani jaya > Cc: r-help > Subject: Re: [R] Subset a data frame with specific date > > That's fine, but do note that the which() function is wholly unnecessary in

Re: [R] Subset a data frame with specific date

2020-01-13 Thread ani jaya
Thank you Bert. And yes another topic to study. On Tue, Jan 14, 2020 at 4:10 PM Bert Gunter wrote: > > That's fine, but do note that the which() function is wholly unnecessary in > your last line as R allows logical indexing. Perhaps another topic you need > to study. > > -- Bert > > > > On Mon

Re: [R] Subset a data frame with specific date

2020-01-13 Thread Bert Gunter
That's fine, but do note that the which() function is wholly unnecessary in your last line as R allows logical indexing. Perhaps another topic you need to study. -- Bert On Mon, Jan 13, 2020 at 10:56 PM ani jaya wrote: > Dear Jeff and Bert, > > Thank you very much for your correction and expl

Re: [R] Subset a data frame with specific date

2020-01-13 Thread ani jaya
Dear Jeff and Bert, Thank you for your correction and explanation. Yes, I need more study regarding date format and sorry for HTML mail. I was able to subset data that I want. mjo30<-read.table("rmm.txt", header=FALSE, skip=4234, nrows=10957) mjo30$V8<-NULL names(mjo30)<-c("year","month","day",

Re: [R] Subset a data frame with specific date

2020-01-13 Thread ani jaya
Dear Jeff and Bert, Thank you very much for your correction and explanation. And yes, I need to study about date format more. Sorry for HTML mail, don't realize. I was able to subset the data that I want. mjo30<-read.table("rmm.txt", header=FALSE, skip=4234, nrows=10957) mjo30$V8<-NULL names(mjo

Re: [R] Subset a data frame with specific date

2020-01-13 Thread Bert Gunter
Inline. Bert Gunter On Mon, Jan 13, 2020 at 8:54 PM ani jaya wrote: > Good morning R-Help, > > I have a dataframe with 7 columns and 1+ rows. I want to subset/extract > those data frame with specific date (not in order). Here the head of my > data frame: > > head(mjo30) > year month d

Re: [R] Subset a data frame with specific date

2020-01-13 Thread Jeff Newmiller
The dput function is for re-creating an R object in another R workspace, so it uses fundamental base types to define objects. A Date is really the number of days since a specific date (typically 1970-01-01) that get converted to look like dates whenever you display or print them, so what you are

[R] Subset a data frame with specific date

2020-01-13 Thread ani jaya
Good morning R-Help, I have a dataframe with 7 columns and 1+ rows. I want to subset/extract those data frame with specific date (not in order). Here the head of my data frame: head(mjo30) year month date rmm1 rmm2 phase amp 1 1986 11 -0.326480 -1.55895 2 1.59277 2 1