t;>
>> Dennis
>>
>>
>> On Sat, Jun 6, 2015 at 12:50 AM, Jim Lemon wrote:
>> > Hi rosalinazairimah,
>> > I think the problem is that you are using "if" instead of "ifelse". Try
>> this:
>> >
>> > wet_dry<-func
; > wet_dry<-function(x,thresh=0.1) {
> > for(column in 1:dim(x)[2]) x[,column]<-ifelse(x[,column]>=thresh,1,0)
> > return(x)
> > }
> > wet_dry(dt)
> >
> > and see what you get.
> >
> > Also, why can I read your message perfectly while ev
m
>
>>> -----Original Message-----
>>> From: roslina...@gmail.com
>>> Sent: Fri, 5 Jun 2015 16:49:08 +0800
>>> To: r-help@r-project.org
>>> Subject: [R] if else statement for rain data to define zero for dry and
>>> one to wet
>>>
&
; Sent: Fri, 5 Jun 2015 16:49:08 +0800
> >> To: r-help@r-project.org
> >> Subject: [R] if else statement for rain data to define zero for dry and
> >> one to wet
> >>
> >> Dear r-users,
> >>
> >> I have a set of rain data:
>
I read your message perfectly while everybody else can't?
Jim
>> -Original Message-
>> From: roslina...@gmail.com
>> Sent: Fri, 5 Jun 2015 16:49:08 +0800
>> To: r-help@r-project.org
>> Subject: [R] if else statement for rain data to define zero for dry
/Reproducibility.html for some suggestions on how to
post to R-help.
John Kane
Kingston ON Canada
> -Original Message-
> From: roslina...@gmail.com
> Sent: Fri, 5 Jun 2015 16:49:08 +0800
> To: r-help@r-project.org
> Subject: [R] if else statement for rain data to define zero for d
AM
> To: r-help@r-project.org
> Subject: [R] if else statement for rain data to define zero for dry and
> one to wet
>
> Dear r-users,
>
> I have a set of rain data:
>
> X1950 X1951 X1952 X1953 X1954 X1955 X1956 X1957 X1958 X1959 X1960 X1961
> X1962
>
> 1 0.0 0.0
Dear r-users,
I have a set of rain data:
X1950 X1951 X1952 X1953 X1954 X1955 X1956 X1957 X1958 X1959 X1960 X1961
X1962
1 0.0 0.0 14.3 0.0 13.5 13.2 4.0 0 3.3 0 0 0.0
2 0.0 0.0 21.9 0.0 10.9 6.6 2.1 0 0.0 0 0 0.0
3 25.3 6.7 18.6 0.8
8 matches
Mail list logo