From: Evan Cooch <evan.cooch_at_cornell.edu>

Date: Mon 18 Sep 2006 - 16:30:57 GMT

Date: Mon 18 Sep 2006 - 16:30:57 GMT

test=matrix(c(~ x^3-5*x+4, ~log(x^2-4*x)))

Now, when I look at test, I see

[,1]

[1,] Expression

[2,] Expression

Fine. When I try to extract one of the vector elements, I see (for example)

> test[1]

[[1]]

~x^3 - 5 * x + 4

should *in theory* work, but I get the following:

f <- expression(x^3-5*x+4);

D(f,"x");

So, even though it looks as if each element of test is coded as an expression, it seems as though it is somehow a different type of expression than if I code it explicitly as an expression. I'm *guessing* it has to do with the tilde operator not assigning the formula to anything, but I'm not sure.

Suggestions? Pointers to the obvious?

Thanks!

-- ---------------------------------------------------------------------- Evan Cooch e.mail: evan.cooch@cornell.edu Department of Natural Resources voice: 607-255-1368 Fernow Hall - Cornell University FAX: 607-255-0349 Ithaca, NY 14853 http://canuck.dnr.cornell.edu ---------------------------------------------------------------------- Nihilism is best done by professionals. - Iggy Pop ______________________________________________ R-help@stat.math.ethz.ch 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.Received on Tue Sep 19 02:39:30 2006

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.1.8, at Mon 18 Sep 2006 - 17:30:06 GMT.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*