search for: mcol

Displaying 20 results from an estimated 20 matches for "mcol".

Did you mean: mcl
2009 Dec 16
2
Flexclust barchart issue when mcol=NULL (PR#14150)
Full_Name: Chris Hane Version: 2.10.1 OS: Windows Submission from: (NULL) (198.203.181.181) When using barchart in the flexcust package, setting mcol=NULL to avoid the lollipops causes an error. Each panel shows the text message "Error using packet n replacement has length zero." where n is the panel number. > data(iris) > cl <- cclust(iris[,-5], k=3) > barplot(cl, mcol=NULL) #works fine > barchart(cl, mcol=NULL) # oo...
2009 Mar 27
0
imporving performance of slicing on matrices and S4 their derivatives
...and without any checks though. Adding checks and colnames etc does not lead to performance degradation. I was originally thinking that the dispatch looking up a particular [ implementation for an object is the issue, but in fact it is not the case as redefining [ or $ as S4 methods (!) to use the mcol below for an S4 object shows the same performance gains as the diret use of use of mcol/mcols! Any comments welcome! ## --- code ---------------------------------------------------- ## available from CRAN, needs compilers installed library(inline) ## get 1 column of a matrix to use instead of [...
2023 Jul 08
1
Getting an error calling MASS::boxcox in a function
...of 1 to the data), the following works for me: ------ snip ------ > library(MASS) > BoxCoxLambda <- function(z){ + b <- boxcox(z + 1 ~ 1, + lambda = seq(-5, 5, length.out = 101), + plotit = FALSE) + b$x[which.max(b$y)] + } > mrow <- 500 > mcol <- 2 > set.seed(12345) > dd <- matrix(rgamma(mrow*mcol, shape = 2, scale = 5), nrow = mrow, ncol = + mcol) > dd1 <- dd[, 1] # 1st column of dd > res <- boxcox(lm(dd1 + 1 ~ 1), lambda = seq(-5, 5, length.out = 101), plotit + = FALSE) > re...
2023 Jul 08
1
Getting an error calling MASS::boxcox in a function
...# Find optimised Lambda for Boc-Cox transformation >> BoxCoxLambda <- function(z){ >> b <- boxcox(lm(z+1 ~ 1), lambda = seq(-5, 5, length.out = 61), plotit >> = FALSE) >> b$x[which.max(b$y)] # best lambda >> } >> >> mrow <- 500 >> mcol <- 2 >> set.seed(12345) >> dd <- matrix(rgamma(mrow*mcol, shape = 2, scale = 5), nrow = mrow, ncol = >> mcol) >> >> # Try it not using the BoxCoxLambda function: >> dd1 <- dd[,1] # 1st column of dd >> bb <- boxcox(lm(dd1+1 ~ 1), lambda = seq(-5,...
2023 Jul 08
1
Getting an error calling MASS::boxcox in a function
...ip ------ > > > library(MASS) > > > BoxCoxLambda <- function(z){ > + b <- boxcox(z + 1 ~ 1, > + lambda = seq(-5, 5, length.out = 101), > + plotit = FALSE) > + b$x[which.max(b$y)] > + } > > > mrow <- 500 > > mcol <- 2 > > set.seed(12345) > > dd <- matrix(rgamma(mrow*mcol, shape = 2, scale = 5), nrow = mrow, ncol = > + mcol) > > > dd1 <- dd[, 1] # 1st column of dd > > res <- boxcox(lm(dd1 + 1 ~ 1), lambda = seq(-5, 5, length.out = 101), > plotit...
2003 Jun 25
3
joining columns as in a relational database
...name(s) from fr2")) } } else { if (any(missed <- is.na(match(cnm2, fr2nm)))) { stop(paste("No columns named", paste(cnm2[missed], sep = ", "), "in fr2")) } } if (length(cnm1) == 1) { mcol = fr2[[cnm2]] if (any(is.na(mcol))) { warning(paste("Missing values in column", mcol, "of fr2 cannot be matched")) mcol = mcol[is.na(mcol)] } if (length(mcol) != length(unique(mcol))) { stop(pa...
2023 Jul 08
1
Getting an error calling MASS::boxcox in a function
...;> >> > BoxCoxLambda <- function(z){ >> + b <- boxcox(z + 1 ~ 1, >> + lambda = seq(-5, 5, length.out = 101), >> + plotit = FALSE) >> + b$x[which.max(b$y)] >> + } >> >> > mrow <- 500 >> > mcol <- 2 >> > set.seed(12345) >> > dd <- matrix(rgamma(mrow*mcol, shape = 2, scale = 5), nrow = mrow, ncol = >> + mcol) >> >> > dd1 <- dd[, 1] # 1st column of dd >> > res <- boxcox(lm(dd1 + 1 ~ 1), lambda = seq(-5, 5, le...
2013 Mar 28
1
scatterplot3d with densCols ?
...o make a 3D plot using densCols. The documentation for densCols doesn't look like it'll work for 3D. For example: ----------------------------------------- library(scatterplot3d) v1 <- rnorm(10000) v2 <- rnorm(10000) v3 <- rnorm(10000) ## 2D with denscols mat1 <- cbind(v1,v2) mcols1 <- densCols(mat1) plot(mat1,col=mcols1) mat <- cbind(v1,v2,v3) mcols <- densCols(mat) ## No go? ## 3D version with no densCols parameter scatterplot3d(mat,pch=16) ## gives error scatterplot3d(mat,col=mcols,pch=16) ----------------------------------------- Is there any workaround/mod...
2023 Jul 08
1
Getting an error calling MASS::boxcox in a function
..., but I can't see what it is. Any help appreciated. library(MASS) # Find optimised Lambda for Boc-Cox transformation BoxCoxLambda <- function(z){ b <- boxcox(lm(z+1 ~ 1), lambda = seq(-5, 5, length.out = 61), plotit = FALSE) b$x[which.max(b$y)] # best lambda } mrow <- 500 mcol <- 2 set.seed(12345) dd <- matrix(rgamma(mrow*mcol, shape = 2, scale = 5), nrow = mrow, ncol = mcol) # Try it not using the BoxCoxLambda function: dd1 <- dd[,1] # 1st column of dd bb <- boxcox(lm(dd1+1 ~ 1), lambda = seq(-5, 5, length.out = 101), plotit = FALSE) print(paste0("1st...
2011 May 15
1
pls help: lattice graph with both negative and positive value, x and y cross at 0 and negative value bars are plotted just oppositive direction in contrast to positive
...<- c(0.5, 0.1, 0.5, 1.3, 1.4, 1.6, 1.65, 2.4, 2.6, 3.4, 3.6, 4.3, 4.42, 4.8, 4.7, 3.4, 3.3, 2.8, 2.8, 1.2, 1.1, 0.5, 0.2, 0.1, -0.2, -1.5, -2.5, -1.3, -0.5, -0.1) X <- seq(1:30) X1 <- c(rep("T1", 24), rep("T2", 6)) dat1 <- data.frame(Y, X, X1) require(lattice) mcol <- c("green", "red") barchart(Y ~ factor (X), group = X1, data = dat1, col = mcol , ylab= "y var", xlab = "x var", ylim = c(-3.0, 5.0), pos = 0, scales = list(x=list(rot= 90, font = 1, cex = 1) , y = list(rot= 90, font = 1, cex = 1) )) The output is no...
2023 Jul 08
1
Getting an error calling MASS::boxcox in a function
...gt; > library(MASS) > > # Find optimised Lambda for Boc-Cox transformation > BoxCoxLambda <- function(z){ > b <- boxcox(lm(z+1 ~ 1), lambda = seq(-5, 5, length.out = 61), plotit > = FALSE) > b$x[which.max(b$y)] # best lambda > } > > mrow <- 500 > mcol <- 2 > set.seed(12345) > dd <- matrix(rgamma(mrow*mcol, shape = 2, scale = 5), nrow = mrow, ncol = > mcol) > > # Try it not using the BoxCoxLambda function: > dd1 <- dd[,1] # 1st column of dd > bb <- boxcox(lm(dd1+1 ~ 1), lambda = seq(-5, 5, length.out = 101), ploti...
2012 Sep 28
1
Heatmap Colors
...a heatmap to visualize a matrix of values between -1 and 3. How can I set the colors so that white is zero, below zero is blue of increasing intensity towards -1 and above zero is red of increasing intensity towards red? I tried like this (using the marray and gplots packages from bioconductor): mcol <- maPalette(low="blue", mid="white", high="red",k=100) heatmap.2(my_matrix, col=mcol) But white does not correspond to zero, because the value distribution is not symmetrical, so that zero is not in the middle. Is it somehow possible to create a color palette wit...
2013 Mar 06
1
red SNA
...','Mary'), group = c('a','b','c','a','b','c','d','b','d'), stringsAsFactors = F) df m = table( df ) M = as.matrix( m ) # o M = as.matrix( table(df) ) Mrow = M %*% t(M) Mrow Mcol = t(M) %*% M Mcol df_yo <- data.frame( person = c('Sam','Sam','Sam','Greg','Tom','Tom','Tom','Mary','Mary'), group = c('a','b','c','a','b','c','d',&...
2013 Nov 22
2
[LLVMdev] new dragonegg 3.4 warning on darwin12
...6:5: warning: incompatible implicit declaration of built-in function ‘exit’ [enabled by default] exit(6); ^ himenoBMTxpa.c: In function ‘newMat’: himenoBMTxpa.c:239:5: warning: incompatible implicit declaration of built-in function ‘malloc’ [enabled by default] malloc(mnums * mrows * mcols * mdeps * sizeof(float)); ^ himenoBMTxpa.c: In function ‘clearMat’: himenoBMTxpa.c:248:5: warning: incompatible implicit declaration of built-in function ‘free’ [enabled by default] free(Mat->m); ^ '-cmpxchg16b' is not a recognized feature for this target (ignoring featur...
1998 Nov 28
1
No subject
...ggestions would be greatly appreciated. I am running R 63.0 (Guido's latest version for Windows). Niels > Quincunx.prg function(trials = 100) { graphsheet(pages = "Off") par(mfrow = c(1, 2)) xpoints <- seq(1, 25, 1) ypoints <- seq(1, 25, 1) xheights <- rep(0, 25) mcol <- 2 xy <- expand.grid(xpoints, ypoints) xx <- seq(1, 25, 2) yy <- rep(0, 25) ypos <- ypoints + 0.4 HT <- c("H", "T") for(j in 1:trials) { plot(xpoints, ypoints, type = "n", xlab = "", ylab = "", axes = F, main = "Galt...
2013 Nov 22
0
[LLVMdev] new dragonegg 3.4 warning on darwin12
...e implicit declaration of built-in function ‘exit’ [enabled by default] > exit(6); > ^ > himenoBMTxpa.c: In function ‘newMat’: > himenoBMTxpa.c:239:5: warning: incompatible implicit declaration of built-in function ‘malloc’ [enabled by default] > malloc(mnums * mrows * mcols * mdeps * sizeof(float)); > ^ > himenoBMTxpa.c: In function ‘clearMat’: > himenoBMTxpa.c:248:5: warning: incompatible implicit declaration of built-in function ‘free’ [enabled by default] > free(Mat->m); > ^ > '-cmpxchg16b' is not a recognized feature fo...
2002 May 22
5
plotting a 1000 plots?
I would like to plot lots of plots (2x2 plots) of a set of data for many sets. I can do it just fine for one set of data, but I would like to generate a small mountain of plots for others to examine. Basically, I would like to generate the same par( mcol=c(2,2) ) plot for about 1000 datasets. I've been iterating through them in the plot window, but I would like to send all the plots to a eps file and plot the eps file (or bring the thing into a latex doc and generate the pdf which I can do no problem. I don't knwo who many datasets I will h...
2017 Apr 28
1
pairwiseAlignment Improvements
...nt Probability 1 2 T A 1 1 2 3 T A 1 1 This could be improved with accessors for end users. Also, instead of being a data.frame, this would be better stored as IRanges with associated metadata columns, accessible with mcols, so that methods like reduce could easily be used to look for contiguous blocks of differences. Is there a reason why the show method for the summary only shows mismatches, even if there are indels contained in it? This seems arbitrary and also misleading, because it always gives a false impressi...
2012 Sep 13
6
[newbie] aggregating table() results and simplifying code with loop
Dear all, I'm looking for primary help at aggregating table() results and at writing a loop (if useful) My dataset ( http://goo.gl/gEPKW ) is composed of 23k rows, each one representing a point in the space of which we know the land cover over 10 years (column y01 to y10). I need to analyse it with a temporal sliding window of 5 years (y01 to y05, y02 to y06 and so forth) For each period
2008 Jun 30
4
Rebuild of kernel 2.6.9-67.0.20.EL failure
Hello list. I'm trying to rebuild the 2.6.9.67.0.20.EL kernel, but it fails even without modifications. How did I try it? Created a (non-root) build environment (not a mock ) Installed the kernel.scr.rpm and did a rpmbuild -ba --target=`uname -m` kernel-2.6.spec 2> prep-err.log | tee prep-out.log The build failed at the end: Processing files: kernel-xenU-devel-2.6.9-67.0.20.EL Checking