Re: [R] Hello,

2008-08-12 Thread Richard Pearson
Kiran exonmap is a bioconductor package - I'd suggest trying the bioconductor mailing list. Also, you're more likely to get a response if you include an informative subject line. Regards Richard. Kiran Annaiah wrote: Hello, A newbie to R. I am trying to use the exonmap package in R. Acc

Re: [R] rpart confidence intervals?

2008-07-23 Thread Richard Pearson
Hi RichardP I guess you'll increase your chances of a response if you include some affiliation info. This could also avoid getting you confused with other people - I thought for a minute I'd been sleep-emailing :-) Cheers A N Other RichardP RichardP wrote: hi, I am using rpart with a cont

Re: [R] Error in installing packages

2008-07-22 Thread Richard Pearson
Lazarus I'm not sure your first problem is actually a problem - it looks to me like the epicalc package installed OK. Have you tried using epicalc? I'm sure your problem 2 is not an R problem, so don't know whether you'll get any help on this list. Best wishes Richard. Lazarus Mramba wro

Re: [R] Creation of png=problems

2008-07-21 Thread Richard Pearson
Romain You might get a fuller answer from others, but one thing you could try is using bitmap() rather than png(). Cheers Richard. Romain wrote: Hi everybody, I am currently working with R and I would like to create jpeg graphs with it. I am working on Windows and Unix but I would like t

Re: [R] Subsetting an array by a vector of dimensions

2008-07-11 Thread Richard Pearson
t;NA","",subsetString) evalString <- paste(expression(x), "[", subsetString, "] <-", expression(value)) eval(parse(text=evalString)) x } x <- array(1:24, dim=2:4) subsetArray(x, c(1,1,2)) subsetArray(x, c(1,1,2)) <- 25 x Thanks to Pat! Richard R

Re: [R] Subsetting an array by a vector of dimensions

2008-07-11 Thread Richard Pearson
tion "subsetArray<-" Best wishes Richard. Patrick Burns wrote: I think you are looking for subscripting with a matrix: x[cbind(1,1,2)] See, for instance, the subscripting section of chapter 1 of S Poetry. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home

[R] Subsetting an array by a vector of dimensions

2008-07-11 Thread Richard Pearson
Hi Is it possible to subset an n-dimensional array by a vector of n dimensions? E.g. assume I have x <- array(1:24, dim=2:4) x[1,1,2] [1] 7 dims <- c(1,1,2) I would like a function that I can supply x and dims as parameters to, and have it return 7. Also, I would like to do something like

Re: [R] Sum(Random Numbers)=100

2008-07-08 Thread Richard Pearson
Shubha Does table(ceiling(runif(100,0,50))) give you something like you want? Richard. Shubha Vishwanath Karanth wrote: ...actually I need to allocate certain amount of money (here I mentioned it as 100) to a randomly selected stocks(50 stocks)... i.e., 100 being divided among 50 stocks and pr

Re: [R] variable as part of file name

2008-07-02 Thread Richard Pearson
Laura Does jpeg(paste(var_filename, "jpg", sep=".")) do what you want? Regards Richard Laura Poggio wrote: Dear all, sorry for this very basic question, but I did not find any good example yet. I would like to set up a variable that can be recall later to substitute a part of a file name. A

Re: [R] I want to install a package on Max OS X from a local file

2008-06-25 Thread Richard Pearson
From the (terminal window) command line try: R CMD INSTALL path.to.file/filename.tar.gz Does that do it? Richard stephen sefick wrote: install.packages(file.choose(), repos=NULL) thought this would work, but it didn't the package is the sowas package - this doesn't seem to be a CRAN package

Re: [R] Suppressing output (e.g. from cat)

2008-06-24 Thread Richard Pearson
Many thanks Brian and Hadley, the quiet function works well for me. Maybe a candidate for utils? Best wishes Richard. hadley wickham wrote: Or: tc <- textConnection(NULL, "w") sink(tc) ... sink() close(tc) That is a lot more expensive and subject to o Use of textConnection(NULL, mode=

Re: [R] Suppressing output (e.g. from cat)

2008-06-24 Thread Richard Pearson
Wacek, many thanks! I'm wondering however whether this will be problematic on Windows (I have no windows box to hand to check this, but am creating a package that I would like to be cross-platform)? Richard. Wacek Kusnierczyk wrote: Richard Pearson wrote: Is it possible to tempor

[R] Suppressing output (e.g. from cat)

2008-06-24 Thread Richard Pearson
Is it possible to temporarily suspend output? I am using a function that gives lots of output using cat, that is not very informative. Is it possible to turn output off, run the function, then turn output back on again? I've looked at ?options and done various RSiteSearch()s but couldn't find a

Re: [R] Extracting "row.names"

2008-06-23 Thread Richard Pearson
As a further aside, names is also not the best choice for a variable name for the same reason. Richard. Erik Iverson wrote: row.names is a function that takes a data.frame as an argument. So how about > row.names(data) ? As an aside, 'data' is not the best choice for a variable name in

Re: [R] which question

2008-06-06 Thread Richard Pearson
I didn't get any attached data, but my suspicion here is that you have somehow got RefSeq IDs in column 8 of human, as well as the gene symbols. Did you read this data in from a text file? Eleni Christodoulou wrote: An example is: symbol=human[which(human[,3] %in% genes.sam.names),8] The dat

Re: [R] Remove an object by the reference

2008-05-13 Thread Richard Pearson
How about rm(list=x)? Richard. Shubha Vishwanath Karanth wrote: Hi R, A simple question, but don't know the answer... x="a" a=5 I need to remove the object "a" by using only x. something like rm(somefunction(x))...Is this possible? Shubha Karanth | Amba Research Ph +91 8

Re: [R] deleting variables

2008-04-29 Thread Richard Pearson
?rm Richard Ralf Goertz wrote: How can I automatically exclude one variable from being saved in the workspace when I quit an R session? The problem is I don't know how to erase a variable once it has been created. Background: I open a connection called "con" to a database server in my ~/.Rprof

Re: [R] generic question -> Genomics with R

2008-04-29 Thread Richard Pearson
I'd also suggest you check out http://www.bioconductor.org - "Bioconductor is an open source and open development software project for the analysis and comprehension of genomic data" Richard. Liviu Andronic wrote: Hello, On 4/29/08, [Ricardo Rodriguez] Your XEN ICT Team <[EMAIL PROTECTED]> w

Re: [R] Set of well distinguishable line types?

2008-04-28 Thread Richard Pearson
I've used the following to get a few different line types. However, I'd be interested to hear from someone with expertise in creating line types that are "maximally distinguishable" by human eyes. ltys = c("22", "44", "13", "1343", "73", "2262", "12223242", "F282", "F4448444", "224282F2", "F1"

Re: [R] Equivalent of TensorRank

2008-03-26 Thread Richard Pearson
length(dim())? Amit Soni wrote: > Hi, > > In Mathematica, if we have a 3X3 matrix A, we can get its dimensions by: > Dimensions[A] = {3,3} > TensorRank[A] = 2 > > In R, we have dim() for Dimensions[]. Is there any direct function similar > to TensorRank in R? > > Thank you > > [[alternative

Re: [R] ROC analysis

2008-03-19 Thread Richard Pearson
Eleni Does the fpr.stop argument do what you want? This is described in ?performance under the details of the "auc" measure. Try, e.g. perform=performance(pred,measure="auc",fpr.stop=0.5) Richard. Eleni Christodoulou wrote: > Hello list, > > I am trying to perform ROC analysis and count the

Re: [R] levels() function for a vector

2008-03-11 Thread Richard Pearson
Karen levels returns the levels attribute of a variable, and a vector has no such attribute. This is usually used with a factor, e.g. > temp <- c(3, 5, 5, NA) > levels(factor(temp)) [1] "3" "5" Best wishes Richard Chang Liu wrote: > Hello: > > I'm trying to use levels function, but I don

Re: [R] how to create ROC curve for 2 dimensional classifiers

2008-02-22 Thread Richard Pearson
I'm not aware of any packages for doing such plots. Conceptually, presumably a ROC curve for a 2d classifier would be a 3d chart, with x-axis being FPR for 1st classifier, z-axis being FPR for 2nd classifier and y-axis being TPR. You would get a "ROC surface" rather than a ROC curve. Does that

Re: [R] How to make t.test handle "NA" and "essentially constant values" ?

2008-02-12 Thread Richard Pearson
Do you mean to deal with the situation where you're doing many t-tests in a loop? If so there was a post very recently on this list about this: https://stat.ethz.ch/pipermail/r-help/2008-February/153254.html Richard. Ng Stanley wrote: > Thanks. Someone please help to make t.test go through all

Re: [R] advice requested re: building "good" system (R, SQL db) for handling large datasets

2008-02-06 Thread Richard Pearson
Hi Thomas I'm certainly no expert but thought I'd reply as I'm likely to be in a similar position soon. With regards versions of R I think you should always have the latest release version. This will mean upgrading at least every 6 months, but this shouldn't be too much of a problem. With OSs