Glad it works. So far we seem to have at least three ways to do it. R is
amazing!
John Kane
Kingston ON Canada
> -Original Message-
> From: antony.akk...@ge.com
> Sent: Mon, 2 Jul 2012 06:04:03 -0700 (PDT)
> To: r-help@r-project.org
> Subject: Re: [R] Decrete value ch
.wholenumber(aa))
cbind(aa, ww)
John Kane
Kingston ON Canada
> -Original Message-
> From: [hidden email]
> Sent: Mon, 2 Jul 2012 03:04:48 -0700 (PDT)
> To: [hidden email]
> Subject: [R] Decrete value check in a matrix
>
> Hi All,
>
> Here i
Hi,
Try this:
dat1<-read.table(text="
ABC XYZ
1 2.5
3.4 4
5 6
5.6 6.7
",sep="",header=TRUE)
dat1[dat1$ABC ==as.integer(dat1$ABC), "ABC_RESULT"]<-TRUE
dat1[dat1$XYZ== as.integer(dat1$XYZ),"XYZ_RESULT"]<-TRUE
dat1[is.na(dat1)]<-FALSE
dat
ON Canada
>
>
>> -Original Message-
>> From: antony.akk...@ge.com
>> Sent: Mon, 2 Jul 2012 03:04:48 -0700 (PDT)
>> To: r-help@r-project.org
>> Subject: [R] Decrete value check in a matrix
>>
>> Hi All,
>>
>> Here i have an Dataframe (
b = c(2.4, 4, 6, 6.7))
ww <- data.frame( is.wholenumber(aa))
cbind(aa, ww)
John Kane
Kingston ON Canada
> -Original Message-
> From: antony.akk...@ge.com
> Sent: Mon, 2 Jul 2012 03:04:48 -0700 (PDT)
> To: r-help@r-project.org
> Subject: [R] Decrete value check in a ma
Hi All,
Here i have an Dataframe (or) Matrix like this,
MyMatrix <-
ABC XYZ
-----
1 2.5
3.4 4
5 6
5.6 6.7
Here i need to check each column value having decrete value or not ?.
If that particular coulmn-value having decrete val
6 matches
Mail list logo