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. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.