Re: [R] CRAN I-MR / Xbar-R / Xbar-S control chart package ?

2017-07-09 Thread Tim Smith
with I-MR charts but a google search found package qcc. > Maybe it's what you're looking for. > > Hope this helps, > > Rui Barradas > > > Em 08-07-2017 09:07, Tim Smith escreveu: >> >> Hi, >> >> I've had a quick look through the package

[R] CRAN I-MR / Xbar-R / Xbar-S control chart package ?

2017-07-08 Thread Tim Smith
Hi, I've had a quick look through the package list, and unless I've missed something, I can't seem to find anything that will do I-MR / Xbar-R / Xbar-S control charts ? Assuming there is something out there, can anyone point me in the right direction ? Thanks ! TIm

[R] multicore - handling a list of return values

2014-03-18 Thread Tim Smith
Hi, I was trying to gather/combine the results returned from the mclapply function. This is how I do it if only one data object is returned: #= This works fine === library(multicore) frandom1 <- function(iter,var1 = 3,var2 =2){     mat <- matrix(rnorm(var1*var2),nrow=var1,ncol=var2)  

[R] ifelse...

2014-01-16 Thread Tim Smith
Hi, Sorry for the newbie question! My code: x <- 'a' ifelse(x == 'a',y <- 1, y <- 2) print(y) Shouldn't this assign a value of 1? When I execute this I get: > x <- 'a' > ifelse(x == 'a',y <- 1, y <- 2) [1] 1 > print(y) [1] 2 Am I doing something really daft??? thanks! > sessionInfo() R ve

[R] GGally installation problems

2013-06-12 Thread Tim Smith
Hi, I was trying to install the GGally package, but was getting errors. Here is what I get: > install.packages("GGally") Installing package(s) into ‘/Users/ts2w/Library/R/2.15/library’ (as ‘lib’ is unspecified) Warning in install.packages :   package ‘GGally’ is not available (for R

Re: [R] ggplot2: legend for geom_rug() ..?

2012-06-07 Thread Tim Smith
Hi, Here is the corrected code: library(ggplot2) ids <- paste('id_',1:3,sep='') before <- sample(9) after <- sample(1:10,9) dat <- as.matrix(cbind(before,after)) rownames(dat) <- rep(ids,3) position <- c(rep(10,3),rep(13,3),rep(19,3)) mdat <- cbind(melt(dat),position) colnames(mdat) <- c('ID','T

[R] ggplot2 freqpoly() layers..?

2011-09-08 Thread Tim Smith
Hi, I was trying to overlay/combine two freqpoly plots. The sample code below illustrates the problem. Essentially, I want to do is: 1. Have the same colour for all the lines in 'Plot 1' (and 'Plot 2'). Currently, all the lines in Plot 1 have different colours and all the lines in Plot 2 have

Re: [R] Sorting a data frame with values of different lengths

2011-06-07 Thread Tim Smith
William, I think to convert to numeric, you might need to do something like: as.numeric(as.character()) ## and not just as.numeric() As it stands, it would appear that it is still being read as a character string. From: William Armstrong To: r-help

[R] Passing formula as an agrument

2011-01-23 Thread Tim Smith
Hi, I had a function that looked like: diff <- lm(x ~ y + z) How can I pass the argument to the 'lm' function on the fly? E.g., if I pass it in as a string (e.g. "x ~ y + z"), then the lm function treats it as a string and not a proper argument. many thanks [[alternative HTML

[R] Outlier detection in bimodal distribution

2010-07-26 Thread Tim Smith
Hi, I was looking for a package that would help with outlier detection for bimodal distributions. I have tried 'outliers' and 'extremevalues' packages, but am not sure if they are ok for bimodal distribution. Any help would be highly appreciated! thanks, [[alternative HTML ver

[R] package error

2010-07-06 Thread Tim Smith
Hi, I was trying to install the 'lme4' package on a mac, but keep getting installation errors. I'm trying to post the actual code that I use, and the output, but it keeps on getting bounced off the message board as spam (Moderator approval required). Is there something that I should be using/

[R] lme4 installation

2010-07-06 Thread Tim Smith
Hi, I was trying to install the package 'lme4'. Here is the code and the sessionInfo() that I am using: > install.packages("lme4",dependencies=T) Warning in install.packages("lme4", dependencies = T) : argument 'lib' is missing: using '/Users/ts/Library/R/2.11/library' Warning message: In ge

[R] abline on heatmap

2010-03-20 Thread Tim Smith
Hi, Is there a way I can draw an abline on a heatmap? I try the abline function, but don't get the line. My sample code is: mat <- matrix(sample(1:100,40),nrow=5) heatmap(mat,col=greenred(75),trace="none", dendrogram = "column",labCol = NULL) abline(h=5,v=4) thanks! [[alternati

[R] heatmap.2 - ColSideColors question

2010-03-16 Thread Tim Smith
Hi, I wanted to make more than one side color bar. For example, I can make one side color bar (col1) with the following code: --- library(gplots) mat <- matrix(sample(1:100,40),nrow=5) class1 <- c(rep(0,4),rep(1,4)) col1 <- ifelse(class1 == 0,"blue","red") class2

[R] Question on passing in parameter to Cox hazard

2010-03-09 Thread Tim Smith
Hi, I wanted to do the cox model using a matrix. The following lines illustrate what I want to do: dat <- matrix(rnorm(30), ncol=3,dimnames = list(1:10,letters[1:3])) Survival <- rexp(10) Status <- ifelse(runif(10) < .7, 1, 0) mat <- as.data.frame(cbind(dat,Surviv

[R] Biclustering / Co-clustering in more than 2 dimensions

2010-02-02 Thread Tim Smith
Hi, I was wondering if there existed a package in R that would bicluster / co-cluster in more than 2 dimensions. thanks! [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-

[R] Biclust package: drawHeatmap()

2010-02-01 Thread Tim Smith
Hi, I was trying to draw a heatmap of the bicluster results. With the code given in the biclust package I can only get the heatmap for one cluster at a time (drawHeatmap function). Is there any way that I can get the heatmap for all the clusters at the same time? The code that I am using (biclu

Re: [R] Return values in fExtremes package

2010-01-07 Thread Tim Smith
Re: [R] Return values in fExtremes package Tim Smith wrote: > Hi, > > I was usuing the fExtemes package, and wanted to obtain some of the values > returned from the function gumbelFit(). For example, in the following code, I > would like to access 'mu' and 'beta'

[R] Return values in fExtremes package

2010-01-07 Thread Tim Smith
Hi, I was usuing the fExtemes package, and wanted to obtain some of the values returned from the function gumbelFit(). For example, in the following code, I would like to access 'mu' and 'beta' from the object 'para'. How should I go about doing this? Is there any generic method to access the o

Re: [R] Discontinuous graph

2009-11-17 Thread Tim Smith
David Winsemius : > > On Nov 16, 2009, at 12:40 PM, Tim Smith wrote: > >> Hi, >> I wanted to make a graph with the following table (2 rows, 3 columns): >> a b c >> x 1 3 5 >> y 5 8 6 >> The first column represents the start cordinate, and the second c

[R] Lattice plot

2009-11-17 Thread Tim Smith
Hi, I was trying to get a graph in lattice with the following data frame (7 rows, 5 cols): chr start1 end1 meth positive 1 1 10 20 1.5y 2 2 12 18 -0.7n 3 3 22 34 2.0y 4 1 35 70 3.0y 5 1120 140 -1.3n 6 1180 19

[R] Discontinuous graph

2009-11-16 Thread Tim Smith
Hi, I wanted to make a graph with the following table (2 rows, 3 columns): a b c x 1 3 5 y 5 8 6 The first column represents the start cordinate, and the second column contains the end cordinate for the x-axis. The third column contains the y-axis co-ordinate. For example, the first row in the m

[R] col headers in read.table()

2009-09-24 Thread Tim Smith
Hi, I was trying to read in a file test.txt, which has the following data: norm normnormclass class class a 1 2 3 4 5 6 b 3 4 5 6 7 8 c 5 6 7 8 9 10 in my R code, I do the f

Re: [R] error bars in matplot

2009-04-17 Thread Tim Smith
Thanks Mathieu and Jim, That worked! From: Jim Lemon Cc: r Sent: Friday, April 17, 2009 7:45:39 AM Subject: Re: [R] error bars in matplot Tim Smith wrote: > Hi, > > I was trying to get error bars in my matplot. I looked at an earlier thread,

[R] error bars in matplot

2009-04-16 Thread Tim Smith
Hi, I was trying to get error bars in my matplot. I looked at an earlier thread, and the sample code that I made is: #-- library(plotrix) mat1 <- matrix(sample(1:30,10),nrow=5,ncol=2) ses <- matrix(sample(1:3,10,replace=T),nrow=5,ncol=2) vect <- seq(20,100,20) rownames(mat1) <-

[R] directory manipulation

2009-02-13 Thread Tim Smith
Hi all, I was trying to copy a directory from one location to another. Is there a command (similar to file copy command) that will let me do this? thanks. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https

[R] copy directory command

2009-02-13 Thread Tim Smith
Hi, I was trying to copy a directory from one location to another. Is there a command to do this (similar to the file.copy command)? thanks! [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.

[R] variable values

2009-02-12 Thread Tim Smith
Hi all, I was working with some probabilities and wanted to store some small values. For example: > x = 2e-250 > x [1] 2e-250 > y = 2e-300 > y [1] 2e-300 > z = 2e-350 > z [1] 0 Is there any way to store a small value (e.g. 2e-350) in R? thanks! [[alternative HTML version del

[R] xtable html links

2008-12-06 Thread Tim Smith
Hi, I was trying to get hyperlinks using xtable, but couldn't get the hyperlinks to function properly. For example, if I use ## Try to link NY times website to every figure in column 4 mat <- matrix(1:43,6,5) mat[,5] <- "http://nytimes.com"; for(i in 1:nrow(mat)){ strr <- paste('', mat[i,4

[R] Cross-validation

2008-11-14 Thread Tim Smith
Hi, I was trying to do cross-validation using the crossval function (bootstrap package), with the following code: - theta.fit <- function(x,y){ model <- svm(x,y,kernel = "linear")

Re: [R] gWidgets install

2008-10-14 Thread Tim Smith
ad failed for 'gWidgets' > --- - TS - Original Message From: cls59 <[EMAIL PROTECTED]> To: r-help@r-project.org Sent: Tuesday, October 14, 2008 6:02:27 PM Subject: Re: [R] gWidgets install Tim Smith-5 wro

[R] gWidgets install

2008-10-14 Thread Tim Smith
Hi, I wanted to install the gWidgets package and ran the following code: -- > install.packages("gWidgets") trying URL 'http://www.ibiblio.org/pub/languages/R/CRAN/bin/windows/contrib/2.7/gWidgets_0.0-30.zip' Content type 'application/zip' length 1354268 by

[R] replace NULL with NA in matrix

2008-04-17 Thread Tim Smith
Hi, I had a matrix with NULL values, which I wanted to replace with NA. Is there an efficient way to do this? Small sample input matrix: A B C D E 1 5222.18 6355.10 4392.68 2607.41 4524.09 2NULL 257.33NULL 161.51 119.44 3NULL 274.80 305.28 443.2

[R] Parallel R for dummies (on hpc)

2008-02-25 Thread Tim Smith
Hi, I had access to an hpc cluster, and wanted to parallelize some of my R code. I looked at the snow,nws, rscalapack documentation but was unable to make out how I should submit my job to the hpc, and how I should code a simple program. For example, if I had 10 matrices, and 10 processor how s

[R] Clustering with ordinal data

2008-02-15 Thread Tim Smith
Hi, Is there any clustering package in R that can cluster with ordinal data? thanks! Be a better friend, newshound, and [[alternative HTML version deleted]]

[R] Semi-supervised clustering using constraints?

2007-10-25 Thread Tim Smith
Hi, Is there any package that implements semi-supervised clustering through 'must-link' and 'cannot-link' constraints? thanks! __ [[alternative HTML version deleted]] __ R-help@r-project.o

Re: [R] Graphics - plotting two graphs

2007-10-24 Thread Tim Smith
Hi all, I think you are both right. Multiple scales are not a good idea. I think I'll go with the two graphs idea that John suggested. It is way better than trying to superimpose two scales. thanks a lot!! Tim Scionforbai <[EMAIL PROTECTED]> wrote: plot(x1,y1,"b",xlim=range(x1), ylim=c(0, 1

[R] Graphics - plotting two graphs

2007-10-24 Thread Tim Smith
Hi, I wanted to plot 2 lines on a single graph. Each graph has one axis that can be common. The code that I'm using is: --- par(mfrow=c(1, 1)) x1 <- c(2, 4, 6, 8, 10, 12) x2 <- c(10, 20, 30, 40, 50, 60) y1 <- c(10,12,15,22,34,21) y2 <- c(40,