[R] RGDAL OGRwrite question

2012-08-17 Thread Scott Duke-Sylvester
WetlandOpenwater [21] iniBed_m maxH_m BoxID $output_fclasses [1] 0 4 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 4 $dataset_options NULL $layer_options NULL -- Scott M. Duke-Sylvester Assistant Professor Department of Biology Office : 300 E. St. Mary Blvd Billeaud Hall, Room

Re: [R] RGDAL OGRwrite question

2012-08-17 Thread Scott Duke-Sylvester
-1062 On 8/17/12 9:28 AM, Scott Duke-Sylvester scottdukesylves...@gmail.com wrote: I have a quick question: It appears that in rgdal v0.7-12 (R version 2.15.1, OSX 10.6.8) writeOGR will not write a shapefile the the current directory. Is this correct? An earlier version of rgdal must have

Re: [R] percentage from density()

2012-01-30 Thread Duke
: Saturday, January 28, 2012 8:12 PM To: Duke; r-help@r-project.org Subject: Re: [R] percentage from density() If you use logspline estimation (logspline package) instead of kernel density estimation then this is simple as there are cumulative area functions for logspline fits. If you need to do

[R] percentage from density()

2012-01-27 Thread Duke
Hi folks, I know that density function will give a estimated density for a give dataset. Now from that I want to have a percentage estimation for a certain range. For examle: y = density(c(-20,rep(0,98),20)) plot(y, xlim=c(-4,4)) Now if I want to know the percentage of data lying in

[R] Power calculation for survival analysis

2011-09-21 Thread Duke
useR's, I am trying to do a power calculation for a survival analysis using a logrank test and I need some help properly doing this in R. Here is the information that I know: - I have 2 groups, namely HG and LG - Retrospective analysis with subjects gathered from archival data over 20 years. No

Re: [R] Power calculation for survival analysis

2011-09-21 Thread Duke
Thanks for your response, Marc. HG and LG are high-grade/low-grade tumors. The data has not been collected yet, but will be soon. It's all archived data that will be pulled from computer records. The IRB wants some mention of power or sample size, but doing it for this scenario has been a bit

[R] legend with cofor-filled symbol

2011-09-15 Thread Duke
Hi folks, Please let me know what I am doing wrong. I want to have a legend with symbols that are filled with same color as the drawn line, but I failed to do that: plot(1:100, 1:100, pch=21, bg=red) legend(bottomright, test, bty='n', pch=21, bg=red, col=red) It looks to me that the bg

Re: [R] legend with cofor-filled symbol

2011-09-15 Thread Duke
On 9/15/11 4:40 PM, Duke wrote: Hi folks, Please let me know what I am doing wrong. I want to have a legend with symbols that are filled with same color as the drawn line, but I failed to do that: plot(1:100, 1:100, pch=21, bg=red) legend(bottomright, test, bty='n', pch=21, bg=red, col=red

Re: [R] set argument of a function by string variable

2011-02-25 Thread Duke
On 2/24/11 1:21 PM, David Winsemius wrote: On Feb 24, 2011, at 1:03 PM, Duke wrote: Hi folks, I am wondering if the following is possible: I want to control the arguments sent to a function by string variables. For example, instead of heatmap.2( A, col=greenred(75) ) I would want to have

[R] set argument of a function by string variable

2011-02-24 Thread Duke
Hi folks, I am wondering if the following is possible: I want to control the arguments sent to a function by string variables. For example, instead of heatmap.2( A, col=greenred(75) ) I would want to have something like: heatmap.2 ( paste(A, col=greenred(75), sep=,) ) Is this possible to do

[R] heatmap cluster

2011-02-18 Thread Duke
Hi all, I am new to heatmap function in stats package, so any advice will be greatly appreciated. So I have a dataset that I want to draw a heatmap, for example: dput(a) structure(c(-8.256023, -14.764429, -10.145779, -5.123104, -11.974729, -16.329029, -16.329029, -16.329029, -2.764114,

Re: [R] speed up subsetting with certain conditions

2011-01-13 Thread Duke
On 1/12/11 6:44 PM, Duke wrote: Thanks so much for your suggestion Martin. I had Bioconductor installed but I honestly do not know all its applications. Anyway, I am testing GenomicRanges with my data now. I will report back when I get the result. I got the results. My code took ~ 580

Re: [R] data frame subset too slow

2011-01-12 Thread Duke
Sorry for the late response. I was away for vacation and was unable to keep on working on the codes. Anyway, I was unable to provide *str* of that specific data since they are all in a big package with lots of inputs/outputs. Quickly gazing through the code, I narrowed them down (and made a

[R] speed up subsetting with certain conditions

2011-01-12 Thread Duke
Hi folks, I am working on a project that requires subsetting of a found file based on some known file. The known file contains several lines like below: chr132375463237547rs523104280+ chr132375493237550rs520975820+ chr245133264513327

Re: [R] speed up subsetting with certain conditions

2011-01-12 Thread Duke
On 1/12/11 6:12 PM, Martin Morgan wrote: The Bioconductor project has many tools for dealing with sequence-related data. With the data k - read.table(textConnection( chr132375463237547rs523104280+ chr132375493237550rs520975820+ chr245133264513327

[R] data frame subset too slow

2010-12-30 Thread Duke
Hi all, First I dont have much experience with R so be gentle. OK, I am dealing with a dataset (~ tens of thousand lines, each line ~ 10 columns of data). I have to create some subset of this data based on some certain conditions (for example, same first column with another dataset etc...).

Re: [R] data frame subset too slow

2010-12-30 Thread Duke
Hi Jim, Is this really a problem for me to use [1] instead of [[1]]? Will this make it run slower? Also, if I use dat$V1 %in% list$V1, will it be fine? Anyway, my data and list are basically gene lists (tab delimited): $ head test.txt Xkr4chr1-320456236615793206102

Re: [R] data frame subset too slow

2010-12-30 Thread Duke
Actually there are different ways of doing subsetting: [1] [[1]] [,1] $V1 Please let me know which one is the fastest (and most used) one. Thanks. D. On 12/30/10 11:28 AM, Duke wrote: Hi Jim, Is this really a problem for me to use [1] instead of [[1]]? Will this make it run slower? Also

[R] colorful venn diagram

2010-12-07 Thread Duke
Hi all, I am trying to plot a venn diagram using vennDiagram in limma package, but I have no idea how to have it colorful such as the color one created by the following website: http://www.pangloss.com/seidel/Protocols/venn.cgi. Any one has any advice? Thanks, D.

Re: [R] colorful venn diagram

2010-12-07 Thread Duke
Hi Laurent, On 12/7/10 5:01 PM, Laurent Gatto wrote: Dear Duke, I'm not sure if limma can generate colourful Venn diagrams. As an alternative, I can however recommend Vennerable [1]. Thanks. I also found out that there are so many packages drawing venn diagram now. I am playing

Re: [R] function help?

2010-09-17 Thread Duke
On 9/16/10 5:00 PM, Rolf Turner wrote: On 17/09/2010, at 8:51 AM, Duke wrote: Hi Duncan, On 9/16/10 3:47 PM, Duncan Murdoch wrote: On 16/09/2010 3:40 PM, Duke wrote: Hi all, I am writing a function (fun.R), but I dont know how to code the function so that the Help Text will be shown

Re: [R] function help?

2010-09-17 Thread Duke
, R or python. Dukeduke.li...@gmx.com wrote: On 9/16/10 5:00 PM, Rolf Turner wrote: On 17/09/2010, at 8:51 AM, Duke wrote: Hi Duncan, On 9/16/10 3:47 PM, Duncan Murdoch wrote: On 16/09/2010 3:40 PM, Duke wrote: Hi all, I am writing a function (fun.R), but I dont know how to code

[R] function help?

2010-09-16 Thread Duke
Hi all, I am writing a function (fun.R), but I dont know how to code the function so that the Help Text will be shown up when one types ?fun (of course, after he loads it up). Anyone has any advice for me how to do that? Thanks, D. __

Re: [R] function help?

2010-09-16 Thread Duke
Hi Duncan, On 9/16/10 3:47 PM, Duncan Murdoch wrote: On 16/09/2010 3:40 PM, Duke wrote: Hi all, I am writing a function (fun.R), but I dont know how to code the function so that the Help Text will be shown up when one types ?fun (of course, after he loads it up). Anyone has any advice

[R] filter a tab delimited text file

2010-09-10 Thread Duke
Hi all, I have to filter a tab-delimited text file like below: GeneNamesvalue1value2log2(Fold_change) log2(Fold_change) normalizedSignature(abs(log2(Fold_change) normalized) 4) ENSG0209350435-3.81131293562629-4.14357714689656TRUE ENSG0177133

Re: [R] filter a tab delimited text file

2010-09-10 Thread Duke
Hi Phil, On 9/10/10 1:45 PM, Phil Spector wrote: Duke - One possibility is to check the help files for the functions involved to see if there are options to control this behaviour. For example, the check.names= argument to read.table, or the quote= argument to write.table. How about Yes

Re: [R] filter a tab delimited text file

2010-09-10 Thread Duke
On 9/10/10 2:49 PM, Gabor Grothendieck wrote: On Fri, Sep 10, 2010 at 1:24 PM, Dukeduke.li...@gmx.com wrote: Hi all, I have to filter a tab-delimited text file like below: GeneNamesvalue1value2log2(Fold_change) log2(Fold_change) normalizedSignature(abs(log2(Fold_change)

Re: [R] filter a tab delimited text file

2010-09-10 Thread Duke
On 9/10/10 4:24 PM, Gabor Grothendieck wrote: On Fri, Sep 10, 2010 at 4:20 PM, Dukeduke.li...@gmx.com wrote: On 9/10/10 2:49 PM, Gabor Grothendieck wrote: On Fri, Sep 10, 2010 at 1:24 PM, Dukeduke.li...@gmx.comwrote: Hi all, I have to filter a tab-delimited text file like below:

Re: [R] How to run R on Emacs+ESS

2010-09-07 Thread Duke
On 9/6/10 12:18 PM, Stephen Liu wrote: Hi folks, Debian 504 64-bit I found following document; http://www.biostat.wisc.edu/~kbroman/Rintro/ Whether it is the right document for installing Emacs+ESS and R so that R can run on Emacs? A lot on the web. Google gave me for example:

Re: [R] ShortRead with BWA

2010-04-28 Thread Duke
On 4/27/10 6:29 PM, mtmor...@fhcrc.org wrote: Welcome to R! But actually, I should be saying 'welcome to Bioconductor!' and you should be on the Bioconductor (or Bioc-sig-seq) mailing list http://bioconductor.org/docs/mailList.html because ShortRead is a Bioconductor package. BWA

Re: [R] R with command line

2010-04-28 Thread Duke
On 4/27/10 8:04 PM, Duncan Murdoch wrote: On 27/04/2010 6:15 PM, Duke wrote: Hi all, I am testing R by trying R on command line (ie without opening R console) on a Mac Pro with 10.6. So I created a file plot.R: x11(width=5,height=3.5) plot(1:10,1:10) So I have two questions below (please

Re: [R] R with command line

2010-04-28 Thread Duke
On 4/28/10 9:53 AM, Duncan Murdoch wrote: On 28/04/2010 9:38 AM, Duke wrote: On 4/27/10 8:04 PM, Duncan Murdoch wrote: On 27/04/2010 6:15 PM, Duke wrote: Hi all, I am testing R by trying R on command line (ie without opening R console) on a Mac Pro with 10.6. So I created a file plot.R

Re: [R] R with command line

2010-04-28 Thread Duke
On 4/28/10 10:16 AM, peter dalgaard wrote: On Apr 28, 2010, at 4:03 PM, Duke wrote: I just did it, and it said it ignored the arg: $ R R_PROFILE_USER=try.R ARGUMENT 'R_PROFILE_USER=try.R' __ignored__ ... What am I doing wrong? Using Windows syntax on a Unix

[R] ShortRead with BWA

2010-04-27 Thread Duke
Dear folks, Please welcome a newbie both to R and the mailing list :). I am currently working on a sequencing project, and heard about R as well as some of its packages for next gen sequencing, and decided to give it a try. Starting with ShortRead, I found a document

[R] R with command line

2010-04-27 Thread Duke
Hi all, I am testing R by trying R on command line (ie without opening R console) on a Mac Pro with 10.6. So I created a file plot.R: x11(width=5,height=3.5) plot(1:10,1:10) So I have two questions below (please forgive me if the questions have been asked already) 1. What is the different

[R] Using GIS data in R

2010-04-01 Thread Scott Duke-Sylvester
or outside the polygons defined in the shapefile. Many thanks, scott. -- Scott M. Duke-Sylvester Assistant Professor Department of Biology Office : 300 E. St. Mary Blvd Billeaud Hall, Room 141 Lafayette, LA 70504 Mailing address : UL Lafayette Department