You probably have a working solution by now, from the other
responses, but s ince you're new to R I'd like to point out a few
things.
(1)
Using subset() to pull out just one column is overkill. Two simpler ways are
KN1 <- KN[ , 5]## note the comma
KN1 <- KN[[5]]
And learning how to do
On Aug 7, 2009, at 4:29 PM, DebbieMB wrote:
Hi,
I am also new to R and I have a related question. I am trying to set
negative values in a single column of a dataframe to zero and I
can't seem
to do it.
I have tried:
KN1<-subset(KN,select=c(5))
# Here I am selecting the column of the data
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Daniel Nordlund
> Sent: Friday, August 07, 2009 2:50 PM
> To: r-help@r-project.org
> Subject: Re: [R] Seeing negative numbers to zero
>
> > -Ori
On 07-Aug-09 20:29:16, DebbieMB wrote:
> Hi,
> I am also new to R and I have a related question. I am trying
> to set negative values in a single column of a dataframe to zero
> and I can't seem to do it.
>
> I have tried:
> KN1<-subset(KN,select=c(5))
># Here I am selecting the column of the da
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of DebbieMB
> Sent: Friday, August 07, 2009 1:29 PM
> To: r-help@r-project.org
> Subject: [R] Seeing negative numbers to zero
>
>
> Hi,
>
>
Hi,
I am also new to R and I have a related question. I am trying to set
negative values in a single column of a dataframe to zero and I can't seem
to do it.
I have tried:
KN1<-subset(KN,select=c(5))
# Here I am selecting the column of the dataframe KN1 and assigning it the
name KN2 - this ste
6 matches
Mail list logo