Re: [R] R tools for large files

2003-08-26 Thread Murray Jorgensen
I would like to thank those who have responded and especially Brian Ripley for making his unix tools for Windows available. A colleague has also mentioned to me the set of unix tools called Cygwin. Two things that can be done with R alone are to read the first n lines of a file into n strings

Re: [R] R tools for large files

2003-08-26 Thread Richard A. O'Keefe
Murray Jorgensen [EMAIL PROTECTED] wrote: Large for my purposes means more than I really want to read into memory which in turn means takes more than 30s. I'm at home now and the file isn't so I'm not sure if the file is large or not. I repeat my earlier

[R] ODBC Oracle access

2003-08-26 Thread Toby.Patterson
Hi all, I'm having trouble connecting to an oracle database using RODBC under winXP. Unfortunately I can't really send a reproducable error as the initial call to odbcConnect seems to hangs R and I have to kill the session. I have been using RODBC to sucessfully connect to an MS Access DB that

Fwd: Re: [R] Problem running RTERM via SSH on Windows/2000

2003-08-26 Thread Bruce Moore
rterm --ess --save works fine under both openssh and under putty SSH clients. Thanks! --- Prof Brian Ripley [EMAIL PROTECTED] wrote: Date: Fri, 22 Aug 2003 19:41:35 +0100 (BST) From: Prof Brian Ripley [EMAIL PROTECTED] To: Bruce Moore [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re:

Re: [R] diamond graphs

2003-08-26 Thread Richard A. O'Keefe
Scott Zeger [EMAIL PROTECTED] commented: First, diamond graphs were developed as part of the Multi-center Aids Cohort Study, a seminal study of HIV infection in the U.S. in which these authors have been key co-investigators. The graphs were created to better address

RE: [R] R tools for large files

2003-08-26 Thread Liaw, Andy
From: Richard A. O'Keefe [mailto:[EMAIL PROTECTED] Murray Jorgensen [EMAIL PROTECTED] wrote: Large for my purposes means more than I really want to read into memory which in turn means takes more than 30s. I'm at home now and the file isn't so I'm not sure if the file is

RE: [R] R tools for large files

2003-08-26 Thread Mulholland, Tom
As some of the conversation has noted the 30 second mark as an arbitrary benchmark I would also chime in that there is also an assumption that any non-R related issues that impact upon being able to usefully use R should be ignored. In the real world we can't always control everything about our

Re: [R] Encapsulated postscript and the family argument

2003-08-26 Thread Prof Brian Ripley
On Tue, 26 Aug 2003, Patrick Connolly wrote: On Mon, 25-Aug-2003 at 08:03AM +0100, Prof Brian Ripley wrote: | On Mon, 25 Aug 2003, Patrick Connolly wrote: | | version [...] | However, what wasn't obvious to me was that it is necessary to specify | what family to use. If no family

[R] plot empirical pdf

2003-08-26 Thread Ott Toomet
Hi, are there any function to plot the empirical probability distribution function? I just don't want to reinvent the wheel... Best wishes, Ott -- Ott Toomet PhD Student Dept. of Economics Århus University Building 322 Universitetsparken 8000 Århus C Denmark otoomet (a) econ au dk ph:

[R] Subsetting a dataframe

2003-08-26 Thread a0203664
Hi R-people I have a question concerning subsetting. I have a dataframe which contains among other variables the variable subject. For each subject number there are several rows, e.g.: subject treatment concentration day 19 a 15,4 1 19 a 18,3 2 19

[R] Subsetting a dataframe

2003-08-26 Thread a0203664
Hi R-people I have a question concerning subsetting. I have a dataframe which contains among other variables the variable subject. For each subject number there are several rows, e.g.: subject treatment concentration day 19 a 15,4 1 19 a 18,3 2 19

Re: [R] plot empirical pdf

2003-08-26 Thread Adelchi Azzalini
On Tuesday 26 August 2003 08:47, Ott Toomet wrote: Hi, are there any function to plot the empirical probability distribution function? I just don't want to reinvent the wheel... try this, regards, Adelchi -- n - 10 x - rnorm(n) plot(c(min(x)-1,sort(x), max(x+1)), c(0:n,n)/n, type=s,

Re: [R] plot empirical pdf

2003-08-26 Thread Uwe Ligges
Ott Toomet wrote: Hi, are there any function to plot the empirical probability distribution function? I just don't want to reinvent the wheel... Best wishes, Ott See package stepfun. Uwe Ligges __ [EMAIL PROTECTED] mailing list

Re: [R] Subsetting a dataframe

2003-08-26 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: Hi R-people I have a question concerning subsetting. I have a dataframe which contains among other variables the variable subject. For each subject number there are several rows, e.g.: subject treatment concentration day 19 a 15,4 1 19

Re: [R] plot empirical pdf

2003-08-26 Thread Martin Maechler
Ott == Ott Toomet [EMAIL PROTECTED] on Tue, 26 Aug 2003 08:47:28 +0200 writes: Ott Hi, are there any function to plot the empirical Ott probability distribution function? I just don't want Ott to reinvent the wheel... As Uwe has already said, the standard stepfun package does

RE: [R] ODBC Oracle access

2003-08-26 Thread Marc Mamin
Hallo Toby, Did you check the ODBC connection independently from R? there is an Oracle tool for this (under Menu Network Administration). I'm doing fine with a simpler call to odbcConnect: channel -odbcConnect(MyDSN,uid=myuid,pwd=mypwd) further parameters may not be necessary if you pay

Re: [R] R tools for large files

2003-08-26 Thread Ted Harding
This has been an interesting thread! My first reaction to Murray's query was to think use standard Unix tools, especially awk, 'awk' being a compact, fast, efficient program with great powers for processing lines of data files (and in particular extracting, subsetting and transforming

Re: [R] R tools for large files

2003-08-26 Thread Murray Jorgensen
Hi Martin, I don't know much about the concept of connection but I had supposed it to at least include the concept of file and perhaps also input device and output device'. I guess the important point that you are making is that it is sequential in the sense that you describe. I suppose at

RE: [R] R tools for large files

2003-08-26 Thread David Khabie-Zeitoune
A starting point might be the string splitting function strsplit For example, X = c(1,4,5 1,2,5 5,1,2) strsplit(X) [[1]] [1] 1 4 5 [[2]] [1] 1 2 5 [[3]] [1] 5 1 2 This returns a list of the parsed vectors. Next you can do something like: Z = data.frame(matrix(unlist(X), nrow = 3, byrow=T))

Re: [R] R tools for large files

2003-08-26 Thread Ted Harding
On 26-Aug-03 Prof Brian Ripley wrote: On Tue, 26 Aug 2003 [EMAIL PROTECTED] wrote: [...] X [1] 1,4,5 1,2,5 5,1,2 Now my Question: [...] In other words, how to convert a vector of character strings, each of which is in comma-separated format as above, into the rows of a data-frame

[R] bootstrapping nlme fits (was boot function)

2003-08-26 Thread Brunschwig, Hadassa {PDMM~Basel}
(see archives for former discussion) I probably didnt express myself very well in the last mail i wrote. The dataset contains the variables subject, day, concentration(measured). I would like to bootstrap the variable subject. Now it is true that the subjects wont be independent in the

[R] coxph.control

2003-08-26 Thread Gareth Hughes
How can I specify the maximum number of iterations in coxph whilst also specifying my model?? I can't find any on-line examples. Thanks __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

[R] Exporting R graphs

2003-08-26 Thread ucgamdo
Hi, I have been a happy user of R for windows for more than a year, however, recently, I started using linux as my operating system and now I have practically switched completely. Of course, I still use R with linux, however, certain nice features of R in windows seem to be missing or

Re: [R] coxph.control

2003-08-26 Thread Ramon Diaz-Uriarte
Dear Gareth, ?coxph.control (which we are told to check from ?coxph) contains an argument for maxiter. Best, R. On Tuesday 26 August 2003 13:51, Gareth Hughes wrote: How can I specify the maximum number of iterations in coxph whilst also specifying my model?? I can't find any on-line

RE: [R] Subsetting a dataframe

2003-08-26 Thread Simon Fear
Or subset(nameofdataset, subject %in% c(15,19)) which does the right thing if subject should be missing (unlikely in this example I know, but likely to be a different story if conditioning on concentration, say). A pity subset() and transform() are not mentioned in the subsetting section of

Re: [R] R tools for large files

2003-08-26 Thread Duncan Murdoch
Murray: You said that you wanted more control over the selection of lines than scan() was giving you. This may have been suggested by someone else (there have been a lot of messages in this thread!), but I think what you want to do is to roll your own reader, using textConnection. For example,

Re: [R] Exporting R graphs

2003-08-26 Thread Duncan Murdoch
On Tue, 26 Aug 2003 12:46:23 +0100, [EMAIL PROTECTED] wrote : 2. In windows, I could 'record' a graph, and then undo any changes made. For example, if I misplaced a text label somewhere, I could go back and place it again properly without having to re-plot everything again. Can you post an

[R] VIRUS DANS VOTRE MAIL

2003-08-26 Thread postmaster
V I R U S A L E R T Notre antivirus a trouvé le(s) virus W32/[EMAIL PROTECTED] dans votre mail vers le(s) destinataire(s) suivant(s): - [EMAIL PROTECTED] SVP, nettoyez votre système de tous ces virus avant de renvoyer ce mail. Pour information, voici les

Re: [R] discriminant function

2003-08-26 Thread Torsten Hothorn
On 26 Aug 2003, Stefan [ISO-8859-1] Böhringer wrote: How can I extract the linear discriminant functions resulting from a LDA analysis? The coefficients are listed as a result from the analysis but I have not found a way to extract these programmatically. No refrences in the archives were

Re: [R] discriminant function

2003-08-26 Thread Frank Gibbons
Stefan, I asked the same question last week. As Brian Ripley, its author, said then (and others), the only way to see what's going on is to read the code. It's pretty complicated statistically (that's why the performance is so good!), many of the details are in chapter 2 of Pattern Recognition

Re: [R] Exporting R graphs

2003-08-26 Thread Thomas Lumley
On Tue, 26 Aug 2003 [EMAIL PROTECTED] wrote: 1. In windows, I could copy the contents of a window graphic's device as a windows metafile, and then I could paste the metafile into OpenOffice draw. The advantage of doing this is that I could then manipulate my graph as a vector object and get

Re: [R] R tools for large files

2003-08-26 Thread Douglas Bates
David Khabie-Zeitoune [EMAIL PROTECTED] writes: For example, X = c(1,4,5 1,2,5 5,1,2) I think you meant X = c(1,4,5, 1,2,5, 5,1,2) A simpler approach is to use a textConnection which allows you to read a vector of character strings as if they were lines in a file.

[R] Simple simulation in R

2003-08-26 Thread Peter Flom
Hello all I have a feeling this is very simple..but I am not sure how to do it My boss has two variables, one is an average of 4 numbers, the other is an average of 3 of those numbers i.e var1 = (X1 + X2 + X3 + X4)/4 var2 = (X1 + X2 + X3)/3 all of the X variables are supposed to be

Re: [R] diamond graphs

2003-08-26 Thread Barry Rowlingson
Can I just check something? If I write some code in R to produce these diamond graphs - I reckon 20-30 lines should do it - and post it to R-help, have I broken the law if there's a patent on them? If I produce these graphs using a pen, paper and my own artistic skill, will that make me liable

Re: [R] Exporting R graphs

2003-08-26 Thread Tito de Morais Luis
Hi, I use jpeg or png to export my graphs and I can edit them with the gimp and add anything to them. I can then export them into several formats, or open the jpeg file with openoffice. As Thomas suggests you can also use xfig. xfig can also export its graphs to many other formats. see ?jpeg and

Re: [R] Exporting R graphs

2003-08-26 Thread Marc Schwartz
On Tue, 2003-08-26 at 06:46, [EMAIL PROTECTED] wrote: Hi, I have been a happy user of R for windows for more than a year, however, recently, I started using linux as my operating system and now I have practically switched completely. Of course, I still use R with linux, however,

Re: [R] Simple simulation in R

2003-08-26 Thread Thomas Petzoldt
Hello all I have a feeling this is very simple..but I am not sure how to do it My boss has two variables, one is an average of 4 numbers, the other is an average of 3 of those numbers i.e var1 = (X1 + X2 + X3 + X4)/4 var2 = (X1 + X2 + X3)/3 Hello Peter, try the following:

Re: [R] diamond graphs

2003-08-26 Thread Marc Schwartz
On Tue, 2003-08-26 at 09:23, Barry Rowlingson wrote: Can I just check something? If I write some code in R to produce these diamond graphs - I reckon 20-30 lines should do it - and post it to R-help, have I broken the law if there's a patent on them? If I produce these graphs using a pen,

[R] Viewing function source

2003-08-26 Thread Paul Meagher
I know I should probably RTFM for this question, but could someone tell me if R supports the idea of viewing source on any particular function you want to use? If I want to view source on the rpois() function, for example, can I do somethink like: source(rpois) To see how the function is

RE: [R] Simple simulation in R

2003-08-26 Thread Liaw, Andy
I believe simple math stat calculations should be sufficient for this. For simplicity, assume X1 through X4 are iid with mean m and variance v. Note that var1 = (3*var2 + x4) / 4 so cov(var1, var2) = cov(var2, (3*var2 + x4)/4) and since var2 and x4 are independent, this covariance can

Re: [R] Viewing function source

2003-08-26 Thread Barry Rowlingson
Paul Meagher wrote: If I want to view source on the rpois() function, for example, can I do somethink like: source(rpois) To see how the function is implemented? You mean you've never typed 'ls' instead of 'ls()' and discovered this for yourself? I still do it all the time, and I've been

Re: [R] Viewing function source

2003-08-26 Thread Jeff Gentry
If I want to view source on the rpois() function, for example, can I do somethink like: source(rpois) To see how the function is implemented? Just type the name of the function __ [EMAIL PROTECTED] mailing list

Re: [R] Viewing function source

2003-08-26 Thread Prof Brian Ripley
Most of the time you just use rpois or, to use a pager, page(rpois) For some functions the function is hidden from the end user, and for those (indeed, for any object the system can find) you can use getAnywhere(foo.bar) In your example, it will not be too revealing: rpois function (n,

Re: [R] Viewing function source

2003-08-26 Thread Thomas Lumley
On Tue, 26 Aug 2003, Paul Meagher wrote: I know I should probably RTFM for this question, but could someone tell me if R supports the idea of viewing source on any particular function you want to use? If I want to view source on the rpois() function, for example, can I do somethink like:

Re: [R] Viewing function source

2003-08-26 Thread Paul Meagher
Just type the name of the function to see the R code rpois function (n, lambda) .Internal(rpois(n, lambda)) But in this case it tells you that rpois is implemented in C code :( By convention, it is likely to be a function called do_rpois, however in this case we have an exception

[R] Getting out of an embedded function safely - use try?

2003-08-26 Thread Andy Bunn
Helpers. An instrument sends me data that is mostly nonlinear. I have a group of functions to manipulate this data so that it is useful to the user. One of them involves a nls model that called to fit a line to the data and returns the fits. This works well 99 out of 100 times. Occasionally, the

[R] Mann-Whitney U Table

2003-08-26 Thread Mark Lamias
Does anyone have a piece of code or know how I can use R to generate a table of critical values for the Mann-Whitney (aka Wilcoxon Rank Sum) test. Ideally, I'd like a table that contains the critical values for any two samples of size 3 through 30. I could use Monte Carlo simulation or the

Re: [R] Poisson generation (was Viewing function source)

2003-08-26 Thread Prof Brian Ripley
See any good book on simulation: one from 1987 springs to mind. The hard issue is to find a method that works near optimally for all values of lambda, especially moderately large ones. No simple algorithm does that, and for something like R, the issue is not compactness but good worst-case

RE: [R] Mann-Whitney U Table

2003-08-26 Thread Liaw, Andy
See ?qwilcox. Andy -Original Message- From: Mark Lamias [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 26, 2003 2:56 PM To: '[EMAIL PROTECTED]' Cc: Mark Lamias Subject: [R] Mann-Whitney U Table Does anyone have a piece of code or know how I can use R to generate a table of

[R] R on Linux/Opteron?

2003-08-26 Thread Liaw, Andy
Dear R-help: Has anyone tried using R on the the AMD Opteron in either 64- or 32-bit mode? If so, any good/bad experiences, comments, etc? We are considering getting this hardware, and would like to know if R can run smoothly on such a beast. Any comment much appreciated. Best, Andy Andy

[R] rfImpute (for randomForest) crashed

2003-08-26 Thread David Parkhurst
In trying to execute this line in R (Version 1.7.1 (2003-06-16), under windows XP pro), with the randomForest library (about two weeks old) loaded, the program crashed: bost4rf - rfImpute(TargetDensity~.,data=bost4rf0) Specifically, an XP dialog box popped up, saying R for windows GUI front-end

Re: [R] Getting out of an embedded function safely - use try?

2003-08-26 Thread Douglas Bates
Andy Bunn [EMAIL PROTECTED] writes: Helpers. An instrument sends me data that is mostly nonlinear. I have a group of functions to manipulate this data so that it is useful to the user. One of them involves a nls model that called to fit a line to the data and returns the fits. This works

Re: [R] R on Linux/Opteron?

2003-08-26 Thread Luke Tierney
I've had a chance to build R-devel on one running SuSE (not sure which release). confugure set things up for a 64-bit build that passed all tests. The base tests ran about 25% faster on the 1.4GHz opteron than a2GHz Xeon. That's as much as I know at this point. luke On Tue, 26 Aug 2003, Liaw,

RE: [R] rfImpute (for randomForest) crashed

2003-08-26 Thread Liaw, Andy
Dave, If possbile, please send me (privately) the data that caused the crash and I'll have a look. Andy -Original Message- From: David Parkhurst [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 26, 2003 3:37 PM To: [EMAIL PROTECTED] Subject: [R] rfImpute (for randomForest)

[R] matching-case sensitivity

2003-08-26 Thread Jablonsky, Nikita
Hi All, I am trying to match two character arrays (email lists) using either pmatch(), match() or charmatch() functions. However the function is missing some matches due to differences in the cases of some letters between the two arrays. Is there any way to disable case sensitivity or is there an

[R] Package for Numerical Integral?

2003-08-26 Thread Yao, Minghua
Dear all, Is there any package for numerically calculating an integral? Thanks in advance. -Minghua __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Re: [R] Viewing function source

2003-08-26 Thread Thomas Lumley
On Tue, 26 Aug 2003, Paul Meagher wrote: Personally, I would like to see a counting process implementation of an poisson random number generator. I suspect it would be much slower than rpois.c (because it would likely depend upon setting a num_frames iteration counter) and less accurate,

Re: [R] Viewing function source

2003-08-26 Thread Ted Harding
On 26-Aug-03 Thomas Lumley wrote: You can generate Poisson random numbers from a Poisson process like this: rfishy-function(lambda){ t - 0 i - -1 while(t=lambda){ t-t-log(runif(1)) i-i+1 } return(i) } You can of course easily vectorise this: