similar to: or of a logical vector

Displaying 20 results from an estimated 10000 matches similar to: "or of a logical vector"

2005 Aug 22
2
problem building dendrograms to use with heatmap()
Hi, I'm trying to build dendrograms to pass to heatmap(). The dendrograms I build plot properly, but when I pass them to heatmap() I get the error message "row dendrogram ordering gave index of wrong length" (see output log below). I looked in the code of heatmap() and saw that the error was due to a NULL return value from order.dendrogram(), which in turn got a NULL return value
2008 Jan 03
2
confidence interval too small in nlme?
Hello, I am interested in using nlme to model repeated measurements, but I don't seem to get good CIs. With the code below I tried to generate data sets according to the model given by equations (1.4) and (1.5) on pages 7 and 8 of Pinheiro and Bates 2000 (having chosen values for beta, sigma.b and sigma similar to those estimated in the text). For each data set I used lme() to fit a model,
2016 Jan 11
2
rgl.snapshot only captures a small portion what's visible in the RGL device window on CentOS 7
Dear R-SIG-Fedora, I'm finding that on CentOS 7, rgl.snapshot (a function in the R package rgl, which provides an R interface to the OpenGL 3-d graphics library) only captures a small portion what's visible in the RGL device window. This does not happen with the same R and rgl versions on CentOS 5.3 (see details below). The maintainer of rgl, Duncan Murdoch, responded (see below) that
2019 May 01
3
anyNA() performance on vectors of POSIXct
Inside of the anyNA() function, it will use the legacy any(is.na()) code if x is an OBJECT(). If x is a vector of POSIXct, it will be an OBJECT(), but it is also TYPEOF(x) == REALSXP. Therefore, it will skip the faster ITERATE_BY_REGION, which is typically 5x faster in my testing. Is the OBJECT() condition really necessary, or could it be moved after the switch() for the individual TYPEOF(x)
2004 Aug 30
2
suggestions motivated by quest for remainders
Some time ago I tried to find out how to compute remainders in R. I now know that it is done with %%, which is documented in help('+'), but before someone told me that I tried: help('remainder'), help.search('remainder'), apropos('remainder') help('modulo'), help.search('modulo'), and apropos('modulo') all of which yielded nothing. I then
2008 Jun 20
2
Problems with basic loop
I'm having trouble creating a looping variable and i can't see wher ethe problem arises from any hep gratfully appreciated First create a table x<-table(SURVEY$n_0,exposed) > x exposed False True Under 16 24 1 16-19 68 9 20-24 190 37 25-34 555 204 35-44 330 87 45-54 198 65 55-64 67 35 65+
2004 Apr 26
1
Segfault: .Call and classes with logical slots
Hi, the following example aiming at a class containing a logical slot segfaults under R-1.9.0 when `gctorture(on = TRUE)' is used: Code code (dummy.c): #include <Rdefines.h> SEXP foo() { SEXP ans; PROTECT(ans = NEW_OBJECT(MAKE_CLASS("test"))); SET_SLOT(ans, install("lgl"), allocVector(LGLSXP, 1)); LOGICAL(GET_SLOT(ans,
2005 Jun 23
1
list.files() reorders files in R CMD INSALL
Hi, The list.files() function seems to order its result vector differently when is run during R CMD INSTALL. Here is an example: ~% mkdir ~/FOO ~% cd ~/FOO/ ~/FOO% touch a A b B ~/FOO% ls a A b B Put foo.R in the vor package. The foo.R just prints the files in ~/FOO: print(list.files("~/FOO")) Now install the package: ~/FOO% R CMD INSTALL -l ~/R/library/ ~/src/vor/ *
2013 Mar 07
8
Convertir eh hora
Hola a tod@s, Me han mandado una base de datos y al abrirla me he encontrado con la fecha y la hora en el siguiente formato: FECHA HORA 20121007 1206 20110622 1854 20110623 054 He conseguido que la Fecha me quedara en el formato dd/mm/aaaa mediante el script db[, "FECHA"] <- as.Date(as.character(db[,
2000 Feb 16
1
Decode questions
Sorry, to interrupt the license flame war... I downloaded the source from CVS as of 11am this morning and there are a couple of issues that I ran into: 1) I built the package and then in the examples dir I executed the following commands: # cdparanoia -B 1-1 # ./encoder-example < track01.cdda.wav > test.vor # ./decoder-example < test.vor > out.wav The rip and the encode both work
2002 Mar 26
2
PXE-capable NIC listing?
Trey, The Compaq NC7770 PCI-X Gigabit Server Adapter supports PXE: http://www.compaq.com/products/servers/networking/NC7770/ This NIC will be available next month. Also, our strategy is to support PXE on all ProLiant server embedded NICs (10/100/1000) beginning with G2 (generation2) models. Also, most existing DL and all BL servers currently support PXE on their embedded (10/100) NICs. Let
2010 Mar 29
2
naming consecutive objects
Dear list, I would generate a loop: a<-c(1:98) for (i in a ) { cbind(vor.tile[[i]]$x, vor.tile[[i]]$y)->p rbind(p,c(p[1,]))->p.c Polygon(p.c)->pc.p Polygons(list(pc.p),sprintf("p%s",i))->pc.ps sprintf("pc.ps%s",i)<-pc.ps } I need to obtain 98 pc.ps objects (like: pc.ps1, pc.ps2....pc.ps98) but I d'ont use sprintf for it. How can made it? many
2005 Dec 07
1
summary[["r.squared"]] gives strange results
I am simulating an ANOVA model and get a strange behavior from the summary function. To be more specific: please run the following code and see for yourself: the summary()[["r.squared"]] values of two identical models are quite different!! ## 3 x 3 ANOVA of two factors x and z on outcome y s.size <- 300 # the sample size p.z <- c(0.25, 0.5, 0.25) # the probabilities of factor z ##
2010 Jul 29
1
Using 'dimname names' in aperm() and apply()
I think that the "dimname names" of tables and arrays could make aperm() and apply() (and probably some other functions) easier to use. (dimname names are, for example, created by table() ) The use would be something like: -- x <-table( from=sample(3,100,rep=T), to=sample(5,100,rep=T)) trans <- x / apply(x,"from",sum) y <- aperm( trans,
2007 May 23
1
Readline - wait for user input
Hi, I've seen various posts on this question, but still can't get the code right. If I run the following code one line at a time, it works fine. If I run it together as a block, however, it doesn't wait for the input and gives an error. There must be a way to have are pause/wait for an answer, but I can't seem to find it. Thanks! J Code: choosefunction <-
2004 Sep 03
1
how to debug a sudden exit in non-interactive mode
Hi, I have a piece of R code that calls mgcv::gam. The code runs fine in the interactive mode, but terminates R w/o a single message when run non-interactively. Though I think I should be able to locate the problem by brute force I'd appreciate an advise how to do it more intelligently using R debugging tools. At this time I only know that it has something to do with me loading my custom
1999 Nov 11
2
dimname'less array breaks apply (PR#318)
<<insert bug report here>> > apply(array(1:20,c(2,2,5)),2:3,function(x) x) Error: length of dimnames must match that of dims > Changing: dimnames = if (is.null(dn.ans)) list(ans.names, NULL) else c(list(ans.names), dn.ans) To: dimnames = if (length(dn)==0) NULL else if (is.null(dn.ans)) list(ans.names, NULL) else c(list(ans.names), dn.ans) seems to fix this. Chuck
2011 Sep 09
4
Very simple question about list components
I have a list 'ans' from the following code: tt <- rnorm(50) rr <- rnorm(50) ans <- lm(rr~tt) ans[1] is "$coefficients", ans[2] is "$residuals", ans[3] is "$effects", ... and so on up to ans[12]. Is there an easy way to display just these names and not the data they contain? I thought I saw my advisor type "ans$" and they were displayed,
2010 Jan 29
2
[PATCH 1/2] libdrm/nouveau: new optimized libdrm pushbuffer ABI
This patch changes the pushbuffer ABI to: 1. No longer use/expose nouveau_pushbuffer. Everything is directly in nouveau_channel. This saves the extra "pushbuf" pointer dereference. 2. Use cur/end pointers instead of tracking the remaining size. Pushing data now only needs to alter cur and not both cur and remaining. The goal is to make the *_RING macros faster and make the
2017 May 31
4
stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3
Seriously, if a method gives a wrong result, it's wrong. line() does NOT implement the algorithm of Tukey, even not after the patch. We're not discussing Excel here, are we? The method of Tukey is rather clear, and it is NOT using the default quantile definition from the quantile function. Actually, it doesn't even use quantiles to define the groups. It just says that the groups