Re: [R] Plot two matrices and keeping the record of row names

2011-10-31 Thread Bansal, Vikas
. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London From: Peter Alspach [peter.alsp...@plantandfood.co.nz] Sent: 31 October 2011 22:08 To: Bansal, Vikas; r-help@r-project.org Subject: RE: Plot two matrices and keeping the record of

[R] Plot two matrices and keeping the record of row names

2011-10-31 Thread Bansal, Vikas
is coming fine.But I am loosing the row names,therefore I have no idea which patients are on the top right corner of the plot. Can you please help me.I will be very thankful to you. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London [[alternative HTML

[R] Plot two matrices and keeping the record of row names

2011-10-31 Thread Bansal, Vikas
which patients are on the top right corner of the plot. Can you please help me.I will be very thankful to you. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London [[alternative HTML version deleted]] __ R-help@r

Re: [R] automatic file input

2011-08-22 Thread Bansal, Vikas
i.out),fill=T,colClasses = "character") then it is not working. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London From: istaz...@gmail.com [istaz...@gmail.com] On Behalf Of Ista Zahn [iz...@psych.rochester.edu] Sent: Mo

Re: [R] automatic file input

2011-08-22 Thread Bansal, Vikas
if you will check this line- df=read.table($i.out,fill=T,colClasses = "character") I have used $i.out here and every time in for loop i will be 1 then 2 then 3 till 100.So it will become very easy.But this $ sign is not working in the R.Can I do this thing in R.

[R] automatic file input

2011-08-22 Thread Bansal, Vikas
$f.".out"; I have tried this thing in R but it does not work.Can somebody please help me. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/li

Re: [R] Chi square test on data frame

2011-08-17 Thread Bansal, Vikas
values.My data frame has lot of rows(approx. ). Can you please help me with this. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London From: R. Michael Weylandt [michael.weyla...@gmail.com] Sent: Wednesday, August 17, 2011

[R] Chi square test on data frame

2011-08-17 Thread Bansal, Vikas
returning the index for two largest value with- sort.int(df,index.return=TRUE)$ix[c(4,3)] but it does not accept data frame. Can you please give some idea how to do this,because it is very tricky and after studying a lot, I am not able to perform.Please help. Thanking you, Warm Regards Vikas

[R] Chi square test on data frame

2011-08-16 Thread Bansal, Vikas
please give some idea how to do this,because it is very tricky and after studying a lot, I am not able to perform.Please help. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London __ R-help@r-project.org mailing list https

[R] Removing funny characters from a column of a data frame

2011-08-07 Thread Bansal, Vikas
1|2|3|4|5|6|7|8|10|~|H", "",x[5])) this use of gsub looks odd to me,although result is coming good but I want something fast because data is large.I want something like this- delete everything else except A,a,C,c,G,g,T,t and dot and comma. Any suggestions Please. Thanki

Re: [R] Printing data frame with million rows

2011-08-07 Thread Bansal, Vikas
Dear all, Thanks to everyone.I tried both the methods and it is working. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London From: David Winsemius [dwinsem...@comcast.net] Sent: Sunday, August 07, 2011 8:31 PM To: peter

[R] Printing data frame with million rows

2011-08-07 Thread Bansal, Vikas
Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide comm

[R] Inserting column in between

2011-08-01 Thread Bansal, Vikas
..so on and 50th column is 51st..?I will be very thankful to you. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] Extrat rows from a dataframe based on second data frame

2011-07-25 Thread Bansal, Vikas
output of new data frame- newdf V1 V2 V3 V4 V5 V6 V7 V8V9V10 10 135349878 a A 11 0 0 7 ,..aaab^ab 10 135349912 g G 18 0 0 8 ,.., `_abXbba Can you please help me.I will be very thankful to you. Thanking you, Warm Regards Vikas Bansal Msc

Re: [R] For is.numeric condition in user input

2011-07-25 Thread Bansal, Vikas
part; should be 'is.na': so you would do: repeat{ value <- as.numeric(readline()) if (!is.na(value)) break } On Mon, Jul 25, 2011 at 8:05 AM, Bansal, Vikas wrote: > Thanks for your reply.But I have never seen ia.na in R.Can you please tell me > how to use this?

Re: [R] For is.numeric condition in user input

2011-07-25 Thread Bansal, Vikas
Thanks for your reply.But I have never seen ia.na in R.Can you please tell me how to use this? So you are saying rather than is.numeric,I have to test user input by ia.na? Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London

Re: [R] For is.numeric condition in user input

2011-07-25 Thread Bansal, Vikas
ber Please enter numerical value That is why I am confused now-I have tried with- value=as.numeric(value) and without this also.But did not find any solution. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London From: Smart Guy [s

[R] For is.numeric condition in user input

2011-07-24 Thread Bansal, Vikas
you please tell me what mistake I am doing? Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://ww

Re: [R] Deleting rows and store the deleted rows in new data frame

2011-07-24 Thread Bansal, Vikas
Dear Jeff, Thanks a lot for your reply. I was just curious about this thing about grep that it can perform this kind of thing or not. Otherwise with numerical comparison I know it is very easy to do.Like- df <- df[df$V5 >= 10, ] Thanks a lot for your help. Thanking you, Warm Regards

Re: [R] Deleting rows and store the deleted rows in new data frame

2011-07-24 Thread Bansal, Vikas
13 5973 T 13 0 13 like in 5th column.If I want only rows whose value is more than 10 in 5th column? Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London From: Phil Spector [spec...@stat.berkeley.edu] Sent: Monday, July 25

[R] Deleting rows and store the deleted rows in new data frame

2011-07-24 Thread Bansal, Vikas
0 6 ,,,.,, 10 135349475 a A 8 0 0 6 ,,,.,, 10 135349477 a A 7 0 0 6 ,,,.,, 10 135349478 a A 11 0 0 6 ,,,.,, Thanking you, Warm Regards Vi

Re: [R] wrong name of input file and goto like function

2011-07-24 Thread Bansal, Vikas
not stop even if user writes wrong name of input file? Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London From: Bert Gunter [gunter.ber...@gene.com] Sent: Sunday, July 24, 2011 3:58 PM To: Bansal, Vikas Cc: r-help@r-project.o

[R] wrong name of input file and goto like function

2011-07-24 Thread Bansal, Vikas
r the name of your file: ") } df=read.table(define(),fill=T,sep="\t",colClasses = "character") ##starline if(## some condition here) { print("wrong name of the file Please enter again ") ## some goto function so that it should

Re: [R] User input(unknown name and number of files)

2011-07-23 Thread Bansal, Vikas
internet but did not find anything related to this.I will be very thankful to you. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London From: Joshua Wiley [jwiley.ps...@gmail.com] Sent: Friday, July 22, 2011 9:48 PM To: Bansal

Re: [R] User input(unknown name and number of files)

2011-07-22 Thread Bansal, Vikas
? lapply(c("file1", "file2", etc.), yourfunction) From: Joshua Wiley [jwiley.ps...@gmail.com] Sent: Friday, July 22, 2011 8:26 PM To: Bansal, Vikas Cc: r-help@r-project.org Subject: Re: [R] User input(unknown name and number of files) On Fri, J

[R] User input(unknown name and number of files)

2011-07-22 Thread Bansal, Vikas
df,row.names=F), file = "end.txt", append = FALSE) I know it should do it with for loop and an array.I want that if user input 12 files,the dataframe name df should be different for all the 12 files. Can you please tell me how can I do this. Thanking you, Warm Regards Vikas Bansal Msc Bioin

[R] User input(unknown name and number of files)

2011-07-22 Thread Bansal, Vikas
hould do it with for loop and an array.I want that if user input 12 files,the dataframe name df should be different for all the 12 files. Can you please tell me how can I do this. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London __

[R] User input(unknown name and number of files)

2011-07-21 Thread Bansal, Vikas
hould do it with for loop and an array.I want that if user input 12 files,the dataframe name df should be different for all the 12 files. Can you please tell me how can I do this. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London __

Re: [R] Adding rows based on column value

2011-07-15 Thread Bansal, Vikas
= file['Pos'], FUN = sum) Error in FUN(X[[1L]], ...) : invalid 'type' (character) of argument the thing is I cant use the plyr because I want the coding so that I can use it to make a tool. Can you please tell me why aggregate function is showing this error.I am confuse

Re: [R] Adding rows based on column value

2011-07-15 Thread Bansal, Vikas
= df['Pos'], FUN = sum) Error in aggregate.data.frame(file[vars], by = df["Pos"], FUN = sum) : arguments must have same length the thing is I cant use the plyr because I want the coding so that I can use it to make a tool. Can you please tell me why aggregat

[R] Adding rows based on column value

2011-07-15 Thread Bansal, Vikas
0.00 48.00 0.0024.00 10 135344126 0.00 0.0024.00 0.00 Can you please help me. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College LondonDear all, I have one problem and did not find any solution. I have a file(file.txt) attac

Re: [R] Adding rows based on column value

2011-07-14 Thread Bansal, Vikas
I have tried that also.But it is showing this error- aggregate(file[,3:6], by = list(file[,2]), FUN = sum) Error in FUN(X[[1L]], ...) : invalid 'type' (character) of argument Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings Coll

Re: [R] Adding rows based on column value

2011-07-14 Thread Bansal, Vikas
Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London From: Bansal, Vikas Sent: Thursday, July 14, 2011 6:07 PM To: Bert Gunter Subject: RE: [R] Adding rows based on column value Yes sir.I am trying. I am using this- aggregate

Re: [R] Adding rows based on column value

2011-07-14 Thread Bansal, Vikas
I have checked it but did not get any results.Is there a way I can do it?I will be very thankful to you. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London From: Bert Gunter [gunter.ber...@gene.com] Sent: Thursday, July 14

[R] Adding rows based on column value

2011-07-14 Thread Bansal, Vikas
48.00 0.0024.00 10 135344126 0.00 0.0024.00 0.00 Can you please help me. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London Chr Pos CaseA CaseC CaseG CaseT 10 135344110 0.00 24.00 0.0

[R] Error non-numeric argument to binary operator

2011-07-13 Thread Bansal, Vikas
to enter the value of ind from user.Can you please tell me how can i remove this error. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-h

[R] For applying formula in rows

2011-07-12 Thread Bansal, Vikas
12 because sum of 3rd,4th,5th and 6th column is 1 for first row.and for case A,C and T if we will apply above formula the answer will be zero (0/1)*12*2 which is equal to 0 but for Case G- (1/1)*12*2 which is equal to 24. Can you please help me. Thanking you, Warm Regards Vikas B

[R] user input.

2011-07-11 Thread Bansal, Vikas
i did not know how to do it. Can you please help me. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide ht

Re: [R] ASCII values to Decimal

2011-07-09 Thread Bansal, Vikas
I used this code by Jim Holtman (Thanks to him)and it is working perfectly. dfa$value <- sapply(dfa$V10, function(a) paste(as.integer(charToRaw(a)), collapse = ' ')) Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London

Re: [R] For column values-Quality control

2011-07-09 Thread Bansal, Vikas
91 94 31 0 2 T 89 94 32 0 2 GG96 93 so in output 15th and 27th row should be deleted and 31st row should be- 31 0 2 T89 94 because 89 is score for A and 94 is score for T.Therefore A has been deleted because its score is less than 90. Can you help me please.

[R] ASCII values to Decimal

2011-07-09 Thread Bansal, Vikas
5 0 1 CX 16 0 1 C` 17 0 1 Ga 18 0 1 G_ Column V10 contains ASCII values.I want to convert them into decimal. Can you please help me. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London V7 V8 V9 V10 0 1 G` 0 1 Ta

[R] ASCII values to Decimal

2011-07-08 Thread Bansal, Vikas
=lapply(df[,4], function(c) as.numeric(charToRaw(c))) I want to ask that,is this the right way to convert these values into decimal? Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London __ R-help@r-project.org mailing list https

Re: [R] For column values-Quality control

2011-07-08 Thread Bansal, Vikas
So i think I am doing mistake in converting ASCII values in col V10 in my data frame (dfa.).can you please tell me that, is this the right way to convert ASCII values into decimal- dfa$V10=lapply(dfa[,4], function(c) as.numeric(charToRaw(c))) Thanking you, Warm Regards Vikas Bansal Msc

Re: [R] For column values-Quality control

2011-07-08 Thread Bansal, Vikas
97 First row should be deleted because it contains 82 which is less than 91.In second row C should deleted because it has less than 91 score in col V10. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London

[R] For column values-Quality control

2011-07-08 Thread Bansal, Vikas
97 Can you please tell me the solution. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London V7 V8 V9 V10 0 1 G` 0 1 Ta 0 1 Ca 0 1 Aa 0 1 G_ 0 1 GZ 0 1 C^ 0 1 C\ 0 1 AZ

Re: [R] For column values-Quality control

2011-07-08 Thread Bansal, Vikas
97 Can you please tell me the solution. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London ____ From: Bansal, Vikas Sent: Friday, July 08, 2011 9:15 PM To: r-help@r-project.org; dwinsem...@comcast.net Subjec

[R] For column values-Quality control

2011-07-08 Thread Bansal, Vikas
c(90, 96, 92) 0 1 T94 0 1 C97 Can you please tell me the solution. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics

[R] ASCII values to Decimal

2011-07-08 Thread Bansal, Vikas
argument should be a character vector of length 1 all but the first element will be ignored and it is converting only the value in first row.How can I do this for all rows in my data frame. Please help me.I am new user for R.I will be very thankful to you. Thanking you, Warm Regards Vikas B

[R] Output data frame using write.table

2011-07-05 Thread Bansal, Vikas
ly above the column. What should I do.Please help me. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] For help in R coding

2011-07-05 Thread Bansal, Vikas
0 -1 -1 Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London From: wootten.adrie...@gmail.com [wootten.adrie...@gmail.com] On Behalf Of Adrienne Wootten [amwoo...@ncsu.edu] Sent: Tuesday, July 05, 2011 4:49 PM To: B

Re: [R] For help in R coding

2011-07-05 Thread Bansal, Vikas
not(as.character(m1[,1]) == as.character(m2[,1]), all.equal(m1[, -1], m2[, -1][ names(m1)[-1] ]), dim(merge(m1, m2, by = integer(0))) == c(36, 10)) Can you tell me what this code will do Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London __

Re: [R] For help in R coding

2011-07-05 Thread Bansal, Vikas
Yes sir.I have already looked at merge() but as I am new to R,I was not able to understand the argument that how should i create a code for the logic i gave in previous mail . Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London

Re: [R] For help in R coding

2011-07-05 Thread Bansal, Vikas
135344116 135344118 these values are common in both input dataframes. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London From: David Winsemius [dwinsem...@comcast.net] Sent: Monday, July 04, 2011 12:11 AM To

Re: [R] For help in R coding

2011-07-04 Thread Bansal, Vikas
please tell me how to code for this problem? Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London From: David Winsemius [dwinsem...@comcast.net] Sent: Monday, July 04, 2011 2:02 AM To: Bansal, Vikas Cc: Dennis Murphy; r-help@r

Re: [R] For help in R coding

2011-07-03 Thread Bansal, Vikas
From: David Winsemius [dwinsem...@comcast.net] Sent: Sunday, July 03, 2011 7:08 PM To: Bansal, Vikas Cc: Dennis Murphy; r-help@r-project.org Subject: Re: [R] For help in R coding On Jul 3, 2011, at 1:07 PM, Bansal, Vikas wrote: > Yes you are ri

Re: [R] For help in R coding

2011-07-03 Thread Bansal, Vikas
rather than if condition? From: David Winsemius [dwinsem...@comcast.net] Sent: Sunday, July 03, 2011 3:57 AM To: Bansal, Vikas Cc: Dennis Murphy; r-help@r-project.org Subject: Re: [R] For help in R coding On Jul 2, 2011, at 4:46 PM, Bansa

Re: [R] For help in R coding

2011-07-02 Thread Bansal, Vikas
t", txtvec), function(x) if ( x[[1]] != -1) length(x) else 0 )), N = unlist(sapply(gregexpr("\\,|\\.", txtvec), function(x) if ( x[[1]] != -1) length(x) else 0 ))) Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London ___

Re: [R] For help in R coding

2011-07-02 Thread Bansal, Vikas
NK THIS CODING SEEMS TO BE GOOD BUT I AM MISSING SOMETHING. FOR YOUR CONVENIENCE I HAVE ATTACHED MY Case2.pileup file. I AM VERY THANKFUL TO YOU AND APPRECIATE THAT YOU ARE HELPING AND TAKING YOUR PRECIOUS TIME. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London __

Re: [R] For help in R coding

2011-07-02 Thread Bansal, Vikas
Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London From: David Winsemius [dwinsem...@comcast.net] Sent: Saturday, July 02, 2011 6:19 PM To: Bansal, Vikas Cc: r-help@r-project.org Subject: Re: [R] For help in R coding On Jul 2

Re: [R] For help in R coding

2011-07-02 Thread Bansal, Vikas
p as rownames, which was a > surprise. > > If you wanted to count "A" and "a" as equivalent, then the split > argument should be "a|A" > > >>AS YOU MENTIONED THAT IF I WANT TO COUNT A AND a I SHOUL

Re: [R] For help in R coding

2011-07-01 Thread Bansal, Vikas
ected ')' in "length)" > length) , "-", 1)),T = unlist(lapply( lapply( sapply(mydf[,5], strsplit, > split="t|T"), Error: unexpected ')' in "length)" What should I do? Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings Coll

[R] For help in R coding

2011-07-01 Thread Bansal, Vikas
.$,., +a,g,,t, +,.,^!. +,$.,." but how I should input my data(in column 9) from dataframe mydf using txt command because there are thousands of rows? Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London ___

[R] For help in R coding

2011-07-01 Thread Bansal, Vikas
0 0 1 0 0 0 0 0 0 3 This output is for first 5 rows from the example given above. I am new to R can you please help me.I will be very thankful to you. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London __ R

[R] Pareto Chart using GUI

2011-06-03 Thread Vikas Garud
r plotting bar plot of defect codes based on total cost. Is there a way to accomplish Pareto Chart, may be through couple of stages? Any help is appreciated. Regards Vikas Garud __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-

Re: [R] GUI Experience - Box Plots

2011-06-03 Thread Vikas Garud
> A good place would be r-sig-gui. Regards > Liviu > Thanks Liviu. Subscribing to that list. Hope, it is still OK to write mails on these lists as well. Regards Vikas Garud __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/l

[R] GUI Experience - Box Plots

2011-06-03 Thread Vikas Garud
version of RKward should solve the problem. Thank you everybody for all the help. I'll be asking questions about various tools that I would like to deploy through GUI's for R. I'll also be sharing my experiences. Vikas Garud __ R-help@r

[R] JGR/Deducer Installation

2011-05-26 Thread Vikas Garud
> lib="/home/vikas/R/i686-pc-linux-gnu-library/2.13", dependencies=TRUE) also installing the dependencies ‘rJava’, ‘JavaGD’, ‘iplots’ * installing *source* package ‘rJava’ ... checking for gcc... gcc -std=gnu99 checking for C compiler default output file name... a.out checking wh

Re: [R] R-help Digest, Vol 99, Issue 17

2011-05-19 Thread Vikas Garud
nd R console combination. Used Rkward to load the data and set it active. In R console I used boxplot(formula=Time~Distance+Transporter+Tonnage, data=Transportation.Time). Resultant output (attached to this mail) is the best equivalent output. I will be able to use this output in trai

[R] Box Plot under GUI (R Commander/RKward)

2011-05-17 Thread Vikas Garud
tried to search the mailing list on box plot, but could not find anything relevant. I have also searched in manual and seen this type (or even more complex analysis) being done on terminal. However, I need to do it under (any) GUI. Any help is highly appr

[R] statistics

2011-04-08 Thread vikas
if X is a binomial variate with parameters n and p, find E[1/(X+1)] -- View this message in context: http://r.789695.n4.nabble.com/statistics-tp3437152p3437152.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailin

[R] R2HTML: how to include comments in html output

2010-07-16 Thread Vikas Rawal
Is there any way to include comments in the html output of R2HTML? Or is there any other function in any package that produces an html output including comments, commands and output of the commands. Vikas Rawal __ R-help@r-project.org mailing list

[R] (no subject)

2009-01-22 Thread Vikas Rawal
rnorm(20))->b3 c(rep(1,10),rep(2,10))->b3$Phase qplot(Year,CDR,data=b3,colour=Phase,geom=c("point","line"),gpar(legend.position="bottom"))->p p+scale_colour_gradient2(limits=c(1,2), midpoint=1.5,low="magenta",high="darkblue",bre

[R] ggplot2

2009-01-22 Thread Vikas Rawal
,data=b3,colour=Phase,geom=c("point","line"),legend.position="bottom")->p p+scale_colour_gradient2(limits=c(1,2), midpoint=1,low="magenta", mid="magenta", high="darkblue",breaks=c(1,2),labels=c(&q

[R] ggplot2, pretty=FALSE

2009-01-22 Thread Vikas Rawal
() pushViewport(viewport(height=0.4, width=0.4, x=0.4, y=0.8)) print(p, newpage=FALSE, pretty=FALSE) Is there some other way of doing "pretty=FALSE" in the new version of ggplot2? Vikas Rawal [[alternative HTML version deleted]] _

Re: [R] Fitting a curve to data

2008-07-02 Thread Vikas Rawal
> There is an integrate.xy in sfsmic. Limitations discussed there. Also see trap.rule in Hmisc Vikas __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/post

[R] Corrected : Efficient writing of calculation involving each element of 2 data frames

2008-02-22 Thread Vikas N Kumar
there an efficient way to write this piece of code where I can get it to run faster ? If I do something similar in Excel, it is much faster. But I have to use R, since this is a part of a bigger program. Any help will be appreciated. Thanks and Regards Vikas -- http://www.vikaskumar.org/

[R] efficient writing of calculation involving each element of 2 data frames.

2008-02-22 Thread Vikas N Kumar
minutes to run. Is there an efficient way to write this piece of code where I can get it to run faster ? If I do something similar in Excel, it is much faster. But I have to use R, since this is a part of a bigger program. Any help will be appreciated. Thanks and Regards Vikas [[alt

Re: [R] reshaping data frame

2008-02-21 Thread Vikas Rawal
This works for me. melt(my.dat,id=c("indiv","covar.1","covar.2"))->my.dat.1 names(my.dat.1)[4:5]<-c("level","case.id") melt(my.dat.1,id=c("indiv","level","case.id"))->my.dat.2 Vikas ___

Re: [R] qplot

2008-02-19 Thread Vikas Rawal
You can also use ggplot and then add layers for each geom_line that you want to add. Vikas > __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide