[R] Overplotting: plot() invocation looks ugly ... suggestions?

2006-07-24 Thread John McHenry
Hi WizaRds, I'd like to overplot UK fuel consumption per quarter over the course of five years. Sounds simple enough? Unless I'm missing something, the following seems very involved for what I'm trying to do. Any suggestions on simplifications? The way I did it is awkward mainly because of

Re: [R] Overplotting: plot() invocation looks ugly ... suggestions?

2006-07-25 Thread John McHenry
= o) On 7/24/06, Gabor Grothendieck wrote: Try: matplot(levels(data$Quarter), matrix(data$Consumption, 4), type = o) On 7/24/06, John McHenry wrote: Hi WizaRds, I'd like to overplot UK fuel consumption per quarter over the course of five years. Sounds simple enough? Unless

Re: [R] Overplotting: plot() invocation looks ugly ... suggestions?

2006-07-26 Thread John McHenry
Hi Hadley, Thanks for your suggestion. The description of ggplot states: Description: ... It combines the advantages of both base and lattice graphics ... and you can still build up a plot step by step from multiple data sources So I thought I'd try to enhance

[R] Tcltk package

2006-08-01 Thread John McHenry
Hi WizaRds, I ran into trouble trying to install the debug package, which requires TCL/TK support. It seems like the tcltk package is not installed on my system. From: http://tolstoy.newcastle.edu.au/R/help/05/07/7993.html it seems that the tcltk is bundled with the base R distribution. I'm

Re: [R] Tcltk package

2006-08-01 Thread John McHenry
for tcl and tk? And, BTW, which Linux distribution is this? i686-pc-linux-gnu is not sufficient. Ubuntu 6.06. Thanks, Jack. Peter Dalgaard [EMAIL PROTECTED] wrote: John McHenry writes: Hi WizaRds, I ran into trouble trying to install the debug package, which requires

Re: [R] Tcltk package

2006-08-03 Thread John McHenry
Hi Adrian, Thanks for the tip. I re-installed and everything seems to work just fine. Thanks, Jack. Adrian DUSA [EMAIL PROTECTED] wrote: On Tuesday 01 August 2006 19:24, John McHenry wrote: [...] Yes, I built R myself. I couldn't find a debian package for R 2.3.1. The latest available

[R] Is there a better way than x[1:length(x)-1] ?

2006-08-09 Thread John McHenry
Hi WizaRds, In MATLAB you can do x=1:10 and then specify x(2:end) to get 2 3 4 5 6 7 8 9 10 or whatever (note that in MATLAB the parenthetic index notation is used, not brackets as in R). The point is that 'end' allows you to refer to the final index point of the array. Obviously there

[R] Code for Screenshots graphics (following on from ease-of-use issues on www.r-project.org)

2006-04-26 Thread John McHenry
Does anyone know where the code for the graphics on: http://www.r-project.org/screenshots/screenshots.html lives? - [[alternative HTML version deleted]] __

[R] Elegant way to express residual calculation in R?

2006-02-27 Thread John McHenry
Hi All, I am illustrating a simple, two-way ANOVA using the following data and I'm having difficulty in expressing the predicted values succinctly in R. X- data.frame(read.table(textConnection( Machine.1Machine.2Machine.3 53 61 51

[R] Command-line editing history

2006-03-02 Thread John McHenry
Hi all, Are there any plans to add more functionality to command-line editing and history editing on the command line? In MATLAB (I know, comparisons are odious ...), you can type p and up-arrow on the command line and scroll through the recently entered commands beginning with p. This is

Re: [R] Command-line editing history

2006-03-03 Thread John McHenry
in the way that I normally work---hence the best solution, for me at least, would be to have added functionality in the R Console. Liaw, Andy [EMAIL PROTECTED] wrote: Unless I'm mistaken, all those features (and more) are available if you run R within ESS/(X)Emacs. Andy From: John McHenry

Re: [R] Command-line editing history

2006-03-03 Thread John McHenry
are available ;) Thanks, Jack. Jeffrey Horner [EMAIL PROTECTED] wrote: John McHenry wrote: Hi all, Are there any plans to add more functionality to command-line editing and history editing on the command line? Presuming you're running R from a Unix console (I'm unsure of the windows port

[R] Incrementing a counter in lapply

2006-03-13 Thread John McHenry
Hi All, I'm looking for some hints on idiomatic R usage using 'lapply' or similar. What follows is a simple example from which to generalize my question... # Suppose, in this simple example, I want to plot a number of different lines in different colors; # I define the

Re: [R] Incrementing a counter in lapply

2006-03-14 Thread John McHenry
, John McHenry wrote: Hi All, I'm looking for some hints on idiomatic R usage using 'lapply' or similar. What follows is a simple example from which to generalize my question... # Suppose, in this simple example, I want to plot a number of different lines in different colors; # I

[R] array of lists? is this the best way to do it?

2005-12-06 Thread John McHenry
[Q.] How to create an array of lists, or structures the most elegant way? There have been questions in the past but none too recently...I want to know if the following looks OK to you guys or if there is a better way to create an array of lists: # PREAMBLE ... JUST TO GET THINGS

[R] reading in data with variable length

2005-12-06 Thread John McHenry
I have very large csv files (up to 1GB each of ASCII text). I'd like to be able to read them directly in to R. The problem I am having is with the variable length of the data in each record. Here's a (simplified) example: $ cat foo.csv Name,Start Month,Data

Re: [R] reading in data with variable length

2005-12-06 Thread John McHenry
, then fill it in. I believe the array of cells in Matlab is sort of equivalent to a list in R, but that's beyond my knowledge of Matlab... Andy From: John McHenry I have very large csv files (up to 1GB each of ASCII text). I'd like to be able to read them directly in to R. The problem I am

Re: [R] reading in data with variable length

2005-12-06 Thread John McHenry
it's easy to rapidly run out of space. [EMAIL PROTECTED] wrote: On 06-Dec-05 John McHenry wrote: I have very large csv files (up to 1GB each of ASCII text). I'd like to be able to read them directly in to R. The problem I am having is with the variable length of the data in each record

Re: [R] reading in data with variable length

2005-12-06 Thread John McHenry
in 1:n) ta.num[[i]] - as.numeric(ta.split[[i]][-(1:2)]) # 4 - loop version of #2 n - length(ta) ta0 - sub(^[^,]*,[^.]*,, , ta) ta.num - list(length = n) for(i in 1:n) ta.num[[i]] - scan(t0[[i]) On 12/6/05, John McHenry wrote: I should have mentioned that I already tried the readLines

[R] Can anyone read a S-PLUS .dmp file for me?

2006-11-28 Thread John McHenry
Hi WizaRds, I tried reading the S-PLUS file ftp://ftp.research.att.com/dist/bayes-meta/hblm.dmp into R using data.restore(hblm.dmp) but I got an error: Error in attributes(value) - thelist[-match(c(.Data, .Dim, .Dimnames, : row names must be 'character' or

Re: [R] Can anyone read a S-PLUS .dmp file for me?

2006-12-06 Thread John McHenry
Anyone? John McHenry [EMAIL PROTECTED] wrote:Hi WizaRds, I tried reading the S-PLUS file ftp://ftp.research.att.com/dist/bayes-meta/hblm.dmp into R using data.restore(hblm.dmp) but I got an error: Error in attributes(value) - thelist[-match(c(.Data, .Dim

[R] Days of the week?

2007-01-24 Thread John McHenry
Hi WizaRds, What is the standard way to get the day of the week from a date such as as.Date(2006-12-01)? It looks like fCalendar has some functions but this requires a change in the R locale to GMT. Is there another way? Thanks! Jack. - Be a PS3 game guru.

Re: [R] Source Code for zoo?

2007-03-27 Thread John McHenry
Berwin, Thanks for your message. It looks like I did download the wrong file! Jack. Berwin A Turlach [EMAIL PROTECTED] wrote:That you are downloading binary distributions of packages instead of their source distribution? :-) Cheers, Berwin - Now that's

[R] Method dispatch in functions?

2007-06-28 Thread John McHenry
Hi, Could someone point me in the right direction for documentation on the following question? Let's say I have two objects a and b of classes A and B, respectively. Now let's say I write a function foo that does something similar to objects of type A and B. Basically I want to overload the