Message-ID: <E93170C7-6BAF-45E7-A660-341903B7CA84@xs4all.nl>
Date: 2012-02-29T08:34:52Z
From: Berend Hasselman
Subject: Cannot use negative argument in function
In-Reply-To: <1330495399217-4430667.post@n4.nabble.com>
On 29-02-2012, at 07:03, lidaky wrote:
> Hi,
>
> today i wrote a function in R of the type:
>
> index.refraction <- function(Temp,Press, RH, CO2)
>
> When i try to plug a negative number in Temp, i got this type of error:
>
> "
> n <- index.refraction(Temp= -40,100,80,CO2)
> Messages d'avis :
> 1: In Ops.ordered(left, right) : '-' is not meaningful for ordered factors
> 2: In Ops.factor(left, right) : - not meaningful for factors
> 3: In Ops.factor(left, right) : - not meaningful for factors
> 4: In Ops.ordered(left, right) : '-' is not meaningful for ordered factors
> 5: In Ops.factor(left, right) : - not meaningful for factors
> 6: In Ops.factor(left, right) : - not meaningful for factors
> "
Without the code of your function we can only guess.
Please follow the posting guide.
Berend