[R] Forestplot question

2012-05-02 Thread Ben Ganzfried
Hi, I'm trying to build a Forest Plot using the second and fourth columns in the table (test.csv) below. My code is the following: curated <- data.frame("test.csv") tmp <- curated$coef tmp1 <- curated$se_coef plt <- metaplot(tmp, tmp1, xlim = c(-.45, .45)) I keep getting the following error at th

[R] Error in read.table(file = file, header = header, sep = sep, quote = quote, : more columns than column names

2012-02-28 Thread Ben Ganzfried
Hey, I just googled my error and many things came up. I followed the leads and read the ?read.delim page; I tried changing header = TRUE, and row.names = TRUE-- but I've still been having trouble fixing it, so I would greatly appreciate any help you can provide. Here is my code: rm(list=ls()) s

Re: [R] R Package "example" section of .Rd file question (think it's a non-ASCII issue, but not sure...)

2012-02-15 Thread Ben Ganzfried
ihui.name >> Department of Statistics, Iowa State University >> 2215 Snedecor Hall, Ames, IA >> >> >> >> On Wed, Feb 15, 2012 at 4:09 PM, Ben Ganzfried >> wrote: >> >>> Hi Martin, >>> >>> Thanks! You were right. Quotes see

Re: [R] R Package "example" section of .Rd file question (think it's a non-ASCII issue, but not sure...)

2012-02-15 Thread Ben Ganzfried
on would be really greatly appreciated! Thanks! Ben On Wed, Feb 15, 2012 at 4:20 PM, Martin Morgan wrote: > On 02/15/2012 12:18 PM, Ben Ganzfried wrote: > >> Hey, >> >> I keep getting the following warning: >> >> data(GSE19829-GPL570_eset) >>> >

[R] R Package "example" section of .Rd file question (think it's a non-ASCII issue, but not sure...)

2012-02-15 Thread Ben Ganzfried
Hey, I keep getting the following warning: > data(GSE19829-GPL570_eset) Warning in data(GSE19829 - GPL570_eset) : data set ‘GSE19829 - GPL570_eset’ not found > ## maybe str(GSE19829-GPL570_eset) ; plot(GSE19829-GPL570_eset) ... > > if(require(affy)){ + summary(GSE19829-GPL570_eset$vital_statu

Re: [R] Error in Rd[[which]] : subscript out of bounds

2012-02-08 Thread Ben Ganzfried
atinum resistance: refractory=death in 6mo or less, sensitive=survival for 12mo or more. For "debulking": amount of residual disease (optimal = <1mm, suboptimal=>1mm). } 2012/2/8 Uwe Ligges > > > On 08.02.2012 18:44, Ben Ganzfried wrote: > >> Hi-- &g

[R] Error in Rd[[which]] : subscript out of bounds

2012-02-08 Thread Ben Ganzfried
Hi-- I googled the above error and found previous postings about this error on the list. I was having a little difficulty implementing the advice though. The suggestions were to use: traceback() and checkRd(). I'm using R in the directory in which the .Rd file with the problem is located, but I

[R] Adding Institution-Affiliation to Description File of R Package

2012-01-10 Thread Ben Ganzfried
Hi, I'm just finishing up an R package and I was wondering if anyone knows how to include institution name in the "Description File." That is, my current Description File looks like: Package: curatedCancerData Type: Package Title: Cancer Gene Expression Analysis Version: 1.0 Date: 2011-12-24 Aut

Re: [R] package.skeleton()

2011-12-18 Thread Ben Ganzfried
7:12 PM, Duncan Murdoch wrote: > On 11-12-16 4:12 PM, Ben Ganzfried wrote: > >> Hi-- >> >> I'm creating an R package, I've read through "Writing R Extensions" and >> the >> package.skeleton() R page-- and I'm still running into

Re: [R] package.skeleton()

2011-12-16 Thread Ben Ganzfried
*the line in question is*: > package.skeleton(name = "a", code_files = "EsetObject.r") On Fri, Dec 16, 2011 at 4:12 PM, Ben Ganzfried < benganzfr...@post.harvard.edu> wrote: > Hi-- > > I'm creating an R package, I've read through "Writing R

[R] package.skeleton()

2011-12-16 Thread Ben Ganzfried
Hi-- I'm creating an R package, I've read through "Writing R Extensions" and the package.skeleton() R page-- and I'm still running into a little confusion. I would greatly appreciate any advice you can provide. Where do I run my following line of code from?: > package.skeleton(name = "a", code_fi

Re: [R] quick matching question

2011-10-28 Thread Ben Ganzfried
Thanks! On Fri, Oct 28, 2011 at 10:59 AM, Marc Schwartz wrote: > On Oct 28, 2011, at 9:49 AM, Ben Ganzfried wrote: > > > Hey, > > > > I'm trying to match patient identifiers from two separate input files, > and > > then add information from one of the inp

[R] quick matching question

2011-10-28 Thread Ben Ganzfried
Hey, I'm trying to match patient identifiers from two separate input files, and then add information from one of the input files to the corresponding output file. I'd greatly appreciate any help! More specifically, Input_File_1 has a column header "bcr_patient_barcode" Input_File_2 has a column

[R] Creating One Single Object Linking Multiple Datapoints

2011-10-07 Thread Ben Ganzfried
se ask on the > Bioconductor mailing list. Good news, you don't have to subscribe to post > > http://bioconductor.org/help/**mailing-list/<http://bioconductor.org/help/mailing-list/> > > Martin > > > On 10/07/2011 07:27 AM, Ben Ganzfried wrote: > >> Hey, >>

[R] Creating One Single Object with Phenotype and Expression Data

2011-10-07 Thread Ben Ganzfried
Hey, I have code that can check the quality of a data set we're working with (expression data), and I'm having some trouble writing code that would make the expression data we have tie to other data we want to link it to (called phenotype data). Does anyone have any advice on how I could make a s

Re: [R] Problematic If-Else statement

2011-09-16 Thread Ben Ganzfried
wrote: > > >> On Sep 16, 2011, at 10:36 AM, Ben Ganzfried wrote: >> >> Hi guys, >>> >>> snipped > > >>> Second, I changed the first line of my code to: >>> tmp <- >>> ifelse(uncurated$days_to_**tumor_recurrence==NA,&qu

Re: [R] Problematic If-Else statement

2011-09-16 Thread Ben Ganzfried
If that's the case, you need to write is.null(), > something like is.NA()... > > Michael Weylandt > > On Fri, Sep 16, 2011 at 10:36 AM, Ben Ganzfried > wrote: > >> Hi guys, >> >> My code (next 2 lines below) isn't doing what I'm expectin

[R] Problematic If-Else statement

2011-09-16 Thread Ben Ganzfried
Hi guys, My code (next 2 lines below) isn't doing what I'm expecting it to: tmp <- ifelse(uncurated$days_to_tumor_recurrence=="null","norecurrence","recurrence") curated$recurrence_status <- tmp I want the column "recurrence_status" in my output file to have values "recurrence" (if the input val

Re: [R] Quick R syntax question

2011-06-20 Thread Ben Ganzfried
t; > > a <- "b" > > z <- data.frame(a=1:3, b=4:6) > > z[ ,"a"] # the "a" column of z > > z[ ,a] # the column of z with the value of the object a > > > > HTH, > > > > -- Bert > > > > > > On Mon, Ju

Re: [R] Quick R syntax question

2011-06-20 Thread Ben Ganzfried
not think the as.character is needed. Coercion to character is > implicit in the use of paste(). And the sep argument could be "+". > > output = paste(df [,'Major.Gleason'], df[ ,'Minor.Gleason'], sep='+') > > -- > David. > > > >

[R] Quick R syntax question

2011-06-20 Thread Ben Ganzfried
Hi -- I had a pretty quick R question since unfortunately I have not been able to find an answer on Google. It shouldn't take much more than a minute to answer. I'm trying to add up the major gleason grade and minor gleason grade for an analysis of patients with prostate cancer. One column has

[R] Solutions to exercises in "Introductory Statistics with R" OR Intro. to R Book Suggestions with Solutions Available

2011-06-20 Thread Ben Ganzfried
Hi-- I'm trying to teach myself R using Peter Dalgaard's "Introductory Statistics with R." Does anyone know if there are solutions available for the exercises? I'm really just hoping to learn by going through exercises and checking myself, so alternatively, does anyone know of an introductory te

[R] log2() and -min() very quick question

2011-06-13 Thread Ben Ganzfried
I'm looking over good-code a post-doc in my lab wrote and trying to learn how it works. I came across the following: rel.abundance <- as.matrix(read.delim("rel.abundance.csv",row.names=1,as.is =TRUE)) rel.abundance <- log2(rel.abundance-min(rel.abundance)+1) I'm not sure what the second line is d

Re: [R] Creating a file with reusable functions accessible throughout a computational biology cancer project

2011-06-07 Thread Ben Ganzfried
nto the more important and interesting parts of the study. I really appreciate all your suggestions and help. Sincerely, Ben On Tue, Jun 7, 2011 at 12:53 PM, Duncan Murdoch wrote: > On 07/06/2011 12:41 PM, Ben Ganzfried wrote: > >> Hi, >> >> My project is set up the follo

[R] Creating a file with reusable functions accessible throughout a computational biology cancer project

2011-06-07 Thread Ben Ganzfried
Hi, My project is set up the following way: root directory contains the following folders: folders: "Breast_Cancer" AND "Colorectal_Cancer" AND "Lung_Cancer" AND "Prostate_Cancer" I want to create a file, call it: "repeating_functions.R" and place it in the root directory such that I can call t

Re: [R] Regex Question: return digits after particular letters

2011-06-02 Thread Ben Ganzfried
ubtedly face similar but different situations many times in the future and I want to make sure that I know how to solve them. Thanks again--I really appreciate your kindness. Ben Ganzfried On Thu, Jun 2, 2011 at 3:33 PM, David Winsemius wrote: > > On Jun 2, 2011, at 2:54 PM, Ben Ganzfried wrot

[R] Matrix Question

2011-06-02 Thread Ben Ganzfried
element to the right of "N". I've read the regular expression tutorial for R, but could only figure out how to grab an integer value if it is the only integer value in the row (ie more than one integer value makes this basic regular expression unsuccessful). Thank you very much for