it would be up to Daniel for clarification.
Regards,
Marc
--
Daniel Gerlanc
Williams College '07
__
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
Hello all,
Consider the following problem:
There are two vectors:
rows - c(1, 2, 3, 4, 5)
columns - c(10, 11, 12, 13, 14)
I want to create a matrix with dimensions length(rows) x length(columns):
res - matrix(nrow = length(rows), ncol = length(columns))
If i and j are the row and column
Hello All,
I've sent a few messages to the list regarding splitting a formula
into its right and left hand terms. Thanks to everyone who has
responded.
I believe that the best way to extract the left and right hand terms
as character vectors follows:
library(nlme)
formula - y ~ x + z
Hi All,
I sent the following message to R-help on July 14th, 2006:
Let's say I have the following formula:
a.formula - x ~ y + z
I want to extract the left and right-hand sides of the function so
that I have two character vectors like the ones you would create using
the following assignments:
this follows:
left.hand.side - unlist(dimnames(attr(terms(a.formula), factors))[1])
right.hand.side - unlist(dimnames(attr(terms(a.formula), factors))[-1])
Is there a better or cleaner way to do this?
Thanks!
Daniel Gerlanc
Williams College '07
__
R-help