search for: nobj

Displaying 5 results from an estimated 5 matches for "nobj".

Did you mean: kobj
2008 Mar 29
1
A patch for extending pdf device to embed popup text and web links
...**** --- 6368,6374 ---- static void PDF_endpage(PDFDesc *pd) { int here; + int i; if(pd->inText) textoff(pd); fprintf(pd->pdffp, "Q\n"); here = (int) ftell(pd->pdffp); *************** *** 6343,6348 **** --- 6376,6397 ---- pd->pos[++pd->nobjs] = (int) ftell(pd->pdffp); fprintf(pd->pdffp, "%d 0 obj\n%d\nendobj\n", pd->nobjs, here - pd->startstream); + pd->pos[++pd->nobjs] = (int) ftell(pd->pdffp); + fprintf(pd->pdffp, "%d 0 obj\n<<\n/Type /Page\n/Parent 3 0 R\n/Contents %...
2004 Nov 26
2
sorting a data.frame using a vector
...like to sort the rows of the data.frame x w.r.t. the order of labels in y. example: x <- data.frame(c(1:4),c(5:8)) row.names(x)<-LETTERS[1:4] y <- c("C","A","D","B") My current solution is like this: if(!is.null(y) && is.vector(y)) { nObj <- length(y) for (i in 1:nObj) { sObj <- y[i] k <- c(1:nrow(x))[row.names(x)==sObj] if (i != k) { names <- row.names(x) tObj <- row.names(x[i,]) temp <- x[i,] x[i,] <- x[k,] x[k,] <- temp names[i] <- sO...
2009 Nov 15
1
Problem building package for R 2.10.0 on Mac OS X
...an which contains bstick.default. bstick.chclust <- function(n, ng=10, plot=TRUE, ...) { if (n$method != "coniss") stop("bstick cannot display conslink results") require(vegan) disp <- rev(n$height) tot.disp <- disp[1] disp <- abs(diff(disp)) nobj <- length(n$height) bs <- bstick(nobj, tot.disp) yR <- range(disp[1:(ng-1)], bs[1:(ng-1)]) if (plot) { plot(2:ng, disp[1:(ng-1)], type="o", ylim=yR, ylab="Sum of Squares", xlab = "Number of groups") lines(2:ng, bs[1:(ng-1)], col="red&...
2007 May 21
1
PLS in R and SAS
Dear all: I am comparing the PLS outputs of R and SAS for the following data set: Y x1 x2 x3 3 6 2 2 3 1 5 5 4 7 4 1 5 6 5 6 2 4 3 2 8 5 0 9 where Y is the dependent variable and x1, x2, x3 are the independent variables. I found several PLS algorithms in R (NIPALS,SIMPLS,KERNEL PLS). SAS has SIMPLS and NIPALS. The following are the NIPALS calculations of
2003 Jul 03
1
S4 method and S3 method with same name: potentially dangerous?
...description = new("character")), + validity=NULL, + sealed=TRUE) [1] "RSVMState" > setMethod("predict", signature("RSVMState","numeric", "missing"), function(object, newdata, ...) { cat("\nobj:\n"); print(object); cat("\n\nnewdata;\n");print(newdata);return();}) Creating a new generic function for "predict" [1] "predict" > predict genericFunction for "predict" defined from package "base" function (object, ...) standardGeneric(&...