On Thu, Oct 14, 2010 at 6:59 PM, Gabor Grothendieck
wrote:
> On Thu, Oct 14, 2010 at 9:59 AM, Santosh Srinivas
> wrote:
>> Wow! That’s Amazing! Many thanks!
>>
>> When I do the below ... why do the column names get thrown off? Ticker is a
>> factor / character ... I tried both
>>
>>> temp <- head
On Thu, Oct 14, 2010 at 9:59 AM, Santosh Srinivas
wrote:
> Wow! That’s Amazing! Many thanks!
>
> When I do the below ... why do the column names get thrown off? Ticker is a
> factor / character ... I tried both
>
>> temp <- head(MF_Data_Sub)
>> temp
> Date Ticker Price
> 1 2008-04-01 1062
urn profile on the data below after it
is transformed?
Thanks very much!
S
-Original Message-
From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com]
Sent: 14 October 2010 18:22
To: Santosh Srinivas
Cc: r-help
Subject: Re: [R] Replacing N.A values in a data frame
On Thu, Oct 14, 2010 a
On Thu, Oct 14, 2010 at 4:17 AM, Santosh Srinivas
wrote:
> Hello, I have a data frame as below ... in cases where I have N.A. I want
> to use an average of the past date and next date .. any help?
>
> 13/10/2010 A 23
> 13/10/2010 B 12
> 13/10/2010 C 124
> 14/10/20
If I understand you can use approxfun:
DF <- read.table(textConnection("
13/10/2010 A 23
13/10/2010 B 12
13/10/2010 C 124
14/10/2010 A 43
14/10/2010 B 54
14/10/2010 C 65
15/10/2010 A 43
15/10/2010 B N.A.
15/10/
Hello, I have a data frame as below ... in cases where I have N.A. I want
to use an average of the past date and next date .. any help?
13/10/2010 A 23
13/10/2010 B 12
13/10/2010 C 124
14/10/2010 A 43
14/10/2010 B 54
14/10/2010 C 6
6 matches
Mail list logo