similar to: Why can't I "unclass" an array?

Displaying 20 results from an estimated 20000 matches similar to: "Why can't I "unclass" an array?"

2019 Apr 05
6
all.equal failure
This arose in testing [.terms and has me confused. data(esoph)?? # use a standard data set t0x <- terms(model.frame( ~ tobgp, data=esoph)) t1 <-? terms(model.frame(ncases ~ agegp + tobgp, data=esoph)) t1x <- (delete.response(t1))[-1] > all.equal(t0x, t1x) [1] TRUE # the above is wrong, because they actually are not the same > all.equal(attr(t0x, 'dataClasses'),
2012 Nov 30
1
Baffled with as.matrix
I'm puzzled by as.matrix. It appears to work differently for Surv objects. Here is a session from my computer: tmt% R --vanilla > library(survival) Loading required package: splines > ytest <- Surv(1:3, c(1,0,1)) > is.matrix(ytest) >[1] TRUE > attr(ytest, 'type') [1] "right" > attr(as.matrix(ytest), 'type') [1] "right" >
2010 Nov 11
3
Evaluation puzzle
The survexp function can fail when called from another function. The "why" of this has me baffled, however. Here is a simple test case, using a very stripped down version of survexp: survexp.test <- function(formula, data, weights, subset, na.action, rmap, times, cohort=TRUE, conditional=FALSE, ratetable=survexp.us, scale=1, npoints, se.fit,
2014 Nov 12
4
Problem with build and check
I am getting failure of build and check, for an Rd file that has a long argument list. Guess diagnosis: a quoted string beyond a certain point in the argument list is fatal. Example: Use the function below, create an Rd file for it with prompt(). Move the .Rd file to the man directory (no need to edit it) and try building dart.control <- function(server=c("production",
2015 May 15
2
Installation error with R-devel
I have a local library with functions that interrogates an institution-specific web API, so is not of interest to anyone outside of Mayo. For some reason the R CMD INSTALL command fails. See below: Build the library, then install it. tmt-local2127% R CMD build dart * checking for file ?dart/DESCRIPTION? ... OK * preparing ?dart?: * checking DESCRIPTION meta-information ... OK * installing
2010 Apr 23
2
Deferred Default Marker
I've finally narrowed down a puzzling problem: here is the short test case. tmt34% R --vanilla R version 2.10.0 (2009-10-26) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 > temp <- matrix(runif(50), ncol=2) > t(temp) %*% temp [,1] [,2] [1,] 7.916016 6.049698 [2,] 6.049698 7.650694 > library(kinship) Loading required package:
2011 Apr 18
2
help with eval()
I've narrowed my scope problems with predict.coxph further. Here is a condensed example: fcall3 <- as.formula("time ~ age") dfun3 <- function(dcall) { fit <- lm(dcall, data=lung, model=FALSE) model.frame(fit) } dfun3(fcall3) The final call fails: it can't find 'dcall'. The relevant code in model.frame.lm is: env <- environment(formula$terms)
2024 Feb 07
2
Difficult debug
?I've hit a roadblock debugging a new update to the survival package.?? I do debugging in a developement envinment, i.e. I don't create and load a package but rather? source all the .R files and dyn.load an .so file, which makes things a bit easier. ? Running with R -d "valgrind --tool=memcheck --leak-check=full" one of my test files crashes in simple R code a dozen lines
2024 Feb 07
2
Difficult debug
I haven't done any R memory debugging lately, but https://www.mail-archive.com/rcpp-devel at lists.r-forge.r-project.org/msg10289.html shows how I used to have gdb break where valgrind finds a problem so you could examine the details. Also, running your code after running gctorture(TRUE) can help track down memory problems. -Bill On Wed, Feb 7, 2024 at 12:03?PM Therneau, Terry M., Ph.D.
2019 Apr 05
3
[EXTERNAL] Re: Re: all.equal failure
>>>>> Duncan Murdoch >>>>> on Fri, 5 Apr 2019 11:12:48 -0400 writes: > On 05/04/2019 10:46 a.m., Therneau, Terry M., Ph.D. wrote: >> >> >> On 4/5/19 9:39 AM, Duncan Murdoch wrote: >>> On 05/04/2019 10:19 a.m., Therneau, Terry M., Ph.D. wrote: >>>> Duncan, >>>> ?? I should have
2017 Aug 31
2
Missing y label
My on-screen plots with the latest build are acting strange. If the y label is longer than some small value it is not shown. Here is the script of a job. A pdf graph is fine. I use xubuntu as the windowing system. tmt-local1334% R --vanilla R Under development (unstable) (2017-08-31 r73172) -- "Unsuffered Consequences" Copyright (C) 2017 The R Foundation for Statistical Computing
2011 Jul 15
1
Confusing inheritance problem
I have library in development with a function that works when called from the top level, but fails under R CMD check. The paricular line of failure is rsum <- rowSums(kmat>0) where kmat is a dsCMatrix object. I'm currently stumped and looking for some ideas. I've created a stripped down library "ktest" that has only 3 functions: pedigree.R to create a pedigree or
2020 Jan 13
5
as-cran issue
Where can I find out (and replicate) what options as-cran turns on? The issue: the following lines generate an error in R CMD check --as-cran? for coxme.? But there is no error without as-cran nor is there one when I run the code in a terminal window. ismat <- function(x)? inherits(x, "matrix") || inherits(x, "bdsmatrix") || inherits(x, "Matrix") if
2010 Oct 07
1
model.frame deficiency
The model.frame function has trouble with a certain type of really long formula. Here is a test: tname <- paste('var', 1:50, sep='') tmat <- matrix(rnorm(500), ncol=50, dimnames=list(NULL, tname)) tdata <- data.frame(tmat) temp1 <- paste( paste(tname, tname, sep='='), collapse=', ') temp2 <- paste("~1 + cbind(", temp1, ")")
2019 Mar 28
2
issue with latest release of R-devel
I'm getting ready to submit an update of survival, and is my habit I run the checks on all packages that depend/import/suggest? survival.? I am getting some very odd behaviour wrt non-reproducability.? It came to a head when some things failed on one machine and worked on another.?? I found that the difference was that the failure was using the 3/27 release and the success was still on a
2013 Apr 29
1
Loss of identified points
Minimizing and then restoring a window that contains identified points leads to an error on my linux box. > sessionInfo() R version 3.0.0 (2013-04-03) Platform: i686-pc-linux-gnu (32-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=C [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=C LC_NAME=C [9]
2017 Apr 06
3
failure of make check-all
This run was done this AM on my linux box, and older 32 bit Dell optiplex (core 2 duo). The failure message is at the very end. (It's due to be replaced in a couple of weeks.) The sequence of steps was svn up tools/rsync-recommended ./configure make make check-all |& tee zzz Terry T. Result of ./config R is now configured for i686-pc-linux-gnu Source directory: .
2006 May 12
2
reusing routines
I've created some Splus code for a microarray problem that - needed to be in C, to take advantage of some sparse matrix properties - uses a cholesky decompostion as part of the computation For the cholesky, I used the cholesky2 routine, which is a part of the survival library. It does just what I want and I'm familiar with it (after all, I wrote it). In Splus, this all works
2012 Sep 28
3
Simple Question
Hi Everyone, I am trying a very simple task to append the Timestamp with a variable name so something like a_2012_09_27_00_12_30 <- rnorm(1,2,1). Tried some commands but it doesn't work out well. Hope someone has some answer on it. Session Info R version 2.15.1 (2012-06-22) Platform: i386-apple-darwin9.8.0/i386 (32-bit) locale: [1]
2006 Sep 05
3
terms.inner
Question: I am trying to impliment a function in R that we use quite regularly in Splus, and it fails due to a lack of the "terms.inner" function in R. The substitute is? Part question and part soapbox: Why remove terms.inner from R? It's little used, but rather innocuous. Mostly soapbox: I figured it was no big deal, as I originally discovered the use of terms.inner from