[R] Cannot use negative argument in function

lidaky svfilhol at alaska.edu
Wed Feb 29 07:03:19 CET 2012


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
"

Do you have any idea what can be the reason?
Thanks
Simon

--
View this message in context: http://r.789695.n4.nabble.com/Cannot-use-negative-argument-in-function-tp4430667p4430667.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list