search for: genea

Displaying 9 results from an estimated 9 matches for "genea".

Did you mean: genet
2011 Sep 21
1
Problem indexing a factor variable
...uot; with 115 rows of samples and 27000 columns of gene expression measurements with each column corresponding to one gene. I now have a smaller vector of genes "tp" for which I need to pull out the data form the data frame. # first gene from the list with 16 genes x <- tp[1,] x [1] geneA 16 Levels: geneA, geneB... #unsuccessful gexp_1$x NULL #or gexp_1$x[1] NULL #but this works gexp_1$geneA I am sure that this is a fundamental error on my part since I am new to R, I would appreciate any advice. I am trying to construct a for loop to analyze data for sets of genes at a time but...
2008 Feb 06
1
Histogram/Bar plot graph
Hi, I have the following data: > Myvalues Gene ES MEF Embryo ESHyp 1 GeneA -0.38509507 0.00 1.6250 1.7039921 2 GeneB 0.06262914 0.00 1.6250 -0.272033 and so on... I want to plot the expression values of GeneA and GeneB in the different cell/embryo/conditions (columns 2:5 above). Now, if I do: >library(ggplot2) > qplot(x=Gene, Embryo, geom = "bar&quo...
2011 Mar 23
1
how to add in interaction terms in gamm
I want to use gamm to generate smoothed trend line for three groups identified by dummy variable genea and geneb. My question is how to add in an interaction term between the time and another dummy variable such as gender? fitm<-gamm(change_gfr~ genea+geneb+s(timea_n,bs="ps")+s(timeb_n,bs="ps")+s(timec_n,bs="ps"),data=mm,random=list(time_n=~1|PID)) -- View this me...
2018 May 25
2
how to make the code more efficient using lapply
...list to store the extracted result from each excel file inside for-loop for (i in list.files()) { # loop through each excel file in the directory temp<-read_xlsx(i,sheet=1,range=cell_cols(c(1,30,38:42))) # from package "readxl" to read in excel file temp<-temp[grep("^geneA$|^geneB$|^geneC$",temp$Id),] # extract rows based on temp$id names(temp)<-gsub("^.*] ","",names(temp)) # clean up column names temp.df<-append(temp.df, list(as.data.frame(temp))) # change the dataframe to list, so it can be append to list. if (i == list.fil...
2018 May 25
0
how to make the code more efficient using lapply
...n the loop finishes. As it is you are calling list.files() each time through the loop which could be slow. In any case here's a possible way to do it. Warning: untested! f <- function(fn) { temp<-read_xlsx(fn,sheet=1,range=cell_cols(c(1,30,38:42))) temp<-temp[temp$Id %in% c("geneA","geneB","geneC"),] } myL <- lapply( X=list.files(), FUN=f ) temp.df.all<-do.call("rbind",myL) names(temp.df.all)<-gsub("^.*] ","",names(temp.df.all)) write_xlsx(temp.df.all, path="output.xlsx") HTH, Eric On Fri, May 25,...
2018 May 25
1
how to make the code more efficient using lapply
...e the results in a vector, and use the vector inside the loop. Here's another way (also untested). infiles <- list.files() nfiles <- length(infiles) ## read the first file dfall <- read_xlsx(infiles[1], sheet=1, range=cell_cols(c(1,30,38:42))) dfall <- dfall[dfall$Id %in% c("geneA","geneB","geneC") , ] ## I'm going to assume the colnames are all the same on input ## if that's wrong, then they have to be fixed inside the loop ## read the remaining files, appending their contents each time for (ifl in 2:nfiles) { temp <- read_xlsx(infile...
2008 Aug 07
1
Mtext doesn't display characters in italic when I use a greek symbol
Following on from my previous mail! plot(1:10,1:10) mtext("title", side=3, adj=0, font=3, cex=1.5) This works as expected and puts the font in italics. tag <- "A)" suffix <- "genea::" plot(1:10,1:10) mtext(bquote(.(tag) ~ Delta * .(suffix)), side=3, adj=0, font=3, cex=1.5) Here, the font isn't in italics, it's normal. I presume this is some interplay with bquote(), or perhaps R doesn't know the italics version of the capital greek delta character? Any idea...
2007 Jul 26
4
Finding matches in 2 files
I have 2 files containing data analysed by 2 different methods. I would like to find out which genes appear in both analyses. Can someone show me how to do this? _________________________________________________________________ [[trailing spam removed]] [[alternative HTML version deleted]]
2001 Mar 13
1
Display grouping parameter in coplot
I try to display the grouping variable in coplot. It work, but it's special solution and rather ugly. Any better idea? # Simulate my data frame data(state) x77<-data.frame(state.x77) x77$region<-state.region coplot(Life.Exp ~ Income | region, data=x77, show.given=F, subscripts=T, panel = function(x, y,subscripts, ...) { panel.smooth(x, y, span = 1., ...)