Hi, I have (x, y) data as the follows (saved in the txt file): x y 1 8 2 5 3 3 4 + 5 -1 6 + When I read this txt file into R and attach this data, I found the output of y is as the follows [1] 8 5 3 + -1 + Levels: -1 + 3 5 8 Could I get rid of Levels in the output? Because I need to use the observed y and x run regression first and then assign the value to the missing y later. Thanks, Kate [[alternative HTML version deleted]]
kate <yhsu6 <at> uiuc.edu> writes: [snip]> > When I read this txt file into R and attach this data, I found the output of yis as the follows> [1] 8 5 3 + -1 + > Levels: -1 + 3 5 8 > > Could I get rid of Levels in the output? Because I need to use the observed yand x run regression first and then> assign the value to the missing y later. >You probably want to use the argument na.strings="+" in your input command (scan or read.table) -- R is interpreting the existence of a non-numeric value in your input as evidence that you want that variable to be a factor (a categorical, non-numeric variable). Ben Bolker