[R] Help with decimal points

2010-09-07 Thread Amit Patel
Hi I have found a little problem with an R script. I am trying to merge some data and am finding something unusual going on. As shown below I am trying to assign (MatchedValues[Value2,Value]) to (ClusteredData[k,Value]) which are two separate dataframes. 1) By the following command you can

Re: [R] Help with decimal points

2010-09-07 Thread Sarah Goslee
MatchedValues is a factor rather than numeric, and so is giving you results you don't expect. 4420 is the level of the factor, out of the 6618 total levels. Probably the best thing to do is figure out why your data are factors when you expect numbers. Sarah On Tue, Sep 7, 2010 at 4:38 PM, Amit

Re: [R] Help with decimal points

2010-09-07 Thread Ista Zahn
Hi Amit, MatchedValues$Value is a factor. Converting factors to numeric is a FAQ: see http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-do-I-convert-factors-to-numeric_003f Best, Ista On Tue, Sep 7, 2010 at 4:38 PM, Amit Patel amitrh...@yahoo.co.uk wrote: Hi I have found a little problem

Re: [R] Help with decimal points

2010-09-07 Thread David Winsemius
On Sep 7, 2010, at 4:38 PM, Amit Patel wrote: I have found a little problem with an R script. I am trying to merge some data and am finding something unusual going on. As shown below I am trying to assign (MatchedValues[Value2,Value]) to (ClusteredData[k,Value]) which are two separate