Date extract Year

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Date extract Year

archsteve
This post has NOT been accepted by the mailing list yet.
Hi all,

I am trying in vain to create a new object "Year" in my data frame from existing Date data. I have tried many different approaches, but can't seem to get it to work. Here is an example of some code I tried.

date1<- as.Date(wells$Date,"%m/%d/%Y")
wells$year<-as.numeric(format(date1, "%Y"))

I am starting with data that looks like this.

         ID  Date DepthtoWater_bgs test test2
1  BC-0004 41163           260.60    3     1
2  BC-0004 41255           261.65    4     2
3  BC-0003 41345           166.58    5     3
4  BC-0002 41351           317.85    6     4
5  BC-0004 41355           262.15    7     5
6  BC-0003 41438           167.55    8     6
7  BC-0004 41438           265.45    9     7
8  BC-0002 41443           317.25   10     8
9  BC-0002 41521           321.25   11     9
10 BC-0003 41522           168.65   12    10
11 BC-0004 41522           266.15   13    11
12 BC-0003 41627           168.95   14    12
13 BC-0004 41627           265.25   15    13
14 BC-0002 41634           312.31   16    14
15 BC-0003 41703           169.25   17    15
16 BC-0004 41703           265.05   18    16
17 BC-0002 41710           313.01   19    17
18 BC-0003 41795           168.85   20    18
19 BC-0004 41795           266.95   21    19
20 BC-0002 41801           330.41   22    20
21 BC-0003 41905           169.75   23    21
22 BC-0004 41905           267.75   24    22
23 BC-0002 41906           321.01   25    23

Any help would be greatly appreciated!
Reply | Threaded
Open this post in threaded view
|

Re: Date extract Year

archsteve
Hi all,

I am trying in vain to create a new object "Year" in my data frame from
existing Date data. I have tried many different approaches, but can't seem
to get it to work. Here is an example of some code I tried.

date1<- as.Date(wells$Date,"%m/%d/%Y")
wells$year<-as.numeric(format(date1, "%Y"))

I am starting with data that looks like this.

        ID  Date DepthtoWater_bgs test test2
1  BC-0004 41163           260.60    3     1
2  BC-0004 41255           261.65    4     2
3  BC-0003 41345           166.58    5     3
4  BC-0002 41351           317.85    6     4
5  BC-0004 41355           262.15    7     5
6  BC-0003 41438           167.55    8     6
7  BC-0004 41438           265.45    9     7
8  BC-0002 41443           317.25   10     8
9  BC-0002 41521           321.25   11     9
10 BC-0003 41522           168.65   12    10
11 BC-0004 41522           266.15   13    11
12 BC-0003 41627           168.95   14    12
13 BC-0004 41627           265.25   15    13
14 BC-0002 41634           312.31   16    14
15 BC-0003 41703           169.25   17    15
16 BC-0004 41703           265.05   18    16
17 BC-0002 41710           313.01   19    17
18 BC-0003 41795           168.85   20    18
19 BC-0004 41795           266.95   21    19
20 BC-0002 41801           330.41   22    20
21 BC-0003 41905           169.75   23    21
22 BC-0004 41905           267.75   24    22
23 BC-0002 41906           321.01   25    23

Any help would be greatly appreciated!


-Steve

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Date extract Year

fredo
Hi Steve,

Can you please explain to us your date column? thanks.

Regards,
Fredo.
 On Mar 8, 2015 7:32 PM, "Steve Archambault" <[hidden email]> wrote:

> Hi all,
>
> I am trying in vain to create a new object "Year" in my data frame from
> existing Date data. I have tried many different approaches, but can't seem
> to get it to work. Here is an example of some code I tried.
>
> date1<- as.Date(wells$Date,"%m/%d/%Y")
> wells$year<-as.numeric(format(date1, "%Y"))
>
> I am starting with data that looks like this.
>
>         ID  Date DepthtoWater_bgs test test2
> 1  BC-0004 41163           260.60    3     1
> 2  BC-0004 41255           261.65    4     2
> 3  BC-0003 41345           166.58    5     3
> 4  BC-0002 41351           317.85    6     4
> 5  BC-0004 41355           262.15    7     5
> 6  BC-0003 41438           167.55    8     6
> 7  BC-0004 41438           265.45    9     7
> 8  BC-0002 41443           317.25   10     8
> 9  BC-0002 41521           321.25   11     9
> 10 BC-0003 41522           168.65   12    10
> 11 BC-0004 41522           266.15   13    11
> 12 BC-0003 41627           168.95   14    12
> 13 BC-0004 41627           265.25   15    13
> 14 BC-0002 41634           312.31   16    14
> 15 BC-0003 41703           169.25   17    15
> 16 BC-0004 41703           265.05   18    16
> 17 BC-0002 41710           313.01   19    17
> 18 BC-0003 41795           168.85   20    18
> 19 BC-0004 41795           266.95   21    19
> 20 BC-0002 41801           330.41   22    20
> 21 BC-0003 41905           169.75   23    21
> 22 BC-0004 41905           267.75   24    22
> 23 BC-0002 41906           321.01   25    23
>
> Any help would be greatly appreciated!
>
>
> -Steve
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Date extract Year

Bert Gunter
In reply to this post by archsteve
Please read ?as.Date carefully. Your argument appears to be numeric
(??)  and you do not seem to have specified an origin:

"as.Date will accept numeric data (the number of days since an epoch),
but only if origin is supplied."

Cheers,
Bert

Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374

"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
Clifford Stoll




On Sat, Mar 7, 2015 at 5:49 PM, Steve Archambault <[hidden email]> wrote:

> Hi all,
>
> I am trying in vain to create a new object "Year" in my data frame from
> existing Date data. I have tried many different approaches, but can't seem
> to get it to work. Here is an example of some code I tried.
>
> date1<- as.Date(wells$Date,"%m/%d/%Y")
> wells$year<-as.numeric(format(date1, "%Y"))
>
> I am starting with data that looks like this.
>
>         ID  Date DepthtoWater_bgs test test2
> 1  BC-0004 41163           260.60    3     1
> 2  BC-0004 41255           261.65    4     2
> 3  BC-0003 41345           166.58    5     3
> 4  BC-0002 41351           317.85    6     4
> 5  BC-0004 41355           262.15    7     5
> 6  BC-0003 41438           167.55    8     6
> 7  BC-0004 41438           265.45    9     7
> 8  BC-0002 41443           317.25   10     8
> 9  BC-0002 41521           321.25   11     9
> 10 BC-0003 41522           168.65   12    10
> 11 BC-0004 41522           266.15   13    11
> 12 BC-0003 41627           168.95   14    12
> 13 BC-0004 41627           265.25   15    13
> 14 BC-0002 41634           312.31   16    14
> 15 BC-0003 41703           169.25   17    15
> 16 BC-0004 41703           265.05   18    16
> 17 BC-0002 41710           313.01   19    17
> 18 BC-0003 41795           168.85   20    18
> 19 BC-0004 41795           266.95   21    19
> 20 BC-0002 41801           330.41   22    20
> 21 BC-0003 41905           169.75   23    21
> 22 BC-0004 41905           267.75   24    22
> 23 BC-0002 41906           321.01   25    23
>
> Any help would be greatly appreciated!
>
>
> -Steve
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Date extract Year

Spencer Graves-3
       The Ecfun package includes a function "as.Date1970", that merely
provides a default origin for "as.Date".


       This kind of thing can be found using


library(sos)
findFn('as.Date1970')


       This produced a list in my default browser showing 4 links in 3
packages, the first 2 of which were for this.


       Hope this helps.
       Spencer


On 3/8/2015 9:51 AM, Bert Gunter wrote:

> Please read ?as.Date carefully. Your argument appears to be numeric
> (??)  and you do not seem to have specified an origin:
>
> "as.Date will accept numeric data (the number of days since an epoch),
> but only if origin is supplied."
>
> Cheers,
> Bert
>
> Bert Gunter
> Genentech Nonclinical Biostatistics
> (650) 467-7374
>
> "Data is not information. Information is not knowledge. And knowledge
> is certainly not wisdom."
> Clifford Stoll
>
>
>
>
> On Sat, Mar 7, 2015 at 5:49 PM, Steve Archambault <[hidden email]> wrote:
>> Hi all,
>>
>> I am trying in vain to create a new object "Year" in my data frame from
>> existing Date data. I have tried many different approaches, but can't seem
>> to get it to work. Here is an example of some code I tried.
>>
>> date1<- as.Date(wells$Date,"%m/%d/%Y")
>> wells$year<-as.numeric(format(date1, "%Y"))
>>
>> I am starting with data that looks like this.
>>
>>          ID  Date DepthtoWater_bgs test test2
>> 1  BC-0004 41163           260.60    3     1
>> 2  BC-0004 41255           261.65    4     2
>> 3  BC-0003 41345           166.58    5     3
>> 4  BC-0002 41351           317.85    6     4
>> 5  BC-0004 41355           262.15    7     5
>> 6  BC-0003 41438           167.55    8     6
>> 7  BC-0004 41438           265.45    9     7
>> 8  BC-0002 41443           317.25   10     8
>> 9  BC-0002 41521           321.25   11     9
>> 10 BC-0003 41522           168.65   12    10
>> 11 BC-0004 41522           266.15   13    11
>> 12 BC-0003 41627           168.95   14    12
>> 13 BC-0004 41627           265.25   15    13
>> 14 BC-0002 41634           312.31   16    14
>> 15 BC-0003 41703           169.25   17    15
>> 16 BC-0004 41703           265.05   18    16
>> 17 BC-0002 41710           313.01   19    17
>> 18 BC-0003 41795           168.85   20    18
>> 19 BC-0004 41795           266.95   21    19
>> 20 BC-0002 41801           330.41   22    20
>> 21 BC-0003 41905           169.75   23    21
>> 22 BC-0004 41905           267.75   24    22
>> 23 BC-0002 41906           321.01   25    23
>>
>> Any help would be greatly appreciated!
>>
>>
>> -Steve
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Date extract Year

archsteve
In reply to this post by fredo
My date column is the excel numeric date format. For instance, in excel, that first date is 11 September 2012.

On Mar 8, 2015, at 10:41 AM, Frederic Ntirenganya <[hidden email]> wrote:

> Hi Steve,
>
> Can you please explain to us your date column? thanks.
>
> Regards,
> Fredo.
> On Mar 8, 2015 7:32 PM, "Steve Archambault" <[hidden email]> wrote:
> Hi all,
>
> I am trying in vain to create a new object "Year" in my data frame from
> existing Date data. I have tried many different approaches, but can't seem
> to get it to work. Here is an example of some code I tried.
>
> date1<- as.Date(wells$Date,"%m/%d/%Y")
> wells$year<-as.numeric(format(date1, "%Y"))
>
> I am starting with data that looks like this.
>
>         ID  Date DepthtoWater_bgs test test2
> 1  BC-0004 41163           260.60    3     1
> 2  BC-0004 41255           261.65    4     2
> 3  BC-0003 41345           166.58    5     3
> 4  BC-0002 41351           317.85    6     4
> 5  BC-0004 41355           262.15    7     5
> 6  BC-0003 41438           167.55    8     6
> 7  BC-0004 41438           265.45    9     7
> 8  BC-0002 41443           317.25   10     8
> 9  BC-0002 41521           321.25   11     9
> 10 BC-0003 41522           168.65   12    10
> 11 BC-0004 41522           266.15   13    11
> 12 BC-0003 41627           168.95   14    12
> 13 BC-0004 41627           265.25   15    13
> 14 BC-0002 41634           312.31   16    14
> 15 BC-0003 41703           169.25   17    15
> 16 BC-0004 41703           265.05   18    16
> 17 BC-0002 41710           313.01   19    17
> 18 BC-0003 41795           168.85   20    18
> 19 BC-0004 41795           266.95   21    19
> 20 BC-0002 41801           330.41   22    20
> 21 BC-0003 41905           169.75   23    21
> 22 BC-0004 41905           267.75   24    22
> 23 BC-0002 41906           321.01   25    23
>
> Any help would be greatly appreciated!
>
>
> -Steve
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Date extract Year

archsteve
This post has NOT been accepted by the mailing list yet.
In reply to this post by Bert Gunter
Ah, Bert, you are right.

This works.

wells$newdates <- as.Date(wells$Date,"1899/12/30”)
wells$year<-as.numeric(format(newdates, "%Y”))

I am just not sure why 1900/01/01 would not be more correct, since that is what I thought the origin was in Excel.
Thanks,
Steve

On Mar 8, 2015, at 10:44 AM, Bert Gunter [via R] <[hidden email]> wrote:

Please read ?as.Date carefully. Your argument appears to be numeric
(??)  and you do not seem to have specified an origin:

"as.Date will accept numeric data (the number of days since an epoch),
but only if origin is supplied."

Cheers,
Bert

Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374

"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
Clifford Stoll




On Sat, Mar 7, 2015 at 5:49 PM, Steve Archambault <<a href="x-msg://48/user/SendEmail.jtp?type=node&amp;node=4704313&amp;i=0" target="_top" rel="nofollow" link="external">[hidden email]> wrote:

> Hi all,
>
> I am trying in vain to create a new object "Year" in my data frame from
> existing Date data. I have tried many different approaches, but can't seem
> to get it to work. Here is an example of some code I tried.
>
> date1<- as.Date(wells$Date,"%m/%d/%Y")
> wells$year<-as.numeric(format(date1, "%Y"))
>
> I am starting with data that looks like this.
>
>         ID  Date DepthtoWater_bgs test test2
> 1  BC-0004 41163           260.60    3     1
> 2  BC-0004 41255           261.65    4     2
> 3  BC-0003 41345           166.58    5     3
> 4  BC-0002 41351           317.85    6     4
> 5  BC-0004 41355           262.15    7     5
> 6  BC-0003 41438           167.55    8     6
> 7  BC-0004 41438           265.45    9     7
> 8  BC-0002 41443           317.25   10     8
> 9  BC-0002 41521           321.25   11     9
> 10 BC-0003 41522           168.65   12    10
> 11 BC-0004 41522           266.15   13    11
> 12 BC-0003 41627           168.95   14    12
> 13 BC-0004 41627           265.25   15    13
> 14 BC-0002 41634           312.31   16    14
> 15 BC-0003 41703           169.25   17    15
> 16 BC-0004 41703           265.05   18    16
> 17 BC-0002 41710           313.01   19    17
> 18 BC-0003 41795           168.85   20    18
> 19 BC-0004 41795           266.95   21    19
> 20 BC-0002 41801           330.41   22    20
> 21 BC-0003 41905           169.75   23    21
> 22 BC-0004 41905           267.75   24    22
> 23 BC-0002 41906           321.01   25    23
>
> Any help would be greatly appreciated!
>
>
> -Steve
>
> ______________________________________________
> <a href="x-msg://48/user/SendEmail.jtp?type=node&amp;node=4704313&amp;i=1" target="_top" rel="nofollow" link="external">[hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
______________________________________________
<a href="x-msg://48/user/SendEmail.jtp?type=node&amp;node=4704313&amp;i=2" target="_top" rel="nofollow" link="external">[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



If you reply to this email, your message will be added to the discussion below:
http://r.789695.n4.nabble.com/Date-extract-Year-tp4704295p4704313.html
To unsubscribe from Date extract Year, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Date extract Year

Bert Gunter
In reply to this post by archsteve
... and that is the source of your difficulties, as I and others have told you.

-- Bert

Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374

"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
Clifford Stoll




On Sun, Mar 8, 2015 at 11:27 AM, Steven Archambault
<[hidden email]> wrote:

> My date column is the excel numeric date format. For instance, in excel, that first date is 11 September 2012.
>
> On Mar 8, 2015, at 10:41 AM, Frederic Ntirenganya <[hidden email]> wrote:
>
>> Hi Steve,
>>
>> Can you please explain to us your date column? thanks.
>>
>> Regards,
>> Fredo.
>> On Mar 8, 2015 7:32 PM, "Steve Archambault" <[hidden email]> wrote:
>> Hi all,
>>
>> I am trying in vain to create a new object "Year" in my data frame from
>> existing Date data. I have tried many different approaches, but can't seem
>> to get it to work. Here is an example of some code I tried.
>>
>> date1<- as.Date(wells$Date,"%m/%d/%Y")
>> wells$year<-as.numeric(format(date1, "%Y"))
>>
>> I am starting with data that looks like this.
>>
>>         ID  Date DepthtoWater_bgs test test2
>> 1  BC-0004 41163           260.60    3     1
>> 2  BC-0004 41255           261.65    4     2
>> 3  BC-0003 41345           166.58    5     3
>> 4  BC-0002 41351           317.85    6     4
>> 5  BC-0004 41355           262.15    7     5
>> 6  BC-0003 41438           167.55    8     6
>> 7  BC-0004 41438           265.45    9     7
>> 8  BC-0002 41443           317.25   10     8
>> 9  BC-0002 41521           321.25   11     9
>> 10 BC-0003 41522           168.65   12    10
>> 11 BC-0004 41522           266.15   13    11
>> 12 BC-0003 41627           168.95   14    12
>> 13 BC-0004 41627           265.25   15    13
>> 14 BC-0002 41634           312.31   16    14
>> 15 BC-0003 41703           169.25   17    15
>> 16 BC-0004 41703           265.05   18    16
>> 17 BC-0002 41710           313.01   19    17
>> 18 BC-0003 41795           168.85   20    18
>> 19 BC-0004 41795           266.95   21    19
>> 20 BC-0002 41801           330.41   22    20
>> 21 BC-0003 41905           169.75   23    21
>> 22 BC-0004 41905           267.75   24    22
>> 23 BC-0002 41906           321.01   25    23
>>
>> Any help would be greatly appreciated!
>>
>>
>> -Steve
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Date extract Year

Rolf Turner
In reply to this post by archsteve

On 09/03/15 07:27, Steven Archambault wrote:

> My date column is the excel numeric date format. For instance, in
> excel, that first date is 11 September 2012.

And we were supposed to know that?  The level of obtuseness of people
who post to this list truly knows no lower bound.

Be that as it may, you could do:

o <- as.Date("2012/09/11")-41163
date1 <- as.Date(wells$Date,origin=o)

cheers,

Rolf Turner

>
> On Mar 8, 2015, at 10:41 AM, Frederic Ntirenganya <[hidden email]> wrote:
>
>> Hi Steve,
>>
>> Can you please explain to us your date column? thanks.
>>
>> Regards,
>> Fredo.
>> On Mar 8, 2015 7:32 PM, "Steve Archambault" <[hidden email]> wrote:
>> Hi all,
>>
>> I am trying in vain to create a new object "Year" in my data frame from
>> existing Date data. I have tried many different approaches, but can't seem
>> to get it to work. Here is an example of some code I tried.
>>
>> date1<- as.Date(wells$Date,"%m/%d/%Y")
>> wells$year<-as.numeric(format(date1, "%Y"))
>>
>> I am starting with data that looks like this.
>>
>>          ID  Date DepthtoWater_bgs test test2
>> 1  BC-0004 41163           260.60    3     1
>> 2  BC-0004 41255           261.65    4     2
>> 3  BC-0003 41345           166.58    5     3
>> 4  BC-0002 41351           317.85    6     4
>> 5  BC-0004 41355           262.15    7     5
>> 6  BC-0003 41438           167.55    8     6
>> 7  BC-0004 41438           265.45    9     7
>> 8  BC-0002 41443           317.25   10     8
>> 9  BC-0002 41521           321.25   11     9
>> 10 BC-0003 41522           168.65   12    10
>> 11 BC-0004 41522           266.15   13    11
>> 12 BC-0003 41627           168.95   14    12
>> 13 BC-0004 41627           265.25   15    13
>> 14 BC-0002 41634           312.31   16    14
>> 15 BC-0003 41703           169.25   17    15
>> 16 BC-0004 41703           265.05   18    16
>> 17 BC-0002 41710           313.01   19    17
>> 18 BC-0003 41795           168.85   20    18
>> 19 BC-0004 41795           266.95   21    19
>> 20 BC-0002 41801           330.41   22    20
>> 21 BC-0003 41905           169.75   23    21
>> 22 BC-0004 41905           267.75   24    22
>> 23 BC-0002 41906           321.01   25    23
>>
>> Any help would be greatly appreciated!

--
Rolf Turner
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276
Home phone: +64-9-480-4619

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Date extract Year

archsteve
Ha, sorry for the obtuseness Rolf. New to this.  Thanks for your help. 

-Steve


On Mar 8, 2015, at 9:25 PM, Rolf Turner [via R] <[hidden email]> wrote:

Rolf Turner