similar to: absolute value

Displaying 20 results from an estimated 500 matches similar to: "absolute value"

2008 Jun 11
3
Finding Coordinate of Max/Min Value in a Data Frame
Hi, Suppose I have the following data frame. __BEGIN__ > library(MASS) > data(crabs) > crab.pca <- prcomp(crabs[,4:8],retx=TRUE) > crab.pca$rotation PC1 PC2 PC3 PC4 PC5 FL 0.2889810 0.3232500 -0.5071698 0.7342907 0.1248816 RW 0.1972824 0.8647159 0.4141356 -0.1483092 -0.1408623 CL 0.5993986 -0.1982263 -0.1753299 -0.1435941 -0.7416656 CW
2008 Jan 27
3
need help opening a file
Hi, I can't believe I am unable to do this. I just installed R (never used it before, but want to learn it). At present, though. all I want to do is export a data file (specifically "crabs" in the MASS library) to a text file for use in SPSS. It allows me to peek into the dataset, using the command head(crabs) but I can neither view the entire file nor can I seem to export it to a
2003 Apr 11
1
lattice bug? (PR#2765)
I've been experimenting with the lattice graphics in chapter 3 of MASS. The code to produce figure 3.14 is: data(crabs) library(mva) lcrabs.pc <- predict(princomp(log(crabs[,4:8]))) crabs.grp <- c("B", "b", "O", "o")[rep(1:4, rep(50,4))] splom( ~lcrabs.pc[, 1:3], groups = crabs.grp, panel = panel.superpose, key = list(text =
2004 Jun 18
2
can't get text to appear over individual panels in multi-panel plot
I'm trying to learn how to create Trellis multi-panel plots, but I'm having some trouble reproducing the graphs shown in Venables & Ripley (2002) (e.g., Figs 4.14 & 4.15). Actually, everything looks fine except for the fact that I can't see any text above the individual panels. I'm using R 1.9.0 for OS-X running on Mac OSX 10.3.3, and I'm drawing the graphs into
2003 Jun 10
1
SOM random seed
Hi all, I have a question about the SOM routine. You can either supply the initial representatives for the lattice yourself or else they are chosen randomly from the dataset. Is it possible to pass the random-seed as an argument somehow, when choosing the random initialisation of the lattice? As it is now, each time I run a SOM on a dataset with the same settings the resulting SOM will still
2006 Aug 02
1
Support vector in lcrabs example
Can anyone explain the root of my problem? When I type the following code into R, I receive 42 support vectors insted of the 21 stated in the book 'Modern Applied Statistics with S': library(MASS); library(e1071); library(class); lcrabs <- log(crabs[,4:8]); (svm(crabs$sp ~ ., data = lcrabs, cost = 100, gamma = 1)); By changing the value of gamma I can obtain only 21 support vectors,
2007 Jan 26
1
Question about the xgobi package
Hi, When I tried an example of the xgobi function, I got the following error. Could someone explain to me what is wrong ? Thanks a lot. xgobi(crabs,colors=c("SkyBlue","SlateBlue","Orange","Red")[rep(1:4,each=50)]) c:/PROGRA~1/R/R-23~1.1/library/xgobi/scripts/xgobi.bat -vtitle 'crabs' -std mmx
2004 Apr 25
2
package fdim slopeopt error (PR#6819)
Full_Name: Fred J. Version: 1.8.1 OS: windows 2000 Submission from: (NULL) (203.26.24.216) platform i386-pc-mingw32 the error can be duplicated as follows > rt <- data.frame(8:15, 7:14, 6:13, 5:12, 4:11, 3:10, 2:9, 1:8) > library(fdim) > FD <- (fdim(rt,q=2)) Error in slopeopt(AllPoints, Alpha) : Object "LineP" not found
2005 Sep 04
1
Question regarding lmer with binary response
Dear all, dear Prof. Bates, my dependent variable (school absenteeism, truancy[1]) is a binary response for which I am trying to compute an unconditional mixed effects model. I've got observations (monday, wednesday and friday) nested in individuals (ID2), which were nested in classes (KID2) and schools (SID), i.e. a 4-level mixed effects model. In short, I was trying without success. I
2006 Feb 19
1
Two factors -> nurical data dependency analyzing
Hello, dear R users. What is the easiest and the most visualli understandable way to analize dependency of numerical variable on two factors? Is the boxplot(y~f1+f2) the good way? It seems that this formula does not work. -- Evgeniy
2005 Mar 09
4
Lattice device page options-margins
I am using lattice to make figures as pdfs: trellis.device(device = "pdf",file = "Figure6.pdf",color = FALSE) I need to specify some blank space on the left-hand margins (the pages will be bound so we need about 0.5 inch)). I have tried a number of solutions but none seems to work (e.g. par.set). Can this be done when initiating the plotting device? Or is the some other way
2004 Mar 16
3
rate of change
Hello I am wondering, how do I find if R has a certain funciton to do a given task. do I just type help.search("rate"). I am just trying to find a function to calculate the rate of change for a variable. I could come up with one if there isn't any allready builtin. thanks
2007 Aug 30
2
Additions to xyplot (lattice)? - legend, ticks, axis label size, text
I have created an xyplot of a time series with the following code... win.graph(width = 10, height = 7) panel1 = function(x, y) { panel.loess(x, y, lwd=2.5, span=0.5, col="gray") panel.xyplot(x, y, pch=19, col="blue", cex=1.25) } xyplot(oneplusdensity ~ year, data=figdata, aspect="fill", cex=1.5, xlab=NULL, ylab=expression("Crabs per
2003 Sep 12
1
win.metafile, devga, tkrplot in R 1.8.0
Hi, I just downloaded rw1080dev.exe 09-Sep-2003 07:42 21.6M from http://www.stats.uwo.ca/faculty/murdoch/software/r-devel/ and tried using tkrplot on Windows 2000. .First.lib failed to load the dll: .Tcl(paste("load", file, "Rplot")) appeared to be mixing up double-backslashes and forward slashes: [tcl] couldn't load library "C:w1080devlibrary
2000 Mar 08
3
Reading data for discriminant analysis
Dear R users, I want to do discriminant analysis on my data. I have successfully followed the discriminant analysis in V & R on the iris data: > ir <- rbind (iris3[,,1],iris3[,,2],iris3[,,3]) > ir.species <- c(rep("s",50),rep("c",50),rep("v",50)) > a <- lda(log(ir),ir.species) > a$svd^2/sum(a$svd^2) [1] 0.996498601 0.003501399 > a.x <-
2003 Jun 19
2
Grouping binary data
Dear all, I'm analyzing a binary outcome using glm() with a binomial distribution and a logit link, and have now reached the point where I'd like to do some model checking. Since my data are in binary form I'd like to collapse over the cross-classification of the factors before the model checking. Are there any nice and simple ways doing this? If so, how? If not, I'd be
2003 Nov 17
1
CLARA
I need informations about the clara routine. The on-line doc say that the argument stand is a logical, indicating if the measurements in x are standardized before calculating the dissimilarities. Measurements are standardized for each variable (column), by subtracting the variable's mean value and dividing by the variable's mean absolute deviation. If we note STAND = TRUE, I suppose that
2004 Mar 22
2
regex in R
Hello I could use some help here with trying to use perl stype regex to extract the first group of letters before a ( . ) so if I have a sting AACEE.adiid and wanting AACEE i <- "AACEE.adiid" grep(".+\..?+",i,perl=T) I must be doing somthing wrong but don't know what it is? thanks
2004 Mar 27
1
building a list in loop
Hello getdata <- function(p){ fname <- NULL; dl <- list()#build the sturcture builddl <- function(q,s){ fname <<- c(fname,s) #where "s" is a string dl <<- list( dl, dt2) } list(names = fname, data = dl) } data <- getdata("c:\somepath") > data $names [1] "fname" $data $data[[1]] <--- since there is no [[1]] how can I stop
2006 Mar 23
1
subsets of vector
dear R users I have been trying a lot to get this task accomplished but need your help. input: x <- c(3,3,4,4,4,4,5,7,7,0,1,1,2,2,2) desired output 3 1 2 4 3 6 7 8 9 ... which means, 3 is repeated at index 1:2 4 is repeated at index 3:6 ... my effort has not been that good. a <- !c(NA,diff(x)); b <- which(a==1); a[b-1]=1; cbind(x,a); or sp <-