Re: [R] Problem with range()

2012-02-01 Thread William Dunlap
ite=TRUE) [1] 1 2 Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Colin Wahl > Sent: Wednesday, February 01, 2012 4:48 PM > To: r-help@r-project.org

Re: [R] Problem with range()

2012-02-01 Thread Sarah Goslee
Hi Colin, You should always check the help for your function: ?range says: range(..., na.rm = FALSE) Arguments: ...: any ‘numeric’ or character objects. na.rm: logical, indicating if ‘NA’'s should be omitted. So for example: > x <- c(1, 2, NA, 3) > range(x) [1] NA NA > range(x, na

[R] Problem with range()

2012-02-01 Thread Colin Wahl
Hello, I'm using range do define boundaries for a linear model, so the line I graph is only graphed for the range of data. There are NAs in the data, but I dont remember this being a problem before. I typed na.action=na.omit anyway, which has usually solved any NA issues in the past. Any idea why R