I'm having the following issue with rpy. I'm calling r.lm to do a bunch of regressions (several hundred thousand over a loop) but get a segfault as listed below. I think it is a memory issue because the same regression will work if I start the loop closer to where the segfault occurs. Also, I think the issue concerns data.frames since I don't get any problems when I use lsfit (which does the regression using vectors instead of a data frame). Any experience with such issues or suggestions as to where to look for a solution would be much appreciated.
Thanks, Paul RHOME= /usr/local/R-2.6.0/lib/R RVERSION= 2.6.0 RVER= 2060 RUSER= /home/jung Loading Rpy version 2060 .. Done. Creating the R object 'r' .. Done *** caught segfault *** address 0xc5ac, cause 'memory not mapped' Traceback: 1: match.call() 2: function (formula, data, subset, weights, na.action, method = "qr", model = TRUE, x = FALSE, y = FALSE, qr = TRUE, singular.ok = TRUE, contrasts = NULL, offset, ...) { ret.x <- x ret.y <- y cl <- match.call() mf <- match.call(expand.dots = FALSE) m <- match(c("formula", "data", "subset", "weights", "na.action", "offset"), names(mf), 0) mf <- mf[c(1, m)] mf$drop.unused.levels <- TRUE mf[[1]] <- as.name("model.frame") mf <- eval(mf, parent.frame()) if (method == "model.frame") return(mf) else if (method != "qr") warning(gettextf("method = '%s' is not supported. Using 'qr'", method), domain = NA) mt <- attr(mf, "terms") y <- model.response(mf, "numeric") w <- as.vector(model.weights(mf)) if (!is.null(w) && !is.numeric(w)) stop("'weights' must be a numeric vector") offset <- as.vector(model.offset(mf)) if (!is.null(offset)) { if (length(offset) == 1) offs! et <- rep(offset, NROW(y)) else if (length(offset) != NROW(y)) stop(gettextf("number of offsets is %d, should equal %d (number of observations)", length(offset), NROW(y)), domain = NA) } if (is.empty.model(mt)) { x <- NULL z <- list(coefficients = if (is.matrix(y)) matrix(, 0, 3) else numeric(0), residuals = y, fitted.values = 0 * y, weights = w, rank = 0, df.residual = if (is.matrix(y)) nrow(y) else length(y)) if (!is.null(offset)) { z$fitted.values <- offset z$residuals <- y - offset } } else { x <- model.matrix(mt, mf, contrasts) z <- if (is.null(w)) lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) else lm.wfit(x, y, w, offset = offset, singular.ok = singular.ok, ...) } class(z) <- c(if (is.matrix(y)) "mlm", "lm") z$na.action <- attr(mf, "na.action") z$offset <- offse! t z$contrasts <- attr(x, "contrasts") z$xlevels <- .getX! levels(m t, mf) z$call <- cl z$terms <- mt if (model) z$model <- mf if (ret.x) z$x <- x if (ret.y) z$y <- y if (!qr) z$qr <- NULL z}(y ~ x + x2 + x3, data = list(x2 = c(0a, d7, a3, 70, 3d, 0a, b7, 3f, ec, 51, b8, 1e, 85, eb, c9, 3f, 5d, 8f, c2, f5, 28, 5c, d3, 3f, 0a, d7, a3, 70, 3d, 0a, d7, 3f, c6, dc, b5, 84, 7c, d0, d7, 3f, 0b, 46, 25, 75, 02, 9a, d8, 3f, d8, 12, f2, 41, cf, 66, d9, 3f, 2d, 43, 1c, eb, e2, 36, da, 3f, 0b, d7, a3, 70, 3d, 0a, db, 3f, 71, ce, 88, d2, de, e0, db, 3f, 60, 29, cb, 10, c7, ba, dc, 3f, d7, e7, 6a, 2b, f6, 97, dd, 3f, d6, 09, 68, 22, 6c, 78, de, 3f), x3 = NULL, y = NULL, x = c(33, 33, 33, 33, 33, 33, d3, 3f, cd, cc, cc, cc, cc, cc, dc, 3f, 9a, 99, 99, 99, 99, 99, e1, 3f, 33, 33, 33, 33, 33, 33, e3, 3f, 85, eb, 51, b8, 1e, 85, e3, 3f, d7, a3, 70, 3d, 0a, d7, e3, 3f, 29, 5c, 8f, c2, f5, 28, e4, 3f, 7b, 14, ae, 47, e1, 7a, e4, 3f, cd, cc, cc, cc, cc, cc, e4, 3f, 1f, 85, eb, 51, b8, 1e, e5, 3f, 71, 3d, 0a, ! d7, a3, 70, e5, 3f, c3, f5, 28, 5c, 8f, c2, e5, 3f, 15, ae, 47, e1, 7a, 14, e6, 3f)), weights = c(5L, 4L, 15L, 4L, 6L, 5L, 6L, 8L, 14L, 7L, 23L, 11L, 17L, 6L, 21L, 8L, 8L, 8L, 8L, 10L, 14L, 13L, 18L, 12L, 38L, 14L, 33L, 26L, 37L, 35L, 26L, 28L, 56L, 46L, 27L, 33L, 51L, 22L, 33L, 25L, 49L, 28L, 12L, 22L, 22L, 19L, 20L, 16L, 20L, 8L, 15L, 10L, 29L, 10L, 16L, 12L, 17L, 32L, 30L, 28L, 22L, 14L, 30L, 19L, 17L, 21L, 15L, 36L, 23L, 24L, 37L, 51L, 32L, 17L, 36L, 7L, 34L, 9L, 20L, 4L, 40L, 9L, 34L, 31L, 36L, 55L, 50L, 35L, 45L, 35L, 16L, 13L, 14L, 9L, 23L, 5L, 6L, 9L, 9L, 25L, 8L, 4L, 12L, 9L)) Possible actions: 1: abort (with core dump, if enabled) 2: normal R exit 3: exit R without saving workspace 4: exit R saving workspace IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list