Dear S-users As a non-expert in split-plot analysis of variance I need some help in the interpretation of the output given by summary(aov(... + Error())) for unbalanced designs. With the following da
Who says that \textsf{S-PLUS} is the correct way?! I am just reviewing a book about S-Plus where S-Plus is written as \textsc{S-Plus} (which, by the way, is similar to the style used in the newest m
Use one of the following functions (and see the example below) select1 <- function(id, n){ z <- as.variable(factor(id, labels=table(id))) z>=n } select2 <- function(id, n){ ord <- order(id) r <- rle(
This looks like a bug in [.data.frame when unique row names are constructed. Here is a small example: x y 1 1 3 2 2 4 Problem in [.data.frame: Missing value where logical needed: if(!missing(..1) &&
I think this is not quite the right answer to Valerie's question. She asked: ^^^^^^^^^^^^ Here is a solution. VZ.df <- data.frame(V1=rep("a",12), V2=c(rep("b",4),rep("c",8)), V3=c(rep("d",4),rep("e",
No! It's as unefficient as Solution A for large data frames. The 'problem' in both solutions is aggregate.data.frame or more precisely the call aggregate(VZ.df$V5, by=VZ.df[,c("V1","V2","V3","V4","jj
Use the xlim argument together with the *undocumented* argument 'axs' to scales: barchart(Name ~ Mileage, data=dum.df, subset=Type=="Van", xlim=c(0,21), scales=list(x=list(axs="i"))) Christian Keller
Yes there is: par("xaxt") and par("yaxt"). So, a simple fix would be: (I assume that the S-Plus expert has a more elegant solution.) mybox <- function(n = 1, fill = F, ...) { oldpar <- par(exp = 1, .
Add a new argument BACKTRANS to text.tree() an insert the following lines before, e.g., cxy <- par("cxy")[2] if(is.null(ylevels)){ # only for regression trees if(!missing(BACKTRANS)){ if(is.character
Dear S+ users Has anyone also stumbled over the problem of fitting an AR process (using 'ar.burg') without subtracting the mean of the series first? par(mfrow=c(2,1)) acf(log(lynx), type="part") acf(
I would recommend you to use the function 'str' which is available from Statlib (http://lib.stat.cmu.edu/S/) str: Compactly print STRucture of any S object. S function 'str', help, utilities and exam
There at least two possibilities: frame() # begin a new figure par(fig=c(0,1,0,0.75)) tsplot(sunspot) par(fig=c(0,1,0.65,1)) tsplot(lynx) par(fig=c(0,1,0,1)) # reset fig to default trellis.device(mot
Yes. Short and easy: (Note that FUN="-" is the default) sweep(X, 2, a, FUN="-") -- Christian -- Christian Keller Tel: +41 61 686 98 81 AICOS Technologies AG Fax: +41 61 686 98 88 Efringerstrasse 32 e
You may use sample() to generate multinomial random numbers in the following way: codes <- 1:5 # assume the feeding sites are coded as 1,2,3,4,5 probs <- c(.25, .35, .4, 0, 0) # the probabilities for