table(tmod$groups$g) For example: 1 2 3 4 5 6 7 8 9 10 98 98 99 99 97 96 97 99 98 99 I am aware of how to extract the coefficients by group for a linear mixed effects model (e.g., coef (/lme.model/),
[1] 0.03490228 I have a very simple question on linear regression: does Splus function lm provide R^2? I checked help but could not find it. Of course one can always get it by using the residual to
Look at the help for trellis.device() and for the specific device you are using. For a graphsheet device, you might do this: trellis.device(graphsheet, orientation="portrait") xyplot(NOx ~ C | E, dat
How about coercing the result of years(x) to numeric? x <- dates(seq(0, 3660, 366)) as.numeric(as.character(years(x))) [1] 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 See ?years. hope this
You might try something like this: x <- rnorm(20) y <- runif(20) par(las=1) plot(x, y, yaxt="n", ylim=c(0,1)) axis(side=2, at=seq(0,1,.1), labels=paste(seq(0,100,10), "%", sep="")) see ?axis hope thi
One bar for each row? Do you really want 132 bars per plot? How about something like this: mymat <- matrix(runif(132*6), ncol=6) par(las=1, mfrow=c(2,3)) for(i in 1:6){barplot(mymat[,i])} i have a ma
As you have heard, you can put the results together in a list and then return the list. myfun <- function(){ A <- OLS(y ~ x1 + x2) B <- OLS(y ~ X3 + x4) ans <- list(A = A, B = B) return(ans) } fun<-f
There was a thread on this in June of 2000. For example, http://tolstoy.newcastle.edu.au/R/help/00a/0515.html http://tolstoy.newcastle.edu.au/R/help/00a/0512.html You can search the archives here: ht
Sorry for not noticing this was posted to s-news, not r-help! http://tolstoy.newcastle.edu.au/R/help/00a/0515.html http://tolstoy.newcastle.edu.au/R/help/00a/0512.html You can search the archives her
From ?polr you find: "The response should be a factor (preferably an ordered factor), which will be interpreted as an ordinal response, with levels ordered as in the factor." See ?ordered for how to
Annaële: Notice the "all" argument in ?merge. You probably want the following: ID X1 X2 1 1 T F 2 2 F NA 3 3 F F 4 4 T T 5 5 T NA 6 6 F F 7 7 F NA 8 8 T NA 9 9 F NA 10 10 F NA hope this helps, Chuc