[R] Memory leak shen using foreach()

2011-01-13 Thread Vassilis
iteration of the loop is finished. The pagefile usage drops to normal when the stopCluster() command is executed. Does anyone have an idea where this leak's coming from, and a remedy? Thanks in advance! Vassilis -- View this message in context: http://r.789695.n4.nabble.com/Memory-leak-shen-using

Re: [R] weighed mean of a data frame row-by-row

2011-01-07 Thread Vassilis
Thanks for the help guys! For my purpose I think that rharlow2's answer, i.e. the `rowSums' function is the most appropriate since it also takes care of the NAs. Best, Vassilis -- View this message in context: http://r.789695.n4.nabble.com/weighed-mean-of-a-data-frame-row-by-row

[R] weighed mean of a data frame row-by-row

2011-01-06 Thread Vassilis
of this snippet - My actual dataset is large and it involves calculating the weighted mean of many columns. Such a loop becomes ugly to write and quite slow Thanks in advance, Vassilis -- View this message in context: http://r.789695.n4.nabble.com/weighed-mean-of-a-data-frame-row-by-row

[R] Can the by() function return a single column?

2010-12-15 Thread Vassilis
command, return me a vector of length 10 whose values x' correspond to x'_1 = x_1 - mean(x | factor1), x'_2 = x_2 - mean(x | factor2),... Thanks in advance for the help, and apologies for the poor notation. Vassilis -- View this message in context: http://r.789695.n4.nabble.com/Can

Re: [R] Can the by() function return a single column?

2010-12-15 Thread Vassilis
Hi Gerrit, This does exactly what I want, thank you very much! Even more, I notice that ave() uses the split/unsplit functions under the hood, which are very useful tools as they allow to apply even more complicated functions on a factor-by-factor basis. best, Vassilis -- View

Re: [R] Reading data

2009-10-28 Thread Vassilis Golfinopoulos
Hi Val, Windows does not display extensions by default. Check the 'Type' column; it should read 'R file'. Keep in mind what you are dealing with; Rossi.R is a script, so you cannot open it with read.table. You have to use source() for that. Moreover, use the extension, as well (Rossi.R, not

Re: [R] Reading data

2009-10-28 Thread Vassilis Golfinopoulos
Val, please take it slow, you are missing basic stuff here. (1) Windows Explorer may hide extensions; the 'Type' column should read 'R file' anyway. (2) Script files are included in your workspace with the comand source(). Please type ?source for details. (3) You should call files with their

Re: [R] R crashes when packages 'impute' and 'GeneMeta' are used together.

2009-09-22 Thread Vassilis Golfinopoulos
you all and I apologize for the inappropriate use of your time. - Original Message - From: Duncan Murdoch murd...@stats.uwo.ca To: Vassilis Golfinopoulos vassilis.golfinopou...@gmail.com Cc: r-help@r-project.org Sent: Monday, September 21, 2009 5:13 PM Subject: Re: [R] R crashes when

[R] How to handle missing values for the GeneMeta package?

2009-09-21 Thread Vassilis Golfinopoulos
' packages are used together. I have asked a separate question for that. Thanks Vassilis __ 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

[R] R crashes when packages 'impute' and 'GeneMeta' are used together.

2009-09-21 Thread Vassilis Golfinopoulos
Well, the title says all for this one. It seems to crash the R-console, so it happens whether I use the R-gui or R-console directly or Emacs with ESS. I have R 2.9.0 on Windows Vista. Thanks, Vassilis __ R-help@r-project.org mailing list https

Re: [R] Handling missing data

2009-09-21 Thread Vassilis Golfinopoulos
Consider this sample dataset (displayed [1:3, 1:3]): T1053B T1102A T1129A AKT1 -0.02412174 0.1986057 NA AURKA -0.37109748 -0.4418542 0.04967051 BRAF -0.14589269 -0.1590310 -0.35483226 is.na(dataset[1, 3]) TRUE library(impute) library(GeneMeta) imputed.dataset -

Re: [R] Handling missing data

2009-09-21 Thread Vassilis Golfinopoulos
No, this is part of my dataset. Anyway, this is unlikely to cause the problem. If there are few data, impute.knn actually uses mean imputation (and returns a warning). - Original Message - From: Martin Morgan mtmor...@fhcrc.org To: Vassilis Golfinopoulos vassilis.golfinopou