Re: [R] mild and extreme outliers in boxplot

2009-08-20 Thread Rnewbie
ore making further posts. best wishes to all, jimmy Dr. Ottorino-Luca Pantani wrote: > > Hi Jimmy, > please be reassured that I did not intend to offend you nor any other in > the list. > > Rnewbie ha scritto: >> I read the boxplot() help file and googled before making

Re: [R] mild and extreme outliers in boxplot

2009-08-19 Thread Rnewbie
prepared to bastardise the standard > interpretation of the boxplot, is to compute the relevant boxplot > statistics using boxplot.stats and alter argument 'coef' to some larger > multiple of the box height to represent "extreme" outliers, whatever > thos

[R] mild and extreme outliers in boxplot

2009-08-19 Thread Rnewbie
dear all, could somebody tell me how I can plot mild outliers as a circle(°) and extreme outliers as an asterisk(*) in a box-whisker plot? Thanks very much in advance -- View this message in context: http://www.nabble.com/mild-and-extreme-outliers-in-boxplot-tp25040545p25040545.html Sent from

[R] heatmap and dendrogram

2009-08-18 Thread Rnewbie
Dear all, I generated a heatmap with the heatmap() function with the default "complete" linkage method, but when I add the argument Rowv=as.dendrogram(hclust(dist(matrix), method="complete")), The dendrogram generated is different from the dendrogram produced by heatmap() with default settings.

Re: [R] how to Transpose a dataset

2009-08-18 Thread Rnewbie
you may want to try t(x) rajclinasia wrote: > > Hi everyone, > > How to a transpose a R dataset with a specified variable. If possible send > the code. it will be very helpful for us. > > Thanks in Advance. > -- View this message in context: http://www.nabble.com/how-to-Transpose-a-datas

[R] how to extract the order of genes after clustering

2009-08-13 Thread Rnewbie
Dear all, I used hclust() to generate a dendrogram. After clustering, I wanted to take the order of the genes for further plotting purposes. Anyone has an idea how I can reoder my raw gene list as it is shown in the dendrogram? Thanks in advance. -- View this message in context: http://www.na

Re: [R] what is returned if a match is not found using grep

2009-08-11 Thread Rnewbie
sorry, I still have a question. What is the difference between an empty vector and a vector of length 0? When I assign x<-c() is.null(x) is TRUE x<-integer(0) is.null(x) is FALSE Duncan Murdoch-2 wrote: > > Rnewbie wrote: >> dear all, >> >> I tried to use grep

Re: [R] what is returned if a match is not found using grep

2009-08-11 Thread Rnewbie
Thank you very much!!! Duncan Murdoch-2 wrote: > > Rnewbie wrote: >> dear all, >> >> I tried to use grep to match IDs in two dataframes >> >> grep(DF1$ID[i], DF2$ID) >> >> I wanted to use condition in a loop, but I have the problem to define &g

[R] what is returned if a match is not found using grep

2009-08-11 Thread Rnewbie
dear all, I tried to use grep to match IDs in two dataframes grep(DF1$ID[i], DF2$ID) I wanted to use condition in a loop, but I have the problem to define what is in return if a match is not found. I used mode() and class() to compare between the attributes when a match is found and not found,

Re: [R] problem with recording numeric output into another dataframe

2009-08-07 Thread Rnewbie
lue"])==T) {print("bingo!")} else {DF1<-transform(DF1, value1[i]<-DF2[grep(DF1[i, "ID"], DF2$ID), "value"])} } Any ideas how I can get what I wanted? Henrique Dallazuanna wrote: > > Try this: > g <- sapply(DF1$ID, grep, x = DF2$ID) > transform

[R] problem with recording numeric output into another dataframe

2009-08-06 Thread Rnewbie
dear all, I have two dataframes dataframe1 ID a b c dataframe2 ID value a;W 100 X;c 200 Y;Z 300 I wanted to match the IDs from the two dataframes and record the values into a new column of dataframe1 at the corresponding rows. This is what I expect: dataframe1 ID valu

Re: [R] Re move all punctuations except commas

2009-08-06 Thread Rnewbie
it works, but does that mean I really have to specify what to keep rather than what to remove? Gabor Grothendieck wrote: > > Try something along these lines: > > gsub("[^[:alnum:][:space:],]", "", string) > > > On Thu, Aug 6, 2009 at 8:37 AM, Rnewbie

[R] Re move all punctuations except commas

2009-08-06 Thread Rnewbie
Dear all, I wanted to remove all punctuations except commas from a string. I used: gsub("[[:punct:]]", "", string) but I don't know how to exclude the commas ",". Anyone would kindly answer my basic question? -- View this message in context: http://www.nabble.com/Remove-all-punctuations-exce

Re: [R] problem with pattern matching

2009-08-05 Thread Rnewbie
alues. > > -Don > > At 2:36 AM -0700 8/5/09, Rnewbie wrote: >>I wanted to extract my interested rows from a dataframe. I used: >> >>grep(list$ID, dataframe$ID, value=T) #list contains a list of my interested >>IDs >> >>I got one match in return, whi

Re: [R] problem with pattern matching

2009-08-05 Thread Rnewbie
t; From: r-help-boun...@r-project.org >> [mailto:r-help-boun...@r-project.org] On Behalf Of jim holtman >> Sent: Wednesday, August 05, 2009 5:23 AM >> To: Rnewbie >> Cc: r-help@r-project.org >> Subject: Re: [R] problem with pattern matching >> >>

Re: [R] problem with pattern matching

2009-08-05 Thread Rnewbie
r 'match' or '%in%' > > x <- dataframe$ID %in% list$ID # TRUE if it is in list > > On Wed, Aug 5, 2009 at 5:36 AM, Rnewbie wrote: >> >> I wanted to extract my interested rows from a dataframe. I used: >> >> grep(list$ID, dataframe$ID, valu

Re: [R] problem with pattern matching

2009-08-05 Thread Rnewbie
Winsemius wrote: > > > On Aug 4, 2009, at 11:16 AM, Rnewbie wrote: > >> >> dear all, >> >> I got a problem with pattern matching using grep. I extracted a list >> of >> characters from a data frame, and I tried to match this list of >>

[R] problem with pattern matching

2009-08-04 Thread Rnewbie
dear all, I got a problem with pattern matching using grep. I extracted a list of characters from a data frame, and I tried to match this list of characters to a column from another data frame. In return, I got only one match, but there should be far more matches. Any ideas what has gone wrong?

Re: [R] Merge partially duplicated rows

2009-08-04 Thread Rnewbie
Thanks very much :handshake: David Winsemius wrote: > > > You might want to look at the ave function. It will calculate a > function within IDs and you can assign that as another row in the > datafrme before you exclude the duplicates. > > David Winsemius, MD > Heritage Laboratories > Wes

[R] Merge partially duplicated rows

2009-08-03 Thread Rnewbie
Dear all, I have a dataset, and I wanted to merge the rows with duplicated IDs by calculating the means or medians from the duplicate rows. I tried using the command duplicated(x), but it only tells where the duplicated rows are. Any suggestions will be appreciated. -- View this message in cont

[R] Cell size in heatmap

2009-07-28 Thread Rnewbie
Dear all, Is it possible to adjust the size of the cells in the heatmap generated by R? I have a heatmap with many rows. Because of this, the size of the cells is very small and the labels of the rows overlap. I have to shrink the labels, but this makes them hardly readable. Any suggestions how I

Re: [R] rows missing after dataset loaded to R

2009-07-24 Thread Rnewbie
separators other than where they are >> separating fields, then the quotes are probably not needed. >> >> Hope this helps, >> >> -- >> Gregory (Greg) L. Snow Ph.D. >> Statistical Data Center >> Intermountain Healthcare >> greg.s...@imail.org >

Re: [R] rows missing after dataset loaded to R

2009-07-23 Thread Rnewbie
Thank you very much for the reply. I checked the rows and it was the unbalanced " quote marks in some of the rows that caused the problem. Once I disabled quoting altogether, the problem is solved. I have one more basic question. I disabled quoting when loading the file to R, and all the columns

[R] rows missing after dataset loaded to R

2009-07-23 Thread Rnewbie
Dear all, When I loaded a dataset (a txt file), which is structured in a tabular format, to R by using read.delim, I found some rows were missing. The column number was correct. These missing rows are no apparently different from the other rows, and for some unknown reasons these missing rows sca