search for: scales

Displaying 20 results from an estimated 11013 matches for "scales".

Did you mean: scale
2008 Apr 15
1
p-values always identical for t.test of certain group of samples, why ?
Hi, Given the following, a <- rnorm(5) b <- rnorm(5) c <- rnorm(5) a.1g.scale <- scale(c(a,b,c))[1:5] b.1g.scale <- scale(c(a,b,c))[6:10] c.1g.scale <- scale(c(a,b,c))[11:15] a.2g.scale <- scale(c(a,b))[1:5] b.2g.scale <- scale(c(a,b))[6:10] c.2g.scale <- scale(c) a.3g.scale <- scale(a) b.3g.scale <- scale(b) c.3g.scale <- scale(c) I am puzzled why the
2010 Sep 24
0
kernlab:ksvm:eps-svr: bug?
Hi, A. In a nutshell: The training error, obtained as "error (ret)", from the return value of a ksvm () call for a eps-svr model is (likely) being computed wrongly. "nu-svr" and "eps-bsvr" suffer from this as well. I am attaching three files: (1) ksvm.R from the the kernlab package, un-edited, (2) ksvm_eps-svr.txt: (for easier reading) containing only eps-svr
2012 May 23
1
prcomp with previously scaled data: predict with 'newdata' wrong
Hello folks, it may be regarded as a user error to scale() your data prior to prcomp() instead of using its 'scale.' argument. However, it is a user thing that may happen and sounds a legitimate thing to do, but in that case predict() with 'newdata' can give wrong results: x <- scale(USArrests) sol <- prcomp(x) all.equal(predict(sol), predict(sol, newdata=x)) ## [1]
2002 Aug 12
1
question about cloud() in lattice package
Hi all, I have been previously been using scatterplot3d package to create some graphs but unfortunately it does not allow me to rotate the plot on all three axis. The cloud() function in the lattice package does allow me to do so. When I was using scatterplot3d I was using a script (Shown Below) to calculate the mean, quartiles and range limits for all three axis and I was representing that on the
2008 Aug 28
6
Function not returning a vector?
Why does: (shape/scale) * (1:365/scale)^(shape - 1) return a vector of numbers but calling a function hasard(1:365,shape,scale) defined like: hazard <- function(x,shape,scale) { return (shape/scale) * (x/scale)^(shape - 1) } Only return a single value? It is like x becomes a single value passed as an argument. Thank you. Kevin
2011 Jul 16
2
Utility function to apply a scale object on another data frame
Hi Everyone, I would like to scale a data frame and then using the same scaling parameters scale on another data frame. This will be helpful in scaling the test dataset based on train dataset's scaling parameters. I couldn't find any utility functions that do this. Any suggestions on how to approach this problem? x = data.frame(a=1:10,b=11:20) y = data.frame(a=2:11,b=12:21) s <-
2005 Aug 31
1
Bioconductor and R-devel
Hi, I have built R (current development version) and BioConductor 1.7 with portland group compiler on a AMD Opteron. When I ran qc assessment on Affymetrix latin square data set, I got the following output, Loading required package: affy Loading required package: Biobase Loading required package: tools Welcome to Bioconductor Vignettes contain introductory material. To view,
2004 Jan 15
2
prcomp scale error (PR#6433)
Full_Name: Ryszard Czerminski Version: 1.8.1 OS: GNU/Linux Submission from: (NULL) (205.181.102.120) prcomp(..., scale = TRUE) does not work correctly: $ uname -a Linux 2.4.20-28.9bigmem #1 SMP Thu Dec 18 13:27:33 EST 2003 i686 i686 i386 GNU/Linux $ gcc --version gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) > a <- matrix(rnorm(6), nrow = 3) > sum((scale(a %*% svd(cov(a))$u, scale
2010 Feb 22
3
scale(x, center=FALSE) (PR#14219)
Full_Name: Maria Rizzo Version: 2.10.1 (2009-12-14) OS: Windows XP SP3 Submission from: (NULL) (72.241.75.222) platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor
2006 Sep 11
2
Translating R code + library into Fortran?
Hi all, I'm running a monte carlo test of a neural network tool I've developed, and it looks like it's going to take a very long time if I run it in R so I'm interested in translating my code (included below) into something faster like Fortran (which I'll have to learn from scratch). However, as you'll see my code loads the nnet library and uses it quite a bit, and I
2008 Jan 04
2
question about scale() function
Hi, The documentation for scale() states:"If center is TRUE then centering is done by subtracting the column means (omitting NAs) of x from their corresponding columns". But it seems that R is subtracting something else instead of the column mean: > x=c(2,4,3,4,5) > mean(x) [1] 3.6 > x-mean(x) [1] -1.6 0.4 -0.6 0.4 1.4 > scale(x) [,1] [1,] -1.4032928 [2,]
2011 Oct 24
1
Adding points to a wireframe: 'x and units must have length >0' error
....frame(x = seq(-4, 0, 0.5), y = seq(0, 40, 5))-> df expand.grid(x = df$x, y = df$y) -> gridd (gridd$y* gridd$x) -> gridd$z data.frame(x = runif(10, -4, 0), y = runif(10, 0, 40))-> pts1 pts1$z <- pts1$x*pts1$y # plot wireframe(z ~ y*x, gridd, drape = TRUE, colorkey= TRUE, scales = list(arrows = FALSE), pts = pts1, panel.3d.wireframe = function(x, y, z,xlim, ylim, zlim, xlim.scaled, ylim.scaled, zlim.scaled, pts1, ...) { panel.3dwire(x = x, y = y, z = z, xlim = c(-4, 0),...
2018 Feb 27
2
scale.default gives an incorrect error message when is.numeric() fails on a sparse row matrix (dgeMatrix)
I am attempting to use the lars package with a sparse input feature matrix, but the following fails: library(Matrix) library(lars) data(diabetes) attach(diabetes) x = as(as.matrix(as.data.frame(x)), 'dgCMatrix') lars(x, y, intercept = FALSE) Error in scale.default(x, FALSE, normx) : > > length of 'scale' must equal the number of columns of 'x' > > More
2003 Apr 03
1
SVM module: scaling data applied to new test set without using SVM again
Hello! We are new in using R. We use the SVM module from the library ''e1071'' for training. Problem formulation: a classification has been performed using SVM module (linear kernel). Later, a new data set (test set) comparable to the training data shall be scaled in the same way as the training set (using the same scaling parameter set, but without using the SVM again
2005 Nov 18
2
Adding points to wireframe
Hi, I am using function wireframe from package lattice to draw a 3D surface. I would like to add a few points on the surface. I read in a post from Deepayan Sarkar that "To do this in a wireframe plot you would probably use the panel function panel.3dscatter". Does someone have an example? When calling panel.3dscatter with only x, y and z arguments I get "argument
2008 Apr 30
2
wireframe - add data points
...ginal data together with their predicted probabilities## punten <- read.table("probs.csv",header=T,sep=";") x <- punten[,1:1] y <- punten[,2:2] z <- punten[,3:3] pts <- data.frame(x=x,y=y,z=z) ##end import original data## wireframe(status~totalfrost*logtps,abc,scales=list(arrows=TRUE),drape=TRUE, screen =list (x=15, y=-50, z=-105), pts = pts, panel.3d.wireframe = function(x, y, z, xlim, ylim, zlim, xlim.scaled, ylim.scaled, zlim.scaled, pts, ...) { panel.3dwire(x...
2004 Oct 20
2
Odd behaviour with scale()
Moi! A student here has been getting a bit irritated with some side effects of scale() (OS is Windows XP, the behaviour occurs in R 2.0.0, but not 1.7.1). The problem is that she scales a variable in a data frame, then does a regression, and tries to get some predictions for some new data. However, at this point she gets an error (see the example below). This seems to be because the scaled variable in the new data frame does not have the center and scale attributes, but the...
1998 Apr 24
1
Warning: ignored non function "scale"
I've been working on a revised version of prcomp and princomp. Below is my current draft of prcomp, which is marginally different from V&R. I've added center and scale as optional arguments. However, scale causes the following: > zi _ prcomp(iris[,,2]) Warning: ignored non function "scale" because scale is both a variable and a function. Is there any way to avoid this
2010 Jan 15
4
transposing a list of vectors
I have a list of vectors, all forced to be the same length: testlist <- list( shape=c(0, 0, 2), cell.fill=c("red","blue","green"), back.fill=rep("white",3), scale.max=rep(100,3) ) > str(testlist) List of 4 $ shape : num [1:3] 0 0 2 $ cell.fill: chr [1:3] "red" "blue" "green" $ back.fill: chr [1:3]
2011 Sep 15
1
Lattice xyplot log scale labels help!
I have a problem with lattice log scales that I could use some help with. I'm trying to print log y-axis scales without exponents in the labels. A similar thread with Deepayan' recommendation is here: http://tolstoy.newcastle.edu.au/R/e11/help/10/09/9865.html. For example, this code using xyplot produces a logged y-axis but the...