similar to: Following progress in a lapply() function

Displaying 20 results from an estimated 2000 matches similar to: "Following progress in a lapply() function"

2008 Nov 19
2
Transforming a list to a vector with associated levels
I am pretty sure that I came across a function that creates a vector of levels from a list but I just can't remember. Basically, I have something like > t <- list(A=c(4,1,4),B=c(3,7,9,2)) > t $A [1] 4 1 4 $B [1] 3 7 9 2 And I would like to get something like the following: t levels 4 1 1 1 4 1 3 2 7 2 9 2 2 2 I tried unlist without success. I also do remember that there is a
2008 Nov 30
2
Snow and multi-processing
Dear R gurus, I have a very embarrassingly parallelizable job that I am trying to speed up with snow on our local cluster. Basically, I am doing ~50,000 t.test for a series of micro-array experiments, one gene at a time. Thus, I can easily spread the load across multiple processors and nodes. So, I have a master list object that tells me what rows to pick up for each genes to do the t.test from
2008 Nov 24
2
64bit R for Mac
Dear R gurus, On the CRAN website, it says that a 64bit version for Mac OS Tiger would be release shortly. Do we know what are the expected dates? Will the packages be also compiled for 64bit? We are running large microarray analysis and we keep hitting the 3Gb memory limit. I saw that there is a version available on the development mirrors, but I am not too excited to replace our very stable
2008 Nov 21
1
Suppression anova message
Dear all, I am running anova(lm()) on a series of different data frame and I am getting the following message Using dataFrame$levels as id variables 1. Why am I getting that message 2. How do I suppress it (or correct it). Thanks Marco -- Marco Blanchette, Ph.D. Assistant Investigator Stowers Institute for Medical Research 1000 East 50th St. Kansas City, MO 64110 Tel: 816-926-4071
2008 Dec 02
2
command files
Since I'm a SAS programmer, I'm used to creating command files in an editor for submission later. Is there a way to do this in R? I'd need to retain an ouput listing and a log to check for errors. _________________________________________________________________ Send e-mail faster without improving your typing skills. d_122008 [[alternative HTML version deleted]]
2009 Apr 14
1
mean fold change issues and p values
I am new to R and have two scripts written slightly different but should to relatively the same thing but my lack of experience with the program I can not figure out the what I need to do to correct it. The first script gives me a consistent mean fold change values with every run but can generate negative p values for some. For the second version of the script, the fold changes seem to be very
2009 Sep 23
1
dotchart to barplots
Hi, I am trying to plot the following data so that it can be visually represented well. I tried the dotchart but I felt it was too spread out. Then I tried the barplot which is good enough for me. Is there a way to give the labels for the y-axis as in the dot chart? Also, I feel the grey level is confusing, so is there options for designs within the bars? I cannot use color as the journal wants
2013 Jan 04
1
Garbage collection problem
Hello all, I am running into a problem with garbage collection not being able to free up all memory. Unfortunately I am unable to provide a minimal self-contained example, although I can provide a self contained example if anyone feels like wading through some 600 lines of code. I would love to isolate the relevant parts from the code but whenever I try to run a simpler example, the problem does
2003 Jun 04
3
Slow ttests in R-devel
Hello ... I've noticed that some of our Bioconductor code was running drastically slower under current R-devel vs. current R-patched - one example is below using a ttest. I have the following snippet of code that demonstrates the problem while avoiding "real" code that takes an extremely long time to finish on R-devel: library(genefilter) data(eset) eset$cov1 z <-
2012 Dec 12
4
Matrix multiplication
Hi, I have a transition matrix T for which I want to find the steady state matrix for. This could be approximated by taking T^n , for large n. T= [ 0.8797 0.0382 0.0527 0.0008 0.0212 0.8002 0.0041 0.0143 0.0981 0.0273 0.8802 0.0527 0.0010 0.1343 0.0630 0.9322] According to a text book I have T^200 should have reached the steady state L L
2004 Feb 10
4
The ttest.c example in R under MS Windows
We are trying to compile and run the ttest.c example that comes with R (in C:\Program Files\R\rw1081\src\library\windlgs\src\ttest.c). After compiling it with MS Visual C++ we load the DLL with dyn.load. So far it seems good, but when we try to call it from R (after running C:\Program Files\R\rw1081\src\library\windlgs\R\windlgs.R) R crashes. We have tried changing the exports from DLL but have
2009 Aug 28
1
extracting pvalues from ttest
Hello list, I have a similar issue as this post http://tolstoy.newcastle.edu.au/R/e6/help/09/04/11438.html#options2 and I used the suggestion provided by Jorge with modifications to my data do.call(c,lapply(your_list_with_the_t_tests,function(x) x$p.value)) but I am getting the following error after excuting the code B<-by(eo,eo$PlateID, function(.sub) t.test(mcp1~Self_T1D,data=.sub,
2007 Aug 14
4
Problem with "by": does not work with ttest (but with lme)
Hello, I would like to do a large number of e.g. 1000 paired ttest using the by-function. But instead of using only the data within the 1000 groups, R caclulates 1000 times the ttest for the full data set(The same happens with Wilcoxon test). However, the by-function works fine with the lme function. Did I just miss something or is it really not working? If not, is there any other possibility to
2012 Mar 01
2
'break' function in loop
Dear R helpers, I have some difficulties in using ''break'' function with loop, and the followings are my script. What I try to do is (1) permute ''or'' first; (2) doing t-test if this ''or'' pass criteria 1 (k=1); (3) end the loop when I get 10 permutations; (4) redo everything again but this time use criteria 2 (k=2) (I have more criteria 1:n).
2005 Apr 04
1
RDCOMServer for R 2.0.1 + Windows ?
Has anyone managed to get this working? Here's what I did: I got the binary build for R2.0.1 from the Omegahat download page, and made a small change to the registerClassID function ( to make it use the right path to RDCOMServer.dll). Then I tried to replicate the simple TTest example from the same web site. The COM class definition and registration worked fine for me. To test this, I
2008 Mar 06
1
can't merge zoo ojects and convert to ts (been trying for 2 days)
I'm stuck, but am sure it can be done I just don't understand how. I have data in an irregular timeseries. I want to be able to use stl to visualise the data (see seasonal parts etc), so I need to change to regular series of class ts (I think). I am using 2 zoo objects one is regular and the other is my irregular data. I am then merging to create the object I want but when I try to change
2002 Aug 12
1
Select exactly n elements of a vector
In discussing permutation tests, _Modern Applied Statistics With S Plus_ suggests this (IMHO) rather elegant approach to generating a distribution of t-tests: d<- ...some data... ttest <- function(x) mean(x)/sqrt(var(x)/length(x)) n<-1000 res<-numeric(n) for(i in 1:n) res[i] <- ttest(x<-d*sign(runif(10)-0.5) The problem is that the sign(runif) results in random permutation of
2008 Nov 21
1
Dataframe with single level column
Dear all, I have a dataframe with multiple observations and the levels as the last column, as in: d <- data.frame(A=sample(1:100,12),B=sample(1:100,12),levels=c(rep('A',4),rep('B',4),rep('C',4))) > d A B levels 1 77 40 A 2 14 18 A 3 56 7 A 4 46 27 A 5 63 35 B 6 80 21 B 7 3 54 B 8 93 76 B 9 5 46 C 10 16 53
2009 Mar 07
2
ttest in R
Dear list, i am a biologist who needs to do some ttest between disease and non disease, sex, genotype and the serum levels of proteins on a large number of individuals. i have been using excel for a long time but it is very tedious and time consuming. i am posting the data below and ask your help in generating a code to get this analysis done in R. thanks gender disease genotype data M N CC
2008 Nov 20
0
More list to vector puzzle
Many thanks for the answers on my previous question, it got me started. Indeed, stack() was the function I was vaguely remembering. However, I didn?t get very far because my data set is way more complicated then I expected. In fact I have a mixture of levels and lists within a list. Basically, it resemble the following list (named data) made of the levels H and the list of lists A and T. for each