Re: [R] basic dataframe question

2008-09-03 Thread Prof Brian Ripley
The problem is your misuse of cbind. You want CuIEP <- data.frame(Cu = CuZn$Cu, CuCen = CuZn$CuCen, StartCu, EndCu) cbind() created a matrix, as there were numeric inputs the matrix has to be numeric. I've absolutely no idea where you got the idea to use cbind here, but it is helpdful to tes

Re: [R] basic dataframe question

2008-09-02 Thread Aval Sarri
Does ?I() help? See ? I() Regards Aval On Wed, Sep 3, 2008 at 9:30 AM, <[EMAIL PROTECTED]> wrote: > R Users: > > I'm wondering: > > Why does my logical vector becomes a numeric vector when stuffed into a data > frame? How do I change this so that it's retained as a logical data type? > I

[R] basic dataframe question

2008-09-02 Thread Matthew.Findley
R Users: I'm wondering: Why does my logical vector becomes a numeric vector when stuffed into a data frame? How do I change this so that it's retained as a logical data type? I've tried a couple of things but to no avail. Here's my example code: # Exercise 4-1 in Non-Detects and Data Analy