[R] Cannot use negative argument in function
Berend Hasselman
bhh at xs4all.nl
Wed Feb 29 09:34:52 CET 2012
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
More information about the R-help
mailing list