Re: [R] Histograms with strings, grouped by repeat count (w/ data)

2007-06-19 Thread Deepayan Sarkar
On 6/18/07, Matthew Trunnell <[EMAIL PROTECTED]> wrote: > Aha! So to expand that from the original expression, > > > table(table(d$filename, d$email_addr)) > > 0 1 2 3 > 253 20 8 9 > > I think that is exactly what I'm looking for. I knew it must be > simple!!! What does the 0 column

Re: [R] Histograms with strings, grouped by repeat count (w/ data)

2007-06-18 Thread Matthew Trunnell
Aha! So to expand that from the original expression, > table(table(d$filename, d$email_addr)) 0 1 2 3 253 20 8 9 I think that is exactly what I'm looking for. I knew it must be simple!!! What does the 0 column represent? Also, does this tell me the same thing, filtered by Japan?

Re: [R] Histograms with strings, grouped by repeat count (w/ data)

2007-06-18 Thread jim holtman
If you are running on windows, make sure you have 'recording' checked in the history window of the graphics. You can also put the output to a pdf file and view it later. If you use table on the counts matrix: > table(counts) counts 0 1 2 3 253 20 8 9 > this shows that there were 20

Re: [R] Histograms with strings, grouped by repeat count (w/ data)

2007-06-18 Thread Matthew Trunnell
Jim, Thanks for the quick reply! When I run your code, I end up with a single barplot of one datapoint, file9 vs email20 == 2.0. I see the call to barplot is inside a for loop... maybe it's zooming through the display of many barplots, but all I see is the last one? In any case, I need to figure

Re: [R] Histograms with strings, grouped by repeat count (w/ data)

2007-06-18 Thread jim holtman
You should be using barplot and not hist. I think this produces what you want: x <- "filename,last_modified,email_addr,country_residence file1,3/4/2006 13:54,email1,Korea (South) file2,3/4/2006 14:33,email2,United States file2,3/4/2006 16:03,email2,United States file2,3/4/2006 16:17,email3,United

[R] Histograms with strings, grouped by repeat count (w/ data)

2007-06-18 Thread Matthew Trunnell
Hello R gurus, I just spent my first weekend wrestling with R, but so far have come up empty handed. I have a dataset that represents file downloads; it has 4 dimensions: date, filename, email, and country. (sample data below) My first goal is to get an idea of the frequency of repeated downloa

Re: [R] Histograms of lots of variables

2007-04-16 Thread Petr Klasterecky
Please, experiment a little bit :-) I have trouble using Win metafile graphics, so I just converted it to jpeg. The code works - there was a copy/paste error. Try this with your 'total' dataframe - it works with my 'total' given there: total <- list(a=rnorm(1000),b=rnorm(1000),c=(10*runif(1000)-

Re: [R] Histograms of lots of variables

2007-04-16 Thread mtb954
Thanks again Jim, I appreciate your time. I've been trying to debug the code, but am running into a wall. I'm getting a syntax error after the line containing the hist function. Here's the R session, any ideas? Also, I'd like to be able to have each histogram use the same x-axis breaks (0, 1, 2-3,

Re: [R] Histograms of lots of variables

2007-04-16 Thread jim holtman
This will put the colnames on the histograms: lapply(3:20, function(.ind){ win.metafile(filename=paste("file.", .ind, ".wmf", sep='')) hist(dataframe[[.ind]], main=colnames(dataframe)[.ind], xlab="") dev.off() }) On 4/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi Jim, than

Re: [R] Histograms of lots of variables

2007-04-16 Thread jim holtman
I forgot that win.metafile can only output one graph. This will write separate files: lapply(3:20, function(.ind){ win.metafile(filename=paste("file.", .ind, ".wmf", sep='')) hist(dataframe[[.ind]], main=paste("dataframe[[", .ind, "]]", sep=''), xlab="") dev.off() }) On 4/16/07, [EM

Re: [R] Histograms of lots of variables

2007-04-16 Thread mtb954
Hi Jim, thanks for your help. That looks like it might work, but a couple of things... 1) The resulting 73 (in my case) histograms will be named by their variable number, not by the variable name contained in the first row. Any way to include the variable name in the resulting histogram? 2) How c

Re: [R] Histograms of lots of variables

2007-04-16 Thread jim holtman
try: win.metafile(file="output.wmf") lapply(dataframe[3:20], hist) dev.off() On 4/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi R-helpers, > > I wish to produce frequency histograms of all of the variables in my > dataframe (except some identifying variables). > > I have tried > > >his

[R] Histograms of lots of variables

2007-04-16 Thread mtb954
Hi R-helpers, I wish to produce frequency histograms of all of the variables in my dataframe (except some identifying variables). I have tried >hist(dataframe[,3:20]) to produce histograms of the 3rd through 20th variables in my dataframe, but R doesn't like that. Could anyone provide a sugges

Re: [R] histograms

2006-09-01 Thread Nair, Murlidharan T
Thanks ../Murli -Original Message- From: hadley wickham [mailto:[EMAIL PROTECTED] Sent: Friday, September 01, 2006 5:08 PM To: Gabor Grothendieck Cc: Nair, Murlidharan T; r-help@stat.math.ethz.ch Subject: Re: Re: [R] histograms > Your data seems to have come through messed up but l

Re: [R] histograms

2006-09-01 Thread hadley wickham
> Your data seems to have come through messed up but lets > assume you have a data frame with one column per tumor. > The convert your data to stacked form and call histogram: > > DF <- data.frame(T1 = 1:10, T2 = 6:15) > > library(lattice) > histogram(~ values | ind, stack(DF)) Or with ggplot and

Re: [R] histograms

2006-09-01 Thread Gabor Grothendieck
Your data seems to have come through messed up but lets assume you have a data frame with one column per tumor. The convert your data to stacked form and call histogram: DF <- data.frame(T1 = 1:10, T2 = 6:15) library(lattice) histogram(~ values | ind, stack(DF)) On 9/1/06, Nair, Murlidharan T <

[R] histograms

2006-09-01 Thread Nair, Murlidharan T
I am interested in plotting histograms for the following data Isoform Tumor_65_198 Tumor_50_192 Tumor_80_167 Tumor_80_204 Tumor_95_197 Tumor_70_189 Tumor_90_202 Tumor_40_177 Tumor_60_21 Tumor_70_174 Tumor_70_147 Tumor_50_5 ABCC4-2007 1 1 1 6 1 9 10 1 2 0 10 1 ABCC4-200

Re: [R] R: histograms and ylim

2005-08-03 Thread Petr Pikal
Hallo a very simple answer as well hist(x,ylim=c(0,0.5),prob=T) #this does work Cheers Petr from help page: xlim, ylim: the range of x and y values with sensible defaults. Note ^^ that 'xlim' is _not_ used to define the histogram (breaks), but only

Re: [R] R: histograms and ylim

2005-08-03 Thread Romain Francois
Le 03.08.2005 09:53, Clark Allan a écrit : >hi all > >a very simple question once again!!! > >can we change the "y" range in a histogram? > > >e.g. >x=rnorm(1000) >hist(x,ylim=0.5,prob=T)#this does not work > > >any suggestions??? > That does work : R> hist(x,ylim=c(0,0.5),prob=T) # that

[R] R: histograms and ylim

2005-08-03 Thread Clark Allan
hi all a very simple question once again!!! can we change the "y" range in a histogram? e.g. x=rnorm(1000) hist(x,ylim=0.5,prob=T) #this does not work any suggestions???__ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r

RE: [R] histograms with more than one variable

2004-09-30 Thread Liaw, Andy
Sounds like you want something similar to: library(lattice) y <- rnorm(40) group <- rep(1:2, each=20) histogram(~y | group) Andy > From: Bill Shipley > > > > y group > > 1.2 1 > > 3.3 1 > > 2.4 2 > > 5.7 1 > > 0.2 2 > > etc. > > > > Bill Shipl

[R] histograms with more than one variable

2004-09-30 Thread Bill Shipley
Hello. I want to plot the distribution of a continuous variable (y) in each of two groups on the same graph as histograms. I suppose one could call this a 2-d histogram? Can this be done in R? Here is a typical data.set: y group 1.2 1 3.3 1 2.4 2 5.7 1

Re: [R] Histograms, density, and relative frequencies

2004-07-07 Thread Adaikalavan Ramasamy
On Wed, 2004-07-07 at 18:29, Bret Collier wrote: > R-users, > I have been using R for about 1 year, and I have run across a > couple of graphics problem that I am not quite sure how to address. I have > read up on the email threads regarding the differences between density and > relati

[R] Histograms, density, and relative frequencies

2004-07-07 Thread Bret Collier
R-users, I have been using R for about 1 year, and I have run across a couple of graphics problem that I am not quite sure how to address. I have read up on the email threads regarding the differences between density and relative frequencies (count/sum(count) on the R list, and I am hop

Re: [R] Histograms by two factors

2004-02-06 Thread John Fox
Dear Meredith, At 10:08 AM 2/6/2004 +1100, Briggs, Meredith M wrote: I am trying to print out means, STDs and histograms under two sets of factors. I can manage it for one set - see below but not for two sets. That is, I want ot print out the mean STD and Histogram for each ITEM code within e

Re: [R] Histograms by two factors

2004-02-06 Thread Peter Dalgaard
"Briggs, Meredith M" <[EMAIL PROTECTED]> writes: > Hi > > > I am trying to print out means, STDs and histograms under two sets > of factors. I can manage it for one set - see below but not for two > sets. That is, I want ot print out the mean STD and Histogram for > each ITEM code within each DE

[R] Histograms by two factors

2004-02-05 Thread Briggs, Meredith M
Hi I am trying to print out means, STDs and histograms under two sets of factors. I can manage it for one set - see below but not for two sets. That is, I want ot print out the mean STD and Histogram for each ITEM code within each DELIVERABLE code. In addition I can only get to view the histo