[R] Question about 'text' (add lm summary to a plot)

2005-07-21 Thread Dan Bolser
I would like to annotate my plot with a little box containing the slope, intercept and R^2 of a lm on the data. I would like it to look like... ++ | Slope : 3.45 +- 0.34 | | Intercept : -10.43 +- 1.42 | | R^2 : 0.78 |

Re: [R] Question about 'text' (add lm summary to a plot)

2005-07-21 Thread Dan Bolser
-- Christoph Buser [EMAIL PROTECTED] Seminar fuer Statistik, LEO C13 ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND phone: x-41-44-632-4673fax: 632-1228 http://stat.ethz.ch/~buser/ -- Dan Bolser writes

Re: [R] Question about 'text' (add lm summary to a plot)

2005-07-22 Thread Dan Bolser
On Thu, 21 Jul 2005, Marc Schwartz (via MN) wrote: [Note: the initial posts have been re-arranged to attempt to maintain the flow from top to bottom] Dan Bolser writes: I would like to annotate my plot with a little box containing the slope, intercept and R^2 of a lm on the data

Re: [R] Question about 'text' (add lm summary to a plot)

2005-07-22 Thread Dan Bolser
numbers, 2) remove excessive white space. I like the above because it dosn't require me to calculate exactly where to put each piece of text. I just want to annotate a plot :( On 7/22/05, Dan Bolser [EMAIL PROTECTED] wrote: On Thu, 21 Jul 2005, Marc Schwartz (via MN) wrote: [Note

Re: [R] Question about 'text' (add lm summary to a plot)

2005-07-23 Thread Dan Bolser
On Fri, 22 Jul 2005, Marc Schwartz (via MN) wrote: Ok guys, So I played around with this a bit, going back to Dan's original requirements and using Thomas' do.call() approach with legend(). Gabor's approach using sapply() will also work here. I have the following: # Note the leading spaces here

Re: [R] Question about 'text' (add lm summary to a plot)

2005-07-23 Thread Dan Bolser
On Sat, 23 Jul 2005, Dan Bolser wrote: On Fri, 22 Jul 2005, Marc Schwartz (via MN) wrote: Ok guys, So I played around with this a bit, going back to Dan's original requirements and using Thomas' do.call() approach with legend(). Gabor's approach using sapply() will also work here. I have

Re: [R] Question about 'text'

2005-07-24 Thread Dan Bolser
On Sun, 24 Jul 2005, John Wilkinson wrote: Dan, Another tweak ! If you want the 'legend' to look pretty you can resize it by adding,say, 'cex=0.6' into the legend code; try--- legend(topleft, #inset=-1, legend = do.call(expression, L), bg='white', ncol = 2,

[R] Question about curve fitting...

2005-08-10 Thread Dan Bolser
Meta: This question is somewhat long and has two parts, I would be very happy for someone just to nudge me in the right direction with the manual / tutorial, as I am somewhat lost... 1) How do I fit a curve of the form y = k1 * x^k2 ? I want to estimate values of k1 and k2 given the x/y data I

Re: [R] Question about curve fitting...

2005-08-10 Thread Dan Bolser
On Wed, 10 Aug 2005, S.O. Nyangoma wrote: I see that log(y)=log(k1)+k2*log(x) use lm? Thats a nice solution in this instance, but in general how do I get R to fit a particular function (formula) and return the parameters? Cheers, Dan. - Original Message - From: Dan Bolser [EMAIL

[R] Conditionally swap two columns of a data.frame?

2004-09-16 Thread Dan Bolser
I am doing this a kinda dumb way, and it is apparetnly taking forever. I have a data frame with two numeric columns. I want to look at their correlation, and I am looking at the size ratio between the two. i.e. plot(density(data$V1/data$V2)) This kinda gives me a normal curve showing

Re: [R] Conditionally swap two columns of a data.frame?

2004-09-16 Thread Dan Bolser
://www.student.kuleuven.ac.be/~m0390867/dimitris.htm - Original Message - From: Dan Bolser [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, September 16, 2004 2:19 PM Subject: [R] Conditionally swap two columns of a data.frame? I am doing this a kinda dumb way

Re: [R] Conditionally swap two columns of a data.frame?

2004-09-16 Thread Dan Bolser
://www.student.kuleuven.ac.be/~m0390867/dimitris.htm - Original Message - From: Dan Bolser [EMAIL PROTECTED] To: Dimitris Rizopoulos [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, September 16, 2004 2:55 PM Subject: Re: [R] Conditionally swap two columns of a data.frame? Minter! Is there an R

[R] edit(crash)?

2004-09-18 Thread Dan Bolser
I found that the edit command kills my linux/R/emacs environment sometimes. How should I report this bug? __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

[R] hclust title and paste - messed up

2004-10-11 Thread Dan Bolser
I use the following code to scan a (limited) parameter space of clustering strategies ... data - read.table(... dataTranspose - t(data) distMeth - c(euclidean, maximum, manhattan, canberra, binary ) clustMeth - c(ward,

[R] plot hclust - canberra dist + median linkage

2004-10-11 Thread Dan Bolser
Gives strange results. I get 'weird' dendrograms with canberra / binary distance metric and median / centroid cluster methods. Is this just my data? Dan __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] plot hclust - canberra dist + median linkage

2004-10-12 Thread Dan Bolser
On Tue, 12 Oct 2004, Martin Maechler wrote: Dan == Dan Bolser [EMAIL PROTECTED] on Mon, 11 Oct 2004 16:21:53 +0100 (BST) writes: Dan Gives strange results. Dan I get 'weird' dendrograms with canberra / binary distance metric and Dan median / centroid cluster methods

[R] data(eurodist) and PCA ??

2004-10-12 Thread Dan Bolser
If I perform PCA on the 'eurodist' data, should I get an accurate geographic layout of the cities with biplot? (barring inversions, i.e. their is no way to define north.. but you get the idea...) I have a complex distance matrix, and I am thinking about how to cluster it and how to visualize

Re: [R] data(eurodist) and PCA ??

2004-10-13 Thread Dan Bolser
On 13 Oct 2004, Jari Oksanen wrote: On Wed, 2004-10-13 at 09:51, Prof Brian Ripley wrote: On Wed, 13 Oct 2004, Dan Bolser wrote: I have a complex distance matrix, and I am thinking about how to cluster it and how to visualize the quality of the resulting clusters. Using PCA and plotting

[R] 2x2 test: total confusion.

2004-10-06 Thread Dan Bolser
I wan't a test for the 'association' between two events, lets say the color of balls picked and the pickers (this is quite a good analogy to my data). I have 200 different pickers P I have 1,000 colors of balls C I have 1,000,000 picks in total I am totally confused about what

[R] R-(wiki)-pedia?

2004-10-06 Thread Dan Bolser
Is there an R wiki? Looking at the huge amount of traffic on this list, I think wiki could be an exelet outlet for all the constructive enthusiasm here. I don't think it would be too hard to port the existing R documentation (the stuff you get with the ?) onto a wiki system, then users could

Re: [R] R-(wiki)-pedia?

2004-10-07 Thread Dan Bolser
On Wed, 6 Oct 2004, Gabor Grothendieck wrote: Dan Bolser dmb at mrc-dunn.cam.ac.uk writes: : : Is there an R wiki? : : Looking at the huge amount of traffic on this list, I think wiki could be : an exelet outlet for all the constructive enthusiasm here. : : I don't think it would be too hard

Re: [R] R-(wiki)-pedia?

2004-10-07 Thread Dan Bolser
On Thu, 7 Oct 2004, Gabor Grothendieck wrote: Tony Plate tplate at blackmesacapital.com writes: : : At Thursday 11:29 AM 10/7/2004, Dan Bolser wrote: : [snip] : I just added some pages... I think it would be great if people could get : motivated to contribute to something like this. Its one

RE: [R] R-(wiki)-pedia?

2004-10-07 Thread Dan Bolser
. Regards, Matt Wiener -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Bolser Sent: Thursday, October 07, 2004 1:30 PM To: Gabor Grothendieck Cc: [EMAIL PROTECTED] Subject: Re: [R] R-(wiki)-pedia? On Wed, 6 Oct 2004, Gabor Grothendieck wrote: Dan

[R] Is it safe? Cochran etc

2004-10-09 Thread Dan Bolser
I have the following contingency table dat - matrix(c(1,506,13714,878702),nr=2) And I want to test if their is an association between events A:{a,not(a)} and B:{b,not(b)} | b | not(b) | +-++ a | 1 | 13714 | +-++ not(a) | 506 |

Re: [R] Is it safe? Cochran etc

2004-10-09 Thread Dan Bolser
Why can't I just use Log odds? Does the standard error of the logs score depend on a similar chisq assumption? On Sat, 9 Oct 2004, Dan Bolser wrote: I have the following contingency table dat - matrix(c(1,506,13714,878702),nr=2) And I want to test if their is an association between events

[R] Legend placement in barplot?

2004-11-03 Thread Dan Bolser
This has been asked before, but all the answers are hidiously complex. The legend.text=TRUE option of barplot is almost exactly what I need, except I need a legend.placement='tl' (top left) option. This option would be in contrast to the default placement which we could call 'tr' (top

Re: [R] Legend placement in barplot?

2004-11-04 Thread Dan Bolser
On Wed, 3 Nov 2004, Marc Schwartz wrote: On Wed, 2004-11-03 at 09:55, Dan Bolser wrote: This has been asked before, but all the answers are hidiously complex. The legend.text=TRUE option of barplot is almost exactly what I need, except I need a legend.placement='tl' (top left

Re: [R] Legend placement in barplot?

2004-11-04 Thread Dan Bolser
On Wed, 3 Nov 2004, Gabor Grothendieck wrote: Dan Bolser dmb at mrc-dunn.cam.ac.uk writes: : : This has been asked before, but all the answers are hidiously complex. : : The : : legend.text=TRUE : : option of barplot is almost exactly what I need, except I need a : : legend.placement='tl

[R] highly biased PCA data?

2004-11-04 Thread Dan Bolser
Hello, supposing that I have two or three clear categories for my data, lets say pet preferece across fish, cat, dog. Lets say most people rate their preference as being mostly one of the categories. I want to do pca on the data to see three 'groups' of people, one group for fish, one for cat

RE: [R] highly biased PCA data?

2004-11-04 Thread Dan Bolser
. -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA The business of the statistician is to catalyze the scientific learning process. - George E. P. Box -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Bolser Sent

Re: [R] Legend placement in barplot?

2004-11-04 Thread Dan Bolser
their is a way to code this, but I don't want to write code - at least not code that I have to look at when what I want to see is my data. From: Gabor Grothendieck [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [R] Legend placement in barplot? Date: Wed, 3 Nov 2004 18:48:48 + (UTC) Dan Bolser dmb

Re: [R] graphics site

2004-11-06 Thread Dan Bolser
On Fri, 5 Nov 2004, Pierre BADY wrote: hi, you can see these links: http://pbil.univ-lyon1.fr/R/enseignement.html http://zoonek2.free.fr/UNIX/48_R/all.html http://www.ceremade.dauphine.fr/~xian/Noise.html http://statwww.epfl.ch/davison/teaching/ProbStat/20032004/PDF

Re: [R] Using GNU R on a two box cluster

2004-11-07 Thread Dan Bolser
On Sun, 7 Nov 2004, [ISO-8859-15] Thomas Schönhoff wrote: Hello, right now I'm thinking about running R 2.0.0 on box A (Debian SID) but at the same time having access to the ressources of box B (Ubuntu Linux) regarding disk capacity, RAM, idle CPU cycles . Is there anyone of you that has

[R] Analysis of pre-calculated frequency distribution?

2004-11-21 Thread Dan Bolser
Sorry for the dumb question, but I cant work out how to do this. Quick version, How can I re-bin a given frequency distribution using new breaks without reference to the original data? Given distribution has integer valued bins. Long version, I am loading a frequency table into R from a

RE: [R] Analysis of pre-calculated frequency distribution?

2004-11-21 Thread Dan Bolser
On Sun, 21 Nov 2004 [EMAIL PROTECTED] wrote: On 21-Nov-04 Dan Bolser wrote: Sorry for the dumb question, but I cant work out how to do this. Quick version, How can I re-bin a given frequency distribution using new breaks without reference to the original data? Given distribution has

[R] Making legend() look like my plot()

2004-11-25 Thread Dan Bolser
Hello, I am using code like the following to create as simple plot... plot(x,y,type='b') lines(lowess(x,y),lwd=3,lty=3,col=2) I want to add a legend which shows lines looking exactly like those used in my plot, i.e. a thin black line with gaps taken up by circles (the default for type='b',

Re: [R] Making legend() look like my plot()

2004-11-25 Thread Dan Bolser
Is this an impossible task? How about just problem 2 below, having one pch in one legend entry, but no pch in the second? On Thu, 25 Nov 2004, Dan Bolser wrote: Hello, I am using code like the following to create as simple plot... plot(x,y,type='b') lines(lowess(x,y),lwd=3,lty=3,col=2

Re: [R] Making legend() look like my plot()

2004-11-25 Thread Dan Bolser
On Thu, 25 Nov 2004, Uwe Ligges wrote: Dan Bolser wrote: Is this an impossible task? How about just problem 2 below, having one pch in one legend entry, but no pch in the second? Please be at least a little bit patient! This is not a hotline! People are not working 24 hours a day just

Re: [R] Making legend() look like my plot()

2004-11-26 Thread Dan Bolser
On Fri, 26 Nov 2004, Martin Maechler wrote: Dan == Dan Bolser [EMAIL PROTECTED] on Thu, 25 Nov 2004 22:35:22 + (GMT) writes: Dan On Thu, 25 Nov 2004, Uwe Ligges wrote: Dan Bolser wrote: Is this an impossible task? How about just problem 2 below, having one pch

[R] Massive clustering job?

2004-12-15 Thread Dan Bolser
Hi, I have ~40,000 rows in a database, each of which contains an id column and 20 additional columns of count data. I want to cluster the rows based on these count vectors. Their are ~1.6 billion possible 'distances' between pairs of vectors (cells in my distance matrix), so I need to do

RE: [R] Massive clustering job?

2004-12-17 Thread Dan Bolser
On Wed, 15 Dec 2004, Wiener, Matthew wrote: It sounds like clara in package cluster might help. Cheers, this looks just the ticket. How should I choose k though? Dan. Regards, Matt Wiener -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Bolser

[R] Question about creating error bars

2004-12-23 Thread Dan Bolser
I have data that looks (very roughly) like this... Declarative: Several 'groups', each group with a very variable number of data points associated. Procedural: v.1 - c(rep(50,1), rep(5,5), rep(2,10)) # Set up v.2 - c('a','b','c','d','e','f','g','h', # the

Re: [R] Question about creating error bars

2004-12-27 Thread Dan Bolser
On Thu, 23 Dec 2004, Dan Bolser wrote: I have data that looks (very roughly) like this... Declarative: Several 'groups', each group with a very variable number of data points associated. Procedural: v.1 - c(rep(50,1), rep(5,5), rep(2,10)) # Set up v.2 - c('a','b','c','d','e','f','g','h

Re: [R] Question about creating error bars

2005-01-04 Thread Dan Bolser
On Tue, 28 Dec 2004, Dan Bolser wrote: On Thu, 23 Dec 2004, Dan Bolser wrote: I have data that looks (very roughly) like this... Declarative: Several 'groups', each group with a very variable number of data points associated. Procedural: v.1 - c(rep(50,1), rep(5,5), rep(2,10)) # Set up v

[R] Adding values to the end of a vector?

2005-01-04 Thread Dan Bolser
I want to add values onto the end of a vector, for example... x - vector for (i in 1:5){ add_to_end_of_vector(i,x) } I just cant find the answer to this question! Sorry for such a basic question, I tried... x - c() for (i in 1:5) x[length(x)] - i but it didn't work.

[R] boot and variances of the bootstrap replicates of the variable of interest?

2005-01-04 Thread Dan Bolser
I want to use boot.ci to generate confidence intervals over the bootstrapped mean(s) of a group of observations (i.e. I have 10 observations and I want to know how confident I can be on the value for the mean). I don't know (or want to know) the details of bootstrapping - I just have the

[R] R help search and Java(tm)?

2005-01-04 Thread Dan Bolser
I found this great search source(http://www.statslab.cam.ac.uk/~djw1005/Stats/Interests/search.R;) helpHTML() Has (or will) this become the standard search method? Is R 'Free Software'? The dependence on Java seems a bit of a pain for 'freeness'. Did the above make it into CRAN? Cheers,

[R] bootstrap proportions?

2005-01-04 Thread Dan Bolser
Hello, I have several ordered groups (20), each with several observations. Each group has fewer observations roughly linearly from 30 to 0. Each observation is a proportion. As I know the max and min values for a proporion are 1 and 0, I am adding these values to each group to allow bootstrap

[R] print(cat(bleh)) shows up strange NULL

2005-01-04 Thread Dan Bolser
I am trying the following code... for(i in 1:bins){ print(cat(c(i, length(var1[var1==i] } Where var1 is a vector with zero or more values = {1, 2, ..., bins} (or something like that). The result I get is... 1 33NULL 2 28NULL 3 39NULL 4 27NULL 5 32NULL 6 30NULL 7 23NULL 8 16NULL 9 10NULL

Re: [R] print(cat(bleh)) shows up strange NULL

2005-01-04 Thread Dan Bolser
On 4 Jan 2005, Peter Dalgaard wrote: Dan Bolser [EMAIL PROTECTED] writes: I am trying the following code... for(i in 1:bins){ print(cat(c(i, length(var1[var1==i] } Where var1 is a vector with zero or more values = {1, 2, ..., bins} (or something like that). The result I get

Re: [R] print(cat(bleh)) shows up strange NULL

2005-01-04 Thread Dan Bolser
On Tue, 4 Jan 2005, Dan Bolser wrote: On 4 Jan 2005, Peter Dalgaard wrote: Dan Bolser [EMAIL PROTECTED] writes: I am trying the following code... for(i in 1:bins){ print(cat(c(i, length(var1[var1==i] } Where var1 is a vector with zero or more values = {1, 2, ..., bins

Re: [R] Converting integers to chars i.e 1 to 01

2005-01-05 Thread Dan Bolser
? formatC Else (if you are linux) the following shell command can be useful... rename file_name_ file_name_0 file_name_[0-9]_bleh_*.png Where file_name_[0-9]_bleh_*.png is supposed to match all those files with a single digit, and the rename command adds a zero before that digit. rename can

RE: [R] plotting percent of incidents within different 'bins'

2005-01-05 Thread Dan Bolser
I was doing something very similar. I found it tricky to work out how to find a confidence interval for the 'percentage' of the outcome (I call it proportion). Some of my bins had all zeroes or all ones, so I couldn't work out how to make a variance that was sensible. Also some bins had few

[R] hist function to give each cell equal area

2005-01-07 Thread Dan Bolser
Hi, I want to use hist with non-equi-spaced breaks, picked such that the fraction of the data points falling in the cells (defined by 'breaks') is roughly equal accross all cells. Is there such a function that will automatically try to determine the breaks to fullfill this requirement?

RE: [R] hist function to give each cell equal area

2005-01-07 Thread Dan Bolser
-- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Bolser Sent: Friday, January 07, 2005 11:21 AM To: R mailing list Subject: [R] hist function to give each cell equal area Hi, I want to use hist with non-equi-spaced breaks, picked

[R] plot.default and open ended limits

2005-01-09 Thread Dan Bolser
Hi, I would like to bound the lower limit of my y scale to zero, and let R chose an upper limit. Something like plot(x,ylim=c(0,)) or plot(x,ylim=c(0,na)) but nither of these do the job. I searched the docs, but I can't see a way to do this. Naturally its nothing I can't do 'by hand', I

Re: [R] plot.default and open ended limits

2005-01-09 Thread Dan Bolser
below, how would I go about it? Cheers, plot(x,y,ylim=c(0,max(y))) Does it work for you ? Cordialement. Romain. Dan Bolser a écrit : Hi, I would like to bound the lower limit of my y scale to zero, and let R chose an upper limit. Something like plot(x,ylim=c(0,)) or plot(x,ylim=c(0,na

Re: [R] plot.default and open ended limits

2005-01-09 Thread Dan Bolser
On Sun, 9 Jan 2005, Thomas Lumley wrote: On Sun, 9 Jan 2005, Dan Bolser wrote: On Sun, 9 Jan 2005, [ISO-8859-1] Romain François wrote: Hello Dan, Look at the code of the plot.default function, you'll see that's not possible to specify one limit, nevertheless, you can do : Suppose I

[R] Graphical table in R

2005-01-10 Thread Dan Bolser
I would like R to produce some tabulated data in a graphical output. When I say tabulated data, what I mean is a table with rows and columns. This would be useful when reading in a big file, performing some analysis on it, and then wanting to display the results as a table. Something like

Re: [R] Graphical table in R

2005-01-10 Thread Dan Bolser
On Mon, 10 Jan 2005, Marc Schwartz wrote: On Mon, 2005-01-10 at 11:05 +, Dan Bolser wrote: I would like R to produce some tabulated data in a graphical output. When I say tabulated data, what I mean is a table with rows and columns. This would be useful when reading in a big file

Re: [R] Graphical table in R

2005-01-10 Thread Dan Bolser
Cheers. This is really me just being lazy (as usual). The latex function in Hmisc allows me to make a .ps file then grab a screen shot of that ps and make a .png file. I would just like to use plot so I can wrap it in a png command and not have to use the 'screen shot' in between. I can use

Re: [R] Graphical table in R

2005-01-11 Thread Dan Bolser
On 10 Jan 2005, Peter Dalgaard wrote: Dan Bolser [EMAIL PROTECTED] writes: Cheers. This is really me just being lazy (as usual). The latex function in Hmisc allows me to make a .ps file then grab a screen shot of that ps and make a .png file. I would just like to use plot so I can wrap

Re: [R] Graphical table in R

2005-01-12 Thread Dan Bolser
On Tue, 11 Jan 2005, Marc Schwartz wrote: On Tue, 2005-01-11 at 14:59 +, Dan Bolser wrote: On 10 Jan 2005, Peter Dalgaard wrote: Dan Bolser [EMAIL PROTECTED] writes: Cheers. This is really me just being lazy (as usual). The latex function in Hmisc allows me to make a .ps file

[R] Standard error for the area under a smoothed ROC curve?

2005-01-12 Thread Dan Bolser
Hello, I am making some use of ROC curve analysis. I find much help on the mailing list, and I have used the Area Under the Curve (AUC) functions from the ROC function in the bioconductor project... http://www.bioconductor.org/repository/release1.5/package/Source/ ROC_1.0.13.tar.gz

Re: [R] Off Topic: Statistical philosophy rant

2005-01-12 Thread Dan Bolser
On Wed, 12 Jan 2005, Berton Gunter wrote: R-Listers. The following is a rant originally sent privately to Frank Harrell in response to remarks he made on this list. The ideas are not new or original, but he suggested I share it with the list, as he felt that it might be of wider interest,

[R] chi-square and error bars?

2005-01-18 Thread Dan Bolser
This may sound crazy but... I have data like this... results.matrix [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [1,] 949 932 11 26 2076 10 5 0 3 [2,] 1233 124 24 35 58 57 17 21 31191121 Which is the result

Re: [R] way off topic

2005-01-19 Thread Dan Bolser
Try one of the sci.* news groups (google groups) you should be able to find a specific group and ask this question there. On Wed, 19 Jan 2005, Erin Hodgess wrote: Dear R People: Here is another off topic question, please: Does anyone know where to find some archaelogical data (carbon dating),

Re: [R] Hosting a R Graph Gallery?

2005-02-26 Thread Dan Bolser
On Fri, 18 Feb 2005, Romain Francois wrote: Hello Sander, That's a good idea and i am up to it. Right now i am in an exam period, so it's not really the better time, give me a couple of weeks and i will come up with a specific format of R files to submit to me that i could post-process to

[R] Question about density()

2005-03-03 Thread Dan Bolser
If I integrate over the result of the density() funcion, is the result 1? For example x - rnorm(1000) plot(density(x)) Does the area under the curve I see sum to 1? What I really want to know is if I can directly compare two particular curves, generated like this x - rnorm(1000)

[R] Plotting FAQ?

2006-03-03 Thread Dan Bolser
Hi, Since I started to make some 'final' plots of my data I found that I have tons of questions related to 'the little things'. Rather than bother the list with all the questions (ahem), or search the archives for similar questions and translate the context, I would like to find a FAQ for

Re: [R] Plotting FAQ?

2006-03-03 Thread Dan Bolser
Romain Francois wrote: Le 03.03.2006 13:13, Dan Bolser a écrit : Hi, Since I started to make some 'final' plots of my data I found that I have tons of questions related to 'the little things'. Rather than bother the list with all the questions (ahem), or search the archives for similar

Re: [R] barplot names.arg

2006-03-06 Thread Dan Bolser
Marc Schwartz (via MN) wrote: On Mon, 2006-03-06 at 15:40 +0100, Roland Kaiser wrote: How can i set a rotation for the names.arg in barplot? See R FAQ 7.27 How can I create rotated axis labels?: http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-create-rotated-axis-labels_003f

[R] Binning question (binning rows of a data.frame according to a variable)

2006-03-17 Thread Dan Bolser
Hi, I have tuples of data in rows of a data.frame, each column is a variable for the 'items' (one per row). One of the variables is the 'size' of the item (row). I would like to cut my data.frame into groups such that each group has the same *total size*. So, assuming that we order by size,

Re: [R] Binning question (binning rows of a data.frame according to a variable)

2006-03-17 Thread Dan Bolser
Dan Bolser wrote: Hi, I have tuples of data in rows of a data.frame, each column is a variable for the 'items' (one per row). One of the variables is the 'size' of the item (row). I would like to cut my data.frame into groups such that each group has the same *total size*. So

Re: [R] Binning question (binning rows of a data.frame according to a variable)

2006-03-18 Thread Dan Bolser
/17/06, Dan Bolser [EMAIL PROTECTED] wrote: Dan Bolser wrote: Hi, I have tuples of data in rows of a data.frame, each column is a variable for the 'items' (one per row). One of the variables is the 'size' of the item (row). I would like to cut my data.frame into groups such that each group has

Re: [R] Binning question (binning rows of a data.frame according to a variable)

2006-03-19 Thread Dan Bolser
Gabor Grothendieck wrote: On 3/18/06, Dan Bolser [EMAIL PROTECTED] wrote: Gabor Grothendieck wrote: If you are just looking for something simple that may be good enough then assign the largest one to group 1, the second largest to group 2, ..., the 8th largest to group 8 and then start over

Re: [R] Binning question (binning rows of a data.frame according to a variable)

2006-03-19 Thread Dan Bolser
with weights via: out3 - sample.by.group(mydf, mydf$grp, k=c(20, 20, 30, 30), replace=T) table( out3$grp ) Regards, Adai On Fri, 2006-03-17 at 16:01 +, Dan Bolser wrote: Hi, I have tuples of data in rows of a data.frame, each column is a variable for the 'items' (one per row

Re: [R] Binning question (binning rows of a data.frame according to a variable)

2006-03-20 Thread Dan Bolser
hadley wickham wrote: Thing is, for one reason or another, the number of marbles per bag may systematically vary with age too. However, I am not interested in the number of marbles per bag, so I would like to group the students into 8 groups such that each group has the same total number of

Re: [R] Binning question (binning rows of a data.frame according to a variable)

2006-03-20 Thread Dan Bolser
Gabor Grothendieck wrote: On 3/19/06, Dan Bolser [EMAIL PROTECTED] wrote: Gabor Grothendieck wrote: On 3/18/06, Dan Bolser [EMAIL PROTECTED] wrote: Gabor Grothendieck wrote: If you are just looking for something simple that may be good enough then assign the largest one to group 1

Re: [R] Binning question (binning rows of a data.frame according to a variable)

2006-03-20 Thread Dan Bolser
for the beautifully clear examples! Dan. Regards, Adai On Sun, 2006-03-19 at 18:58 +, Dan Bolser wrote: Adaikalavan Ramasamy wrote: Do you by any chance want to sample from each group equally to get an equal representation matrix ? No. I want to make groups of equal sizes, where size isn't

[R] Ternary or Triangular Plots (soil texture triangle plot)?

2006-04-03 Thread Dan Bolser
Hi, I am trying to create a triangular plot to show the 'composition' of a set of items with three variables (historically the percent sand, silt and clay in soil). So far I have tried the 'soil texture triangle plot' in the package plotrix and the 'ternary or triangular plots' in the

[R] X/Emacs and R in Linux

2004-06-01 Thread Dan Bolser
Martin Maechler said... lanceh == lanceh lanceh at ibm.net writes: lanceh Sorry if this is a redundent question but I searched the lanceh archives and although I found a couple of similar questions I lanceh saw no responses. I am running in Linux and when I try to You should

Re: [R] X/Emacs and R in Linux

2004-06-01 Thread Dan Bolser
On Tue, 1 Jun 2004, A.J. Rossini wrote: Dan Bolser [EMAIL PROTECTED] writes: Yikes! whatever happened to a good old 'INSTALL' file? There is a nice README file which you should read... People should not assume that just because you use linux you automatically know what you are doing

Re: [R] X/Emacs and R in Linux

2004-06-01 Thread Dan Bolser
/favoriteEmacsFiles/ Good look. On Tue, 1 Jun 2004, Dan Bolser wrote: Martin Maechler said... lanceh == lanceh lanceh at ibm.net writes: lanceh Sorry if this is a redundent question but I searched the lanceh archives and although I found a couple of similar questions I

[R] non-linear binning? power-law in R

2004-06-16 Thread Dan Bolser
First, thanks to everyone who helped me get to grips with R in (x)emacs (I get confused easily). Special thanks to Stephen Eglen for continued support. My question is about non-linear binning, or density functions over distributions governed by a power law ... y ~ mu*x**lambda# In one

Re: [R] non-linear binning? power-law in R

2004-06-16 Thread Dan Bolser
On Wed, 16 Jun 2004, Sean Davis wrote: Is ?cut what you need? This is giving the cleanest results yet. Cheers, Dan. Sean On 6/16/04 6:52 AM, Dan Bolser [EMAIL PROTECTED] wrote: First, thanks to everyone who helped me get to grips with R in (x)emacs (I get confused easily). Special

Re: [R] non-linear binning? power-law in R

2004-06-16 Thread Dan Bolser
looks like only 10 bins are being used at random during the run!? Hopefully you will also see what I am trying to do, which is to highlight the increased variance in the tail... How would I estimate the slope of y4bin20log? (sorry for the names). Thanks for the help, Dan. Dan Bolser wrote

Re: [R] non-linear binning? power-law in R

2004-06-16 Thread Dan Bolser
). Thanks for the help, Dan. Dan Bolser wrote: First, thanks to everyone who helped me get to grips with R in (x)emacs (I get confused easily). Special thanks to Stephen Eglen for continued support. My question is about non-linear binning, or density functions over distributions governed

Re: [R] non-linear binning? power-law in R

2004-06-18 Thread Dan Bolser
On Thu, 17 Jun 2004, Dr. Herwig Meschke wrote: Why not try to avoid binning (and density plot) at all? An alternative could be a qqplot (as a log-log-plot), e.g. plot(ppoints(length(x4)), x4[order(x4)], log=xy) abline(lm(log(x4[order(x4)])~log(ppoints(length(x4, col=red) If the assumptions

[R] Sorting elements in a data.frame

2004-06-23 Thread Dan Bolser
Hi, I have data like this print(x) ID VAL1VAL2 1 2 6 2 4 9 3 45 12 4 99 44 What I would like is data like this... ID VAL1VAL2 1 2 6 2 4 9 3 12 45 4 44 99 So that my analysis of

RE: [R] Sorting elements in a data.frame

2004-06-23 Thread Dan Bolser
On Wed, 23 Jun 2004, Liaw, Andy wrote: Do you mean: pmax(x[,1], x[,2]) / pmin(x[,1], x[,2]) Magic! I needed a p! Andy From: Dan Bolser Hi, I have data like this print(x) ID VAL1VAL2 12 6 24 9 345 12 499 44 What I

[R] Several PCA questions...

2004-06-29 Thread Dan Bolser
Hi, I am doing PCA on several columns of data in a data.frame. I am interested in particular rows of data which may have a particular combination of 'types' of column values (without any pre-conception of what they may be). I do the following... # My data table. allDat -

Re: [R] camberra distance?

2004-06-29 Thread Dan Bolser
On Tue, 29 Jun 2004, Wolski wrote: Hi! Its not an R specific question but had no idea where to ask elsewhere. Does anyone know the orginal reference to the CAMBERA DISTANCE? Eryk. Ps.: I knew that its an out of topic question (sorry). Can anyone reccomend a mailing list where such questions

Re: [R] Several PCA questions...

2004-06-29 Thread Dan Bolser
Thanks Jonathan and Brian for advise, all but for the last point I will do more background reading. To come back to the last point... Finally, I would like to make a contour plot of the above biplot, is this possible? (or even a good way to present the data? Brian said: What do you propose

Re: [R] Several PCA questions...

2004-06-29 Thread Dan Bolser
Perhaps this question is less dumb... (in context below...) On Tue, 29 Jun 2004, Prof Brian Ripley wrote: On Tue, 29 Jun 2004, Dan Bolser wrote: Hi, I am doing PCA on several columns of data in a data.frame. I am interested in particular rows of data which may have a particular

Re: [R] Several PCA questions...

2004-06-29 Thread Dan Bolser
I have the following problem cov(allDat, method='kendall') Where allDat is 11,000 by 6 data.frame. Will the above ever finish on my home computer? __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] Simple 'frequency' function?

2004-07-09 Thread Dan Bolser
Hi, I have designed the following function to extract count frequencies from an array of integers. For example... # Tipical array x - cbind(1,1,1,1,1,2,2,2,2,3,3,3,3,4,5,6,7,22) # Define the frequency function frequency - function(x){ max - max(x) j - c() for(i in 1:max){

Re: [R] Simple 'frequency' function?

2004-07-09 Thread Dan Bolser
On Fri, 9 Jul 2004, Uwe Ligges wrote: Dan Bolser wrote: Hi, I have designed the following function to extract count frequencies from an array of integers. For example... # Tipical array x - cbind(1,1,1,1,1,2,2,2,2,3,3,3,3,4,5,6,7,22) # Define the frequency function frequency

Re: [R] Simple 'frequency' function?

2004-07-09 Thread Dan Bolser
On Fri, 9 Jul 2004, Uwe Ligges wrote: Dan Bolser wrote: Hi, I have designed the following function to extract count frequencies from an array of integers. For example... # Tipical array x - cbind(1,1,1,1,1,2,2,2,2,3,3,3,3,4,5,6,7,22) # Define the frequency function frequency

Re: [R] Simple 'frequency' function?

2004-07-09 Thread Dan Bolser
On Fri, 9 Jul 2004, Marc Schwartz wrote: On Fri, 2004-07-09 at 10:43, Dan Bolser wrote: On Fri, 9 Jul 2004, Uwe Ligges wrote: Dan Bolser wrote: Hi, I have designed the following function to extract count frequencies from an array of integers. For example... # Tipical array x

  1   2   >