Re: [R] hi, i have a problem in R

2009-08-05 Thread Steve Lianoglou
names(which.max(counts)) [1] "5" R> as.numeric(names(which.max(counts))) [1] 5 I think that should help, -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cor

Re: [R] A question regarding R scoping

2009-08-05 Thread Steve Lianoglou
? Thanks in advance! Uhm ... what? You want i = 1 where, exactly? You want to call to f1(i) to set i to 1 in f2? Sorry, I don't really follow. Can you be a bit more explicit? -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer C

Re: [R] Question with apply function

2009-08-05 Thread Steve Lianoglou
up in your call to tapply? Here's another way to kind of doing the same ... might need some tweaking, but: apply(testlogdata, 2, function (x) lapply(split(x, testlogdata $range_group), mean) -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-

Re: [R] for loop

2009-08-05 Thread Steve Lianoglou
ts: 23 24 25 26 27 28 > === This means R should be giving you some type of error message and w/o telling us more, we're left to take stabs at the dark, which isn't a goof use of anybody's time. -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memor

Re: [R] binning results

2009-08-05 Thread Steve Lianoglou
amples of ?cut (eg, take a look at the output when combined w/ table(cut(..)) ). Sending in your own vector for the ``breaks`` param inorder to bin as you like should get you 90% of the way to building the table you're after. -steve -- Steve Lianoglou Graduate Student: Computational Syst

Re: [R] Error in elastic net

2009-08-04 Thread Steve Lianoglou
version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Steve Lianoglou Graduate Student: Computational

Re: [R] graph data mining

2009-08-04 Thread Steve Lianoglou
though ... it's written in Java. HTH, -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact ___

Re: [R] array slice notation?

2009-08-04 Thread Steve Lianoglou
orrect (linear) indices, which I guess isn't too (too) bad. -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact

Re: [R] error in Elastic net

2009-08-04 Thread Steve Lianoglou
h 168 rows and 359 columns. Try that and see if it works. -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cbio

Re: [R] One critical question in R

2009-08-04 Thread Steve Lianoglou
ew on CRAN: http://cran.r-project.org/web/views/HighPerformanceComputing.html Specifically the "Large memory and out-of-memory data" section. -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medica

Re: [R] read.csv from a remote machine

2009-08-04 Thread Steve Lianoglou
open file connections in the ? connections help page. If the file is accessible via http, or ftp I guess you're in luck, otherwise I'd imagine you have to just copy the file to your local system then open it. -steve -- Steve Lianoglou Graduate Student: Computational Syste

Re: [R] Save model and predictions from svm

2009-08-03 Thread Steve Lianoglou
babilities')." If you don't specifically ask for the attribute, it won't get in your way (except when showing the object on the screen) -- this is why I can do "x$prediction <- pred" because there are as many elements in the 'pred' vector as there

Re: [R] Save model and predictions from svm

2009-08-03 Thread Steve Lianoglou
, you're losing the decision label. Anyway -- the predict.svm function just returns a vector/matrix. You can use the standard R vector/matrix manipulation methods to do what you want. If you're still having trouble with that, please post an example of what you're after --

Re: [R] hist2d

2009-08-03 Thread Steve Lianoglou
Hi, On Aug 3, 2009, at 4:44 PM, simon.b.firest...@frb.gov wrote: I'd like to use the hist2d function. What library contains it? Thanks! Try: R> RSiteSearch('hist2d') Several signs point to the gplots package ... try that one. -steve -- Steve Lianoglou Graduate Stud

Re: [R] For Loop Iteration: Variable Counter

2009-08-03 Thread Steve Lianoglou
Hi, On Aug 3, 2009, at 12:09 PM, Vivek Ayer wrote: Hey guys, How do I iterate such that I add 100 to the counter every time? Suppose: for (i in c(1:100)) I want i to be 1, 10, 20, 30, ... instead of 1,2,3,4,5 ... How can this be done? ?seq -steve -- Steve Lianoglou Graduate Student

Re: [R] How to catch an error using try

2009-08-03 Thread Steve Lianoglou
f b is an error: R> is(b, 'try-error') [1] TRUE R> > inherits(b, 'try-error') # used in last line of ?try [1] TRUE -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of

Re: [R] Table to Data-frame

2009-08-03 Thread Steve Lianoglou
Hi, On Aug 3, 2009, at 10:35 AM, Olivier Peron wrote: Hello How to pass from table to data-frame ? R> a <- sample(LETTERS[1:10], 20, replace=T) R> b <- table(a) R> c <- as.data.frame(b) R> c a Freq 1 A4 2 B2 3 C1 4 D4 5 E1 6 F1 7 H1 8 J

Re: [R] How to get w and b in SVR? (package e1071)

2009-08-03 Thread Steve Lianoglou
by definition, your y intercept (b) should be zero. I think the values in model$y.scale might be what you're looking for, though (not sure). Hope that helps, -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Wei

Re: [R] scale subsets of grouped data in data frame

2009-07-31 Thread Steve Lianoglou
ack from colnames(data). -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact __ R-he

Re: [R] scale subset of data

2009-07-31 Thread Steve Lianoglou
awdata[rawdata$code=='foo', 'a'] <- scale(rawdata[rawdata $code=='foo', 'a']) -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medic

Re: [R] function problem

2009-07-31 Thread Steve Lianoglou
t; all.vals <- expand.grid(x,y, stringsAsFactors=F) R> all.vals[1:3,] Var1 Var2 1AJ 2BJ 3CJ R> ans <- lapply(seq(nrow(all.vals)), function(i) paste(all.vals[i,1], all.vals[i,2], sep='(*)')) R> ans[1:3] [[1]] [1] "A(*)J" [[2]] [1] &q

Re: [R] how use the subset?

2009-07-30 Thread Steve Lianoglou
ing and what you expect to get out of it. We'll show you where you're going wrong ;-) -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.o

Re: [R] Loess question

2009-07-30 Thread Steve Lianoglou
et back? Something like: smoothed <- loess.smooth(my.x, my.y) max(smoothed$y) -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cb

Re: [R] Relative paths in R?

2009-07-30 Thread Steve Lianoglou
aunch it using the R CMD BATCH command so I would end up with something like "PathUpload <- './ uploads'" (as in php in this example) I could not find anything in help or previous posts...any feedback on feasibility appreciated Does ?getwd help? -steve -- S

Re: [R] reading a file

2009-07-30 Thread Steve Lianoglou
<- read.table(ifn) names(dat1)<-c("Code","M") names(dat2)<-c("Code","M") I want to have the first three lines in dat1 and second three lines in dat2. Any one can help on this please. Just split your data file in two after you read it: dat1 <-

Re: [R] Re : Wavelet Kernel

2009-07-29 Thread Steve Lianoglou
painful to run over a large amount of data. If that's the case, you might consider implementing it in C down the road. Please do keep us posted :-) -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical Col

Re: [R] how to skip a numeric column for averaging other columns?

2009-07-29 Thread Steve Lianoglou
ou can use the specialized colMeans function: colMeans(raw_data[,-1]) -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cbio

Re: [R] dot plot with several points for 2 categories

2009-07-29 Thread Steve Lianoglou
dotplot(rnorm(20,10,2), rnorm(20,15,1), rnorm(10,15,0.1), cols=c('red','green','blue'), labels=c('A', 'B', 'C'), main="Custom Colors") See ?plot ?title ?par to tweak the plotting functionality as you wish. -steve -- Steve Li

Re: [R] install package from CRAN

2009-07-28 Thread Steve Lianoglou
actually looks like a different/worse problem because the error your get seems to be coming from your unix shell .. as if R is doing something like a "system" call but the command it's sending is malformed. -steve -- Steve Lianoglou Graduate Student: Computational Systems B

Re: [R] install package from CRAN

2009-07-28 Thread Steve Lianoglou
x27;d do so like this: install.packages('mvtnorm') Is that what you did? -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lian

Re: [R] Looping through R objects

2009-07-28 Thread Steve Lianoglou
to do the same w/o the attach/detach calls. Just wanted to show you another way to get at what you wanted ... take it or leave it, your choice :-) -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College

Re: [R] Looping through R objects

2009-07-28 Thread Steve Lianoglou
3 objects. How could I automate this with a for loop? for (i in c(1:13)) ... Any ideas? objects <- lapply(1:13, function(i) { read.csv(paste(i, 'csv', sep='.'), header=TRUE, sep="") }) -steve -- Steve Lianoglou Graduate Student: Computational Systems B

Re: [R] Check functions in package

2009-07-28 Thread Steve Lianoglou
glmnet::nonzeroCoef glmnet::plotCoef glmnet::predict.glmnet glmnet::predict.multnet is hitting the tab key twice in quick succession. There are probably better ways, but there's one option. -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memoria

Re: [R] different names for new files in a for loop

2009-07-28 Thread Steve Lianoglou
... } See ?write.table for possible "OTHER OPTIONS" you can use in the calls to read/write.table. -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of C

Re: [R] selecting vector elements using matrices and combining the results

2009-07-28 Thread Steve Lianoglou
t ordering up to you: lapply(seq(nrow(m1)), function (idx) c(v1[m1[idx,]], v2[m2[idx,]])) [[1]] [1] "A" "D" "b" "f" [[2]] [1] "C" "E" [[3]] [1] "D" "e" -- Steve Lianogl

Re: [R] character vector -> numeric matrix ??

2009-07-28 Thread Steve Lianoglou
quot;zz" vector has a long length. Any comments will be greatly appreciated. Kathryn Lord pieces <- strsplit(zz, "") # look at what pieces looks like my.data <- as.numeric(unlist(pieces)) my.matrix <- t(matrix(my.data, nrow=2)) my.matrix [,1] [,2] [1,]1

Re: [R] Searching for specific values in a matrix

2009-07-28 Thread Steve Lianoglou
4 9 -124.2511 40.11697 1NA 10 -124.2532 40.12640 1NA Assume you want a range constrained by x and y: good.x <- rearranged$x > 124.3 & rearranged$x < 125 good.y <- rearranged$y > 40.5 & rearranged$y < 41 rearranged[good.x & g

Re: [R] Searching for specific values in a matrix

2009-07-27 Thread Steve Lianoglou
o maybe it has to do with the rounding errors? Rounding errors won't happen with integer comparisons (and it looks like the VSCAT.001 columns is integers, no?). -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology |

Re: [R] Searching for specific values in a matrix

2009-07-27 Thread Steve Lianoglou
that returns # a <0-row> data.frame, for example using a value # that appears in that column from the previous query R> my.data[my.data[,1] == 'something',] <0 rows> (or 0-length row.names) There should be a simple answer to what's going wrong here. -steve -- St

Re: [R] Searching for specific values in a matrix

2009-07-27 Thread Steve Lianoglou
more help I can provide. -steve On Mon, Jul 27, 2009 at 12:15 PM, Steve Lianoglou > wrote: On Jul 27, 2009, at 2:54 PM, Mehdi Khan wrote: i am able to return the first column, but anything else returns this: <0 rows> (or 0-length row.names) any idea? I'm not sure what you

Re: [R] Forumla format?

2009-07-27 Thread Steve Lianoglou
ula(sprintf('label ~ %s', paste(colnames(my.data)[- c(22,23,24), collapse=" + ")) Then use `f` in your call to svm? Maybe? -steve On 7/27/09 12:17 PM, Steve Lianoglou wrote: Hi, On Jul 27, 2009, at 3:01 PM, Noah Silverman wrote: Hi, Quick question. I'm worki

Re: [R] Cross-validating two matrices

2009-07-27 Thread Steve Lianoglou
1 1 2 3 1 plot4 0 1 2 1 0 keep <- intersect(rownames(matrix1), colnames(matrix2)) m1 <- matrix1[keep,] m2 <- matrix2[,keep] -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Canc

Re: [R] Searching for specific values in a matrix

2009-07-27 Thread Steve Lianoglou
al test that you are using to index the rows of your data.frame for. Can you show the code that you are using (based on the example data you gave) that is giving you the <0 rows> result? -steve On Tue, Jul 21, 2009 at 12:49 PM, Steve Lianoglou > wrote: On Jul 21, 2009, at 3:27

Re: [R] Forumla format?

2009-07-27 Thread Steve Lianoglou
called "my.data": my.data[,-c(22,23,25,31)] Returns the data.frame w/o columns 22,23,25 and 31. -steve It would be nice to not have to do +c1 +c2 +c3 +c4, etc for all 48 columns. Yes, it is nice, isn't it? :-) -steve -- Steve Lianoglou Graduate Student: Computational Syste

Re: [R] Creating new data frame using loop

2009-07-27 Thread Steve Lianoglou
ant to call, the second param is a *list* of parameters you'd like to pass into the function. -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cbio.m

Re: [R] create dataset permanently in package (i.e. default or our own package)

2009-07-27 Thread Steve Lianoglou
age you need to load it from. For example, if I saved 'TheoryOfRelativity.rda' in the 'nnet' package's data directory (for some weird reason). You can load it like so: load(TheoryOfRelativity, package='nnet') HTH, -steve -- Steve Lianoglou Graduate Student: Computatio

Re: [R] graphs

2009-07-25 Thread Steve Lianoglou
='l', col='navy') abline(v = 149, col = "black") curve(dnorm(x,mean=150, sd=15),from=75, to=225, col='orange', add=TRUE) Check ?segments -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer C

Re: [R] r2 question

2009-07-25 Thread Steve Lianoglou
SST (on that page) Using the formulas on that page, translating to R is pretty straight forward. Let's take the example code at the bottom of ?lm help page for reference and calculate the R^2: ssr <- sum((predict(lm.D9, group) - weight)^2) sst <- sum((weight - mean(weight))^2) r

Re: [R] CI wiskers

2009-07-24 Thread Steve Lianoglou
quot;hat" to put at each whisker (typically 1/x works well here, too) HTH, -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://c

Re: [R] EOF revisited

2009-07-24 Thread Steve Lianoglou
(con,n=100) if (length(line) < 100) break } I'm guessing that by now you've already rigged up a small 10 line text file and set n to be less than (but not a factor of) 10 to test this and see for yourself, no? -steve -- Steve Lianoglou Graduate Student: Computational Systems Biolo

Re: [R] roclet

2009-07-24 Thread Steve Lianoglou
an you put it into context? Where did you come across the term? Oh, are you talking about the "roclet" referred to in this thread? http://www.nabble.com/Roxygen-to16111256.html#a16111256 -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Ketter

Re: [R] Help with Loop!

2009-07-23 Thread Steve Lianoglou
} misclassified <- examples[,3] * (examples[,1:2] %*% w) <= 0 } ## Here's the while loop w/o for loops misclassified <- examples[,3] * (examples[,1:2] %*% w) <= 0 while (any(misclassified)) { w <- w + colSums(nu * examples[misclassified,3] * examples[misclassified,1:2])

Re: [R] Question about the lars package

2009-07-23 Thread Steve Lianoglou
. By the by, you might want to look at the glmnet package if you find yourself using lars often. Setting the glmnet alpha parameter to 1 essentially gives you the lasso regularization path and I've found it to be quite a bit faster than lars. -steve -- Steve Lianoglou Graduate Studen

Re: [R] dimension trouble for a matrix

2009-07-23 Thread Steve Lianoglou
quot;cat" to be shown, but I'm not seeing it in the output you pasted. Other randomness: xy <- matrix(rep("",n1*3),nrow=n1,ncol=3) can be: xy <- matrix("", nrow=n1, ncol=3) Also, are you sure you want to store this in a matrix? The fact that you wa

Re: [R] How to use macro variable in a text string

2009-07-22 Thread Steve Lianoglou
uot;) ... } You can also use the paste function in place of sprintf -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact __

Re: [R] Merge vectors

2009-07-22 Thread Steve Lianoglou
ing to the order set of the vector of data values... The result would be: (130,43,43,130,98,230,5,91,7,230,130) R> A[B] [1] 130 43 43 130 98 230 5 91 7 230 130 -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Weill Medical College of Cornell U

Re: [R] Find multiple elements in a vector

2009-07-22 Thread Steve Lianoglou
1 3 The problem is that if you have repeat elements in x, it will only return you the index of the first match in x. -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org

Re: [R] strange behavior of system command

2009-07-22 Thread Steve Lianoglou
e command looks weird to me, but I think the help is suggesting to: e7 <- system("globus-job-run x /bin/sh -c 'cd $OSG_APP/ engage;chmod 777 oops' 2>&1",intern=TRUE) ??maybe?? or do you have to add the 2>&1 to each of the separate commands you'

Re: [R] time attribute from a file

2009-07-21 Thread Steve Lianoglou
Hi, On Jul 21, 2009, at 4:54 PM, Erin Hodgess wrote: Dear R People: I am reading in a file via read.table. Is there a way to bring in the time that the file was created, please? See: ?file.info and the mtime, ctime, atime attributes it returns. -steve -- Steve Lianoglou Graduate

Re: [R] Customization options with .Renviron, R_LIBS, .Rprofile etc

2009-07-21 Thread Steve Lianoglou
little differently? Have a look at ?Startup and I don't think R loads an .Rprofile file in your current working directory (at least, it's not doing it for me). -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology W

Re: [R] Searching for specific values in a matrix

2009-07-21 Thread Steve Lianoglou
NA NA NA.3NA NANANA NA NA.4NA NANANA NA So you could do something like: > df[df$attr1 == 'BC' & !is.na(df$attr1),] coln attr1 attr2 attr3 LON LAT 2 17210BC NA NA -122.9581 38.36304 4

Re: [R] Re gression using age and Duration of disease as a continous factors

2009-07-21 Thread Steve Lianoglou
On Jul 21, 2009, at 1:56 PM, Mehdi Khan wrote: http://www.amazon.com/gp/product/007310874X/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=304485901&pf_rd_s=lpo-top-stripe-1&pf_rd_t=201&pf_rd_i=0256117365&pf_rd_m=ATVPDKIKX0DER&pf_rd_r=155Y7AP1SHTSJESHM15M This is our textbook for regression analysis. Go throug

Re: [R] Searching for specific values in a matrix

2009-07-21 Thread Steve Lianoglou
) R> sum(x %~% 0) ## Equivalently: sum(almost.equal(x, 0)) [1] 8 R> sum(x == 0) [1] 0 Summing over a logical vector treats the TRUE values as 1 and FALSE values as 0. HTH, -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Weill Medical Colle

Re: [R] Searching for specific values in a matrix

2009-07-21 Thread Steve Lianoglou
('ia', df$words) R> df[idxs,] nums words 11 Abelonian 5 5 abepithymia 88 Aberdonian 99 Aberia Is something like that what you're after? -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Weill Medical College o

Re: [R] Searching for specific values in a matrix

2009-07-21 Thread Steve Lianoglou
t;, "Aberdeen", "aberdevine", "Aberdonian", "Aberia", "aberrance")) evens <- df$nums %% 2 == 0 df[evens,] You can build such an indexing vector (like evens) in a number of different ways to suite your problem. -steve

Re: [R] Re gression using age and Duration of disease as a continous factors

2009-07-21 Thread Steve Lianoglou
ccount how these 8 proteins are interacting w/ each other? Many questions to answer ... Anyway ... I'm not sure there's any real value in this email, but I've got my own fish to fry so time to move on ... -steve -- Steve Lianoglou Graduate Student: Physiology, Bi

Re: [R] Select value according two vectors...

2009-07-21 Thread Steve Lianoglou
8, 0.2727, 0.3636, 0.4545, 0.6363, 0., 0., 0., 0.000) R> b <- c(3, 5, 7, 18, 43, 85, 91, 98, 100, 130, 230, 487) R> b[a > .5] [1] 98 Won't fail ungraciously if there is no solution: R> b[a > .8] numeric(0) Is that what you're after? -steve -- Steve L

Re: [R] writte file doubt

2009-07-21 Thread Steve Lianoglou
On the other hand, everytime I execute a function that is locatd in my documents I must open it source(file.choose()) , there is a folder where to put my function to not necesessary run prevously source(file.choose()). See ?startup Rather: ?Startup -steve -- Steve Lianoglou Graduate

Re: [R] Re gression for loop test HELP! URGENT!

2009-07-20 Thread Steve Lianoglou
o, which is to "fit new data." I think having a look through the documentation in ?predict.lm should make this clear, no? Is this what you're after? HTH, -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems B

Re: [R] Re al Time PCR data analysis help

2009-07-20 Thread Steve Lianoglou
Some other packages that might help: * http://bioconductor.org/packages/2.4/bioc/html/qpcrNorm.html * http://bioconductor.org/packages/2.4/bioc/html/SLqPCR.html -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Weill Medical College of Cornell University Co

Re: [R] Re gression using age and Duration of disease as a continous factors

2009-07-20 Thread Steve Lianoglou
f us have our own work to do, but are here to help if you're stuck on something *in particular* ... perhaps you can do a bit more legwork and rephrase your question in a more meaningful way. -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Wei

Re: [R] EM Clustering

2009-07-20 Thread Steve Lianoglou
http://www.cc.gatech.edu/~dellaert/em-paper.pdf HTH, -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact __ R-help@r-project.org ma

Re: [R] Write in file matrices of sifferent size

2009-07-20 Thread Steve Lianoglou
.txt', 'w') cat("Matrix A\n", file=outfile) close(outfile) write.table(matrixA, file='output.txt', append=TRUE, ...) outfile <- open('output.txt', 'a') cat("\nMatrix B\n", file=outfile) close(outfile) write.table(matrixB, file=

Re: [R] dot plot with several points for 2 categories

2009-07-17 Thread Steve Lianoglou
using jitter to add a bit of noise about the x vals so points don't draw ontop of eachother HTH, -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact _

Re: [R] rnorm

2009-07-16 Thread Steve Lianoglou
sking if you really need/want to do that, so I'll just suggest that as a start you could look at the "bigmemory" package for an alternative way to deal with massive matrices: http://cran.r-project.org/web/packages/bigmemory/index.html -steve -- Steve Lianoglou Graduate Student:

Re: [R] Best way to replace :SS with :00

2009-07-16 Thread Steve Lianoglou
eces[1:2],"00")) R> b2 [[1]] [1] "HH" "MM" "00" [[2]] [1] "HH" "MM" "00" [[3]] [1] "HH" "MM" "00" [[4]] [1] "HH" "MM" "00" [[5]] [1] "HH" "MM"

Re: [R] Any package to produce QQplot for survival model checking?

2009-07-16 Thread Steve Lianoglou
anks in advance!! Perhaps: ?qqplot -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact __ R-help@r-project.org mailing list https

Re: [R] Finding missing elements by comparing vectors

2009-07-16 Thread Steve Lianoglou
Is there a function in R to do a-b where a and b are two non-numeric sets (or intersection complement of these two sets). I think you're looking for "setdiff" -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Weill Medical College of Cor

Re: [R] searching for elements

2009-07-15 Thread Steve Lianoglou
R> f1 <- factor(c('a','b','c'), levels=c('a','b','c','d','e')) R> f2 <- factor(c('c','d','e'), levels=c('a','b','c','d','e'))

Re: [R] searching for elements

2009-07-15 Thread Steve Lianoglou
ent element does not appear in sigs[,1], otherwise it will be a vector of indices into sigs[,1] that equal the p0_recent element you're querying with. (Assuming you fix your factor/level issue) HTH, -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Sys

Re: [R] Matrix multiplication precision

2009-07-15 Thread Steve Lianoglou
t's just a link to a book/reference that explains these issues in more detail)? Where/what else should we be looking to do that would be better? Or are there really no general rules, and the answer just depends on the situation? Thanks, -steve -- Steve Lianoglou Graduate Student: Physio

Re: [R] hi, how can we avoid maskiing error in R

2009-07-14 Thread Steve Lianoglou
what's going south. -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact __ R-help@r-project.org mailing list

Re: [R] How to import BIG csv files with separate "map"?

2009-07-14 Thread Steve Lianoglou
r')" command, and using "scan" (or readChar?) to run through the file w/o having to load it all into memory at once. HTH, -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Weill Medical College of Cornell University Contact Info: http://cb

Re: [R] LAPACK package

2009-07-14 Thread Steve Lianoglou
ss to that. Also, as an aside, upgrading to the latest R wouldn't hurt, if feasible :-) -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/

Re: [R] correct way to subset a vector

2009-07-09 Thread Steve Lianoglou
"gh" "ij" Is there an easy way to create the vector c("cd","ef","gh") as I did above using something similar to cd:gh? How about just taking your mynames vector? eg: R> mynames[2:4] [1] "cd" "ef" "gh" R> dat

Re: [R] T.test error help

2009-07-09 Thread Steve Lianoglou
nction(e) { + cat("There was an error\n") + NA + }) There was an error R> a [1] 2.302585 R> b [1] NA -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos __

Re: [R] Converting indices of a matrix subset

2009-07-09 Thread Steve Lianoglou
my.ind2 <- sub2ind(ind2[,1], ind2[,2], m1) # my.ind2 <- sub2ind(ind2, m1) R> my.ind2 [1] 6 11 16 I think that gets you to where you want to be :-) -steve [1] They can be found here if your intersted, there isn't much documentation there, but I'll fix that some time later :-

Re: [R] Best way to export values from a function?

2009-07-08 Thread Steve Lianoglou
show(ex) [1] 2.718282 7.389056 20.085537 show(fa) [1] 1 2 6 = [I can't remember how I stumbled onto this code for the ':=' function (I think it was from a thread on the BioC list about package updates)] I'm not saying that you *should* do it this way, but it's kin

Re: [R] ksvm question -- help! line search failed...

2009-07-07 Thread Steve Lianoglou
]]$A : $ operator is invalid for atomic vectors On Tue, Jul 7, 2009 at 6:45 PM, Steve Lianoglou wrote: Hi, On Jul 7, 2009, at 6:44 PM, Michael wrote: What's wrong? Very sad about this... model <- ksvm(x=mytraindata[, -1], y=factor(mytraindata[, 1]), prob.model=T) Error in .local(x,

Re: [R] Question in using e1071 svm routine

2009-07-07 Thread Steve Lianoglou
C-classification SVM-Kernel: radial cost: 1 gamma: 0.25 Number of Support Vectors: 51 -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos __

Re: [R] ksvm question -- help! cannot get program to run...

2009-07-07 Thread Steve Lianoglou
ur data is wonky. split your data into the x and y vars first and inspect it to make sure that they're "clean." -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Weill Medical College of Cornell University Contact In

Re: [R] SVM cross validation in e1071

2009-07-07 Thread Steve Lianoglou
eturned back to R. So ... that's why. If you train your svm without holding out any data (and do no cross validation), you should essentially get back the same model that you're getting back no when you set cross > 1. Does that make sense? -steve -- Steve Lianoglou Graduate Student

[R] Warning when trying to access a variable out of scope?

2009-07-02 Thread Steve Lianoglou
warn me that "b.test" is being accessed outside the scope of my function? Thanks, -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact __

Re: [R] to creates an array

2009-07-02 Thread Steve Lianoglou
ld you give an example of what you're trying to accomplish, in pseudocode if necessary? -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact __

Re: [R] Need to study and learn about better plots

2009-07-02 Thread Steve Lianoglou
Hi, On Jul 2, 2009, at 11:26 AM, Mark Knecht wrote: On 7/2/09, Steve Lianoglou wrote: [snip] One thing you could do is to peruse the R Graph Gallery to see what people can do: http://addictedtor.free.fr/graphiques/ In particular, the graph below looks *somehow* similar to the chart

Re: [R] Need to study and learn about better plots

2009-07-02 Thread Steve Lianoglou
s.com/ That should be very useful. Hope that helps, -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact __ R-help@r-project.

Re: [R] (no subject)

2009-07-02 Thread Steve Lianoglou
u should use read.csv2 (its "dec" argument defaults to ","). alternatively, since your file just looks like one column, you can use the readLine() function and it will get you what you want, too. -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Sys

Re: [R] Display Median in plot

2009-07-02 Thread Steve Lianoglou
Hope that helps, -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact __ R-help@r-project.org mailing list https://stat.

[R] stringsAsFactors param in expand.grid not working

2009-05-18 Thread Steve Lianoglou
Hi all, I've (tried) to look through the bug tracker, and gmane-search the R list to see if this has been mentioned before, and it looks like it hasn't. According to the R 2.9.0 release notes[1], the expand.grid function should now take a stringsAsFactor=LOGICAL argument which controls whether

Re: [R] Messing with the "..." argument

2009-02-12 Thread Steve Lianoglou
Hi Duncan, > ... > I don't think so, but an alternative is to put together a parameter list > and call do.call(). For example, > ... Nice! Yeah, that did the trick quite well ... Thanks, -steve __ R-help@r-project.org mailing list https://stat.eth

<    2   3   4   5   6   7   8   >