Re: [R] strsplit help

2012-04-12 Thread alison waller
1, 1, 1, 0, 0, 1, 1, 4, 0, 1, 0, 1, 5, 0, 0, 0, 5, 2, 1, 0, 0, 1, 0, 0, 0, 4, 0, 2, 1, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 1, 2, 0, 0, 0, 1, 0, 1, 0, 0, 2, 0, 0, 1, 1, 0, 3, 1, 1, 2, 2, 1, 1, 1, 1, 0, 2, 1, 1, 0, 0, 0, 1, 0, 0, 0, 3, 2, 0, 1, 1, 0, 0, 0, 0, 2, 1, 1, 0, 0, 0, 0, 0, 3, 1,

[R] strsplit help

2012-04-11 Thread alison waller
Dear all, I want to use string split to parse column names, however, I am having some errors that I don't understand. I see a problem when I try to rbind the output from strsplit. please let me know if I'm missing something obvious, thanks, alison here are my commands: >strsplit<-strsplit(as

[R] can't install plotrix

2011-08-15 Thread Alison Waller
Hi all, I'm having problems installing plotrix. I tried installing it through install.packages, and from the unix command line, but each time it seems to stall when it is installing the help indices. has anyone had this same problem, is this package still maintained ? any help? thanks > inst

Re: [R] Summarizing For Values with Multiple categories

2010-10-23 Thread Alison Waller
Yes, I guess I should update. > R.version.string [1] "R version 2.9.0 (2009-04-17)" On 24-Oct-10, at 1:12 AM, Gabor Grothendieck wrote: R.version.string __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Summarizing For Values with Multiple categories

2010-10-23 Thread Alison Waller
Thanks! I tried reading the help for aggregate and can't figure out which form of the formula I am using, and therefore the syntax. I'm getting the below error. > aggregate(counts ~ ind, merge(stack(CAT2COG), df, by = 1), sum) Error in as.data.frame.default(x) : cannot coerce class "formul

[R] Summarizing For Values with Multiple categories

2010-10-23 Thread Alison Waller
Hi all, I have some data as follows. Cat1 Cat2 Cat3 COG Counts ABC COG1 10 BD COG2 20 C COG3 30 D COG4 40 I would like to sum all the counts for each category: A B C D 10 30 40 60 >CAT2COG<- lis

Re: [R] Help reading table rows into lists

2010-10-10 Thread Alison Waller
Thanks Gabor and Jeffrey, and thanks for explaining the differences. I think I'll go with Jeffery's as I think I want entries for COGs with no pathway. Alison On 10-Oct-10, at 8:59 PM, Jeffrey Spies wrote: sapply(dat, function(x){ tmp<-unlist(strsplit(x, '\t', fixed=T)) out <- list(t

[R] Help reading table rows into lists

2010-10-10 Thread Alison Waller
Hi all, I have a large table mapping thousands of COGs(groups of genes) to pathways. # Ex COG0001 patha pathb pathc COG0002 pathd pathe COG0003 pathe pathf pathg pathh ## I would like to combine this information into a big list such as below COG2PATHWAY<- list (COG0001 = c ("

[R] colour of label points on a boxplot

2010-08-05 Thread alison waller
Hi all, I have 6 datasets(dataframes Assem_ContigsLen7 through all_ContigsLen12) containing 3 columns (contig_id, contig_length, read_count). Each dataset is composed of 3 types of contigs (assemblies of genomic fragments), 1- all Bacterial fragments, 2 - all Viral fragments, 3 - mixed fragments.

Re: [R] using sprintf to pass a variable to a RMySQL query

2010-03-11 Thread alison waller
dLen(36+%d)$length)",k) sprintf("hist(MG_ScaffoldLen(54+%d)$length)",k) dev.off() jpeg(file=sprintf("Contig_histograms%dSanger_Virus.jpeg",k)) par(mfrow=c(1,3)) sprintf("hist(MG_ContigsLen(1+%d)$length)",k) sprintf("hist(MG_ContigsLen(18+%d)$

Re: [R] using sprintf to pass a variable to a RMySQL query

2010-03-10 Thread alison waller
ting HTML index of packages in '.Library' Warning message: In install.packages("gsubfn", lib = "/g/bork3/x86_64/lib64/R/library") : installation of package 'gsubfn' had non-zero exit status ## this is the error when I tried to install tcltk# install

Re: [R] using sprintf to pass a variable to a RMySQL query

2010-03-09 Thread alison waller
the nesting of the single and double quotes > correct - the SQL requires single quotes, so use double quotes for the > fixed character strings insidte paste(). That, and use sep='' to get > rid of unwanted space characters. > > Using paste is also effective for constructs like

[R] using sprintf to pass a variable to a RMySQL query

2010-03-08 Thread alison waller
Hello, I am using RmySQL and would like to iterate through a few queries. I would like to use sprintf but I think I'm having problems mixing and matching the sprintf syntax and the SQL regex. I have checked my sqlcmd and it works when I wan to match %MG1% but how do I iterate for i 1-72? Escape

Re: [R] finding most highly transcribed genes - ranking, sorting and subsets?

2007-12-07 Thread alison waller
Thanks - great, should have thought of option b) -Original Message- From: Martin Morgan [mailto:[EMAIL PROTECTED] Sent: Friday, December 07, 2007 12:52 PM To: alison waller Cc: [EMAIL PROTECTED] Subject: Re: [R] finding most highly transcribed genes - ranking, sorting and subsets? Hi

Re: [R] finding most highly transcribed genes - ranking, sorting and subsets?

2007-12-07 Thread alison waller
ds to a specific gene. Thanks again for any suggestions, Alison -Original Message- From: Martin Morgan [mailto:[EMAIL PROTECTED] Sent: Thursday, December 06, 2007 4:06 PM To: alison waller Subject: Re: [R] finding most highly transcribed genes - ranking, sorting and subsets? Hi Alison

[R] finding most highly transcribed genes - ranking, sorting and subsets?

2007-12-06 Thread alison waller
Hello, I am not only interested in finding out which genes are the most highly up- or down-regulated (which I have done using the linear models and Bayesian statistics in Limma), but I also want to know which genes are consistently highly transcribed (ie. they have a high intensity in the chann