search for: colvars

Displaying 20 results from an estimated 29 matches for "colvars".

2017 Jun 29
0
plot3D color ramp not working as expected
Hi, I want to use a discrete color ramp with plot3D, and show NA values as white (default). I get unexpected results per the following. # as in help(slice3D) example: par(mfrow = c(2,2)) x <- y <- z <- seq(-1, 1, by = 0.1) grid <- mesh(x, y, z) colvar <- with(grid, x*exp(-x^2 - y^2 - z^2)) slice3D (x, y, z, colvar = colvar, theta = 60) # # use three discrete classes and colors
2003 Feb 12
1
models for square tables
I've posted a sample file for estimating loglinear models for square tables (mobility models) at http://www.xs4all.nl/~jhckx/mcl/R/ Comments and suggestions are welcome. John Hendrickx
2015 Jan 16
1
S3 generic method dispatch on promises
Dear R friends I wanted a function to make a simple percent table that would be easy for students to use. The goal originally was to have a simple thing people would call like this pctable(rowvar, colvar, data) and the things "rowvar" and "colvar" might be names of variables in data. I wanted to avoid the usage of "with" (as we now see in the table help). Then
2002 Aug 14
3
t-test via matrix operations
I need to calculate a large number of t statistics, and would like to do so via matrix operations. So far I have figured out a way to calculate the mean of each row of the matrix: d <- matrix(runif(100000,1,10), 1000, 10) # some test data s <- rep(1,ncol(d)) # a sum vector to use for matrix multiplication means <- (d%*%s)/ncol(d) This is at least 1 order of magnitude faster than
2000 Jul 07
1
reorganizing a data frame
Hi, I have what I think is an easy question. I have a data frame, called stockdata, of stock prices that looks like this: date ticker close 1 01/02/1998 GE 24.667 2 01/05/1998 GE 25.104 3 01/06/1998 GE 24.771 4 01/07/1998 GE 24.979 5 01/08/1998 GE 24.750 6 01/02/1998 HIT 71.125 7 01/05/1998 HIT 72.313
2007 Jan 24
3
Cronbach's alpha
Dear Listers: I used cronbach{psy} to evaluate the internal consistency and some set of variables gave me alpha=-1.1003, while other, alpha=-0.2; alpha=0.89; and so on. I am interested in knowing how to interpret 1. negative value 2. negative value less than -1. I also want to re-mention my previous question about how to evaluate the consistency of a set of variables and about the total
2002 Jan 07
0
New package: colSums
I've uploaded a package colSums_1.0.tar.gz to CRAN /src/contrib/Devel. It contains functions colSums, colMeans, colVars, colStdevs, rowSums, rowMeans, rowVars, and rowStdevs. These do simple, fast arithmetic on columns/rows of a matrix, or more generally across dimensions of an array, e.g. colSums(m) = apply(m, 2, sum) but faster. They should be compatible with the corresponding S-Plus functions. The core code wa...
2017 Jun 21
0
customizing color key with plot3D
Karline, Thank you for your help. I discovered that in addition to including clim, I needed to omit breaks. This code uses one of your other examples as a starting point and works as intended: persp3D(z = volcano, zlim = c(-60, 200), phi = 20, colkey = list(length = 0.2, width = 0.4, shift = 0.15, cex.axis = 0.8, cex.clab = 0.85), lighting = TRUE, lphi = 90, clab =
2012 Mar 06
11
Buscando la solución más eficiente para generar resultados a partir de un list
Hola:   Tengo una lista de 2 elementos, cada uno de los cuales contiene información relativa a un sujeto (Pablo y Carlos).   lSujetos <- list() lSujetos[[1]] <- list(nomfich="Pablo", colTime=5, colVars=c(6,7,8)) lSujetos[[2]] <- list(nomfich="Carlos", colTime=5, colVars=c(6,7,8)) A continuación, leo las series temporales correspondientes a cada individuo. En este caso leo, para cada individuo, las series correspondientes a las columnas de las posiciones 6, 7 y 8 en el fichero:   mis...
2002 Mar 17
5
compute variance of every column in a matrix without a loop
Is it possible to compute the variance of every column in a matrix without a loop? -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
2009 May 13
5
Help with reshape/reShape and indexing
Dear R Helpers, I have trouble applying reShape and reshape although I read the documentation and several posts, so I would very much appreciate your help on the two points below. I have a dataframe df = data.frame(Name=c("a", "a", "a", "b", "b", "c"), X1=c("12", "13", "14", "20", "25",
2011 May 31
1
reshape::cast: invalid 'yinds' argument
...v, id + code + productname + year + begin + end + specificDesc + specificDesc2 ~ type) Error in merge.data.frame(data, all.combinations, by = unlist(vars), sort = FALSE, : invalid 'yinds' argument What does this message mean, and how can I get rid of the error? I tried changing the colvars from character to factor, but that didn't help. I'm using R2.10.1 and either WinXP or Win2000. Thanks in advance, Albert-Jan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ All right, but apart from the sanitation, the medicine, education, wine, public order, ir...
2004 Jun 09
1
Re: R equivalent of Splus rowVars function
...) is used (it's slower but more accurate). In real life I set the "twopass" default to FALSE, because in finance noise is always bigger than signal. I am cc'ing to R-help, as this is really an R question. -- -- David Brahm (brahm at alum.mit.edu) colVars <- function(x, na.rm=FALSE, dims=1, unbiased=TRUE, SumSquares=FALSE, twopass=TRUE) { if (SumSquares) return(colSums(x^2, na.rm, dims)) N <- colSums(!is.na(x), FALSE, dims) Nm1 <- if (unbiased) N-1 else N if (twopass) {x <- if (dims==length(dim(x))) x - mean(x...
2002 Nov 15
2
Why no colSDs etc
Hi people, If there is a fn "colMeans" why isn't there a "colSDs" etc Thanks, Phil. -- Philip Rhoades Pricom Pty Limited (ACN 003 252 275) GPO Box 3411 Sydney NSW 2001 Australia Mobile: +61:0411-185-652 Fax: +61:2:8923-5363 E-mail: pri at chu.com.au -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2001 Oct 03
8
Several R vs S-Plus issues
...number of arguments It failed because no ... was given. Fortunately, this is easily patched: R> myfun <- function(x, ...) {if (missing(...)) x[]<-0 else x[...]<-0; x} 4) Missing functions: a) identical() [scheduled for 1.4.0] b) slice.index() c) rowSums(), colSums(), colVars(), etc. d) unpaste() - R has strsplit, whose result is like the transpose of unpaste 5) rowsum() gives character dimnames in S, factor numbers in R. I've reported this early, and Brian D. Ripley promised a fix in 1.4.0. OK, the rest are just differences, not complaints. In fact, some...
2001 Oct 03
8
Several R vs S-Plus issues
...number of arguments It failed because no ... was given. Fortunately, this is easily patched: R> myfun <- function(x, ...) {if (missing(...)) x[]<-0 else x[...]<-0; x} 4) Missing functions: a) identical() [scheduled for 1.4.0] b) slice.index() c) rowSums(), colSums(), colVars(), etc. d) unpaste() - R has strsplit, whose result is like the transpose of unpaste 5) rowsum() gives character dimnames in S, factor numbers in R. I've reported this early, and Brian D. Ripley promised a fix in 1.4.0. OK, the rest are just differences, not complaints. In fact, some...
2012 Mar 09
0
Rv: Re: Buscando la solución más eficiente para generar resultados a partir de un list
...yahoo.es> escribió: > > Hola: > > > > Tengo una lista de 2 elementos, cada uno de los cuales contiene > > información relativa a un sujeto (Pablo y Carlos). > > > > lSujetos <- list() > > lSujetos[[1]] <- list(nomfich="Pablo", colTime=5, colVars=c(6,7,8)) > > lSujetos[[2]] <- list(nomfich="Carlos", colTime=5, colVars=c(6,7,8)) > > > > A continuación, leo las series temporales correspondientes a cada > > individuo. En este caso leo, para cada individuo, las series > > correspondientes a las columna...
2007 May 18
1
svychisq
Dear All I am trying to use svychisq with a two-dimensional table 4 x 5. The command I am using is summary(svytable(~dietperception+dietstatus,dudleyls1rake,na.rm=TRUE),"C hisq") It is throwing up an error message as follows: Error in NCOL(y) : only 0's may be mixed with negative subscripts In addition: Warning messages: 1: is.na() applied to non-(list or vector) in:
2008 Jan 24
0
deprecate "freq" argument to hist
...in R packages that are loaded by default, hist.default is the only one I found with a "freq" argument. -------------------------------------------------- These functions have both "weights" and "freq" arguments in S-PLUS: hist rowMeans rowSums rowVars colMeans colSums colVars colQuantiles cor, var, stdev density skewness, kurtosis qqline qqnorm.default quantile Some others have "weights" but not (yet) "freq", including mean median ppoints tabulate. Other functions like lm have always had a weights argument. ----------------------------------------...
2017 Jun 21
0
customizing color key with plot3D
Hi, I am doing composite plots with the package plot3D. One of my variables is qualitative and indexed to integers, and I would like the legend for it to have labels located at the integer values (midpoints), and not at the breaks between classes. In the example below, the Elev Classes legend has labels at the breaks and nothing at the midpoints. How can I show the class labels at 1:3, and not