Re: [R] ?plot problem

2003-06-25 Thread Prof Brian Ripley
The critical fact here is that you called dev.off() and then re-open a device: I don't recall that being mentioned before (and it works unless you do that). dev.off() does not save the current plot (it will in 1.8.0), so you need to call recordPlot() before dev.off(). The current plot is

[R] Markov chain simulation

2003-06-25 Thread Philippe Hupé
Hi, Does anybody know a function to simulate a Markov chain given a probability transition matrix and an initial state ? Thanks. Philippe -- -- Philippe Hupé Institut Curie - Equipe Bioinformatique 26, rue d'Ulm - 75005 PARIS France +33 (0)1 42

RE: [R] excel files and R

2003-06-25 Thread Simon Fear
RODBC works fine but as far as I can tell requires that the connection be opened through Windows menus. OK for a one-off, but not for batch processing. Please someone tell me what I missed - how can I open the connection within an R script? (Windows 98)(not my fault) TIA (sorry for long

RE: [R] excel files and R

2003-06-25 Thread Morrison, Gordon
If you really want to run windows from R (in my experience it is much better to reside entirely within R) then I think that you need to use Duncan Temple Lang's RDCOM package ( http://www.omegahat.org/ ). It works well and robustly for connections to other packages and I have tested it for Excel.

RE: [R] excel files and R

2003-06-25 Thread Prof Brian Ripley
There's a function odbcConnectExcel, a wrapper to odbcDriverConnect. Neither require any work with Windows menus. On Wed, 25 Jun 2003, Simon Fear wrote: RODBC works fine but as far as I can tell requires that the connection be opened through Windows menus. OK for a one-off, but not for batch

RE: [R] excel files and R

2003-06-25 Thread Pfaff, Bernhard
There's a function odbcConnectExcel, a wrapper to odbcDriverConnect. Neither require any work with Windows menus. Try the following sample script and save it as foo.R: library(RODBC) chan1 - odbcConnectExcel(your-file.xls) aa - sqlFetch(chan1, Name of your sheet) names(aa) close(chan1) as

Re: [R] excel files and R

2003-06-25 Thread Renaud Lancelot
Simon Fear wrote: RODBC works fine but as far as I can tell requires that the connection be opened through Windows menus. OK for a one-off, but not for batch processing. Please someone tell me what I missed - how can I open the connection within an R script? (Windows 98)(not my fault) [snip] It

Re: [R] excel files and R

2003-06-25 Thread Erich Neuwirth
And there is Thomas Baier's and my RCOM package which would allow to run R from within Excel or exchange data between Excel and R with R as the main interface. Morrison, Gordon wrote: If you really want to run windows from R (in my experience it is much better to reside entirely within R) then I

[R] Sending graphical output to a printer

2003-06-25 Thread pfm401
Dear all, Does anyone know how to send graphical output to a printer using R for Windows version 1.6.2. For example if I do plot(x,y) # Sends output to the graphics window which command will let me print this graph? The reason I need to do this is to automatically print out a lot of graphs

[R] Execution of R code

2003-06-25 Thread Ted Harding
Greetings Folks, When R code (as entered or read from a courced file) is executed, is it interpreted from the input form every time having once been read in, or do subsequent invocations use an intermediate (pre-interpreted) form? Or, putting it another way, is the execution of R code faster

RE: [R] excel files and R

2003-06-25 Thread Simon Fear
Many many thanks. I did look at this but I have absolutely no idea of the background so got completely lost. Can you recommend a gentle introduction/overview to this area, based on the assumption that my current knowledge equals zero? Indeed, could you make an argument that I should ever *want* to

RE: [R] excel files and R

2003-06-25 Thread Prof Brian Ripley
On Wed, 25 Jun 2003, Simon Fear wrote: Many many thanks. I did look at this but I have absolutely no idea of the background so got completely lost. Can you recommend a gentle introduction/overview to this area, based on the assumption that my current knowledge equals zero? Indeed, could you

Re: [R] Execution of R code

2003-06-25 Thread Prof Brian Ripley
I am not sure I fully understand the Qs. There are two phases. 1) The source code is parsed. 2) The parsed code is evaluated. If you run code from source() or a file or the command line, it is parsed and evaluated. However, evaluating a function assignment makes an function object containing

[R] creating R help page

2003-06-25 Thread Vincent Spiesser
Hello Does anybody know how to create an R help page wich can be opened from R console (like help(glm)) ? Particularly, I would like to know : - what kind of file the help file is ? - Where does it take place ? Thanks Vincent Spiesser __ [EMAIL

RE: [R] excel files and R

2003-06-25 Thread Ted Harding
On 25-Jun-03 Simon Fear wrote: [...] I think I just want to get the data from Excel ('cos that's how it nearly always comes), but I don't want to process it in Excel, when I have R ... In that case there is a very simple solution (asuming you have access to Excel). Open the Excel file in

Re: [R] creating R help page

2003-06-25 Thread Prof Brian Ripley
See the `Writing R Extensions' manual. On Wed, 25 Jun 2003, Vincent Spiesser wrote: Does anybody know how to create an R help page wich can be opened from R console (like help(glm)) ? Particularly, I would like to know : - what kind of file the help file is ? - Where does it take place ?

Re: [R] Execution of R code

2003-06-25 Thread Ted Harding
On 25-Jun-03 Prof Brian Ripley wrote: I am not sure I fully understand the Qs. [...] I hope that actually answers your questions. Thanks, Brian! You have exactly understood, and fully answered, my questions. Best wishes, Ted.

Re: [R] Execution of R code

2003-06-25 Thread Peter Dalgaard BSA
Prof Brian Ripley [EMAIL PROTECTED] writes: I am not sure I fully understand the Qs. There are two phases. 1) The source code is parsed. 2) The parsed code is evaluated. If you run code from source() or a file or the command line, it is parsed and evaluated. However, evaluating a

RE: [R] excel files and R

2003-06-25 Thread partha_bagchi
Simon, Here is what I do when I encounter an excel spreadsheet. I save it as a CSV file (in excel - save as - file type CSV) and then read the corresponding file into R using read.csv. Hope that helps, Partha Simon Fear [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 06/25/2003 06:16 AM

RE: [R] Sending graphical output to a printer

2003-06-25 Thread Liaw, Andy
Use dev.print(win.print) after the plot is done. This is in the help page (?windows). Andy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 5:46 AM To: [EMAIL PROTECTED] Subject: [R] Sending graphical output to a printer Dear

[R] Help on using read.table with files containing dates

2003-06-25 Thread Chriss, Neil
I am a relatively new user of R and have a question about using the read.table command for reading in .csv files that contain dates. My ultimate goal is to be able to read several different files into data frames and then do a merge along the Date column of each data frame. It seems I should be

Re: [R] cumulative frequency distribution plot

2003-06-25 Thread Gijsbert Stoet
To plot a cumulative distribution of, say a behaviorial reaction time vector, I wrote the following function: cumhist = function(x) { Z = hist( x , plot=F ) plot(1:length(Z$counts),cumsum(Z$counts)/length(x)*100,type=b,axes=F, ylab=%,xlab=)

Re: [R] Help on using read.table with files containing dates

2003-06-25 Thread Prof Brian Ripley
On Wed, 25 Jun 2003, Chriss, Neil wrote: I am a relatively new user of R and have a question about using the read.table command for reading in .csv files that contain dates. Unfortuantely them appear to contain perversions of dates, not the dates recognised by the ISO standard. I read your

[R] equivalence test

2003-06-25 Thread Meles MELES
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, is it possible to do an equivalence test on paired quantitative datas in R? Is there a way to calculate sample size for such tests? I've tried to find some documentation on that subject but I was unsuccessfull. I'll be happy with any

[R] Mac carbon - foreign - read.spss

2003-06-25 Thread Jean-Pierre Muller
Hello, Can someone confirm that read.spss doesn't work with usual (old) mac paths (disk:dir:dir:file), but only with *nix path (Volumes/disk/...)? rm171 (carbon) - MacOSX 10.2.6 Thanks. -- -- Jean-Pierre Muller SSP /

[R] predict formula with variables

2003-06-25 Thread orkun
Hello On the subject of using predict formula with variables, I used cbind(var1,var2,var3,var4, predict(glm.obj,type=resp)) to find probability of each combinations. However,I am still hesitant whether I have done it correctly. Is it correct ? thanks in advance Ahmet Temiz Turkey

Re: [R] excel files and R

2003-06-25 Thread Duncan Murdoch
On Wed, 25 Jun 2003 11:51:44 +0100 (BST), you wrote in message [EMAIL PROTECTED]: The Excel .xls format is poorly documented, probably deliberately obfuscated. A direct interface is on the TODO list: it should be quite easy in Windows and possible in other OSes (there is code in Gnumeric, for

RE: [R] excel files and R

2003-06-25 Thread Marc Schwartz
On Wed, 2003-06-25 at 09:20, Thomas Lumley wrote: On Wed, 25 Jun 2003, Simon Fear wrote: I guess all that I and apparently others really want is that foreign might include read.excel, like it has read.sas and read.spss. Which is essentially what Bernhard Pfaff's recent post offers -

Re: [R] Mac carbon - foreign - read.spss

2003-06-25 Thread Prof Brian Ripley
On Wed, 25 Jun 2003, Jean-Pierre Muller wrote: Can someone confirm that read.spss doesn't work with usual (old) mac paths (disk:dir:dir:file), but only with *nix path (Volumes/disk/...)? rm171 (carbon) - MacOSX 10.2.6 The exact code used to open files is (variations on) FILE *fp =

RE: [R] R-1.7.1 regression test failure on alphaev68-dec-osf5.1

2003-06-25 Thread Jeff Lewis
Thanks for the quick response. The two sides of the equality are definately different. Here's what I'm seeing =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= pi [1] 3.141593 1i [1] 0+1i pi*1i [1] 0+3.141593i exp(pi*1i) [1] -1+1.224647e-16i

[R] Course***Advanced R/Splus Programming in San Francisco,July 24-25, 2003 by XLsolutions Corp.

2003-06-25 Thread elvis
XSolutions Corp (www.xlsolutions-corp.com) is proud to announce a 2-day Advanced R/Splus programming taught by R Development Core Team Guru! *San Francisco -- July 24-25, 2003 Early-bird discount ends June 30! Reserve your seat Now (payment due after the

Re: [R] Reading graphics files

2003-06-25 Thread drf5n
On Tue, 24 Jun 2003, Roger Bivand wrote: ... library(pixmap), perhaps? Reads PNM (so PPM, PGM, PBM). Thanks! This is precisely what I was looking for. I had gotten to the point of: con-file(image.ppm,open=rb) readLines(con,n=3) [1] P6 600 400 255

[R] Help

2003-06-25 Thread Tomer Maymon
hi my name is Tomer,im using R version 1.4 i've encontered a couple of problems with my my R programing. 1. i cant understand what is the whights in the nnet$wts command(which weight fit to the nodes). 2.my OS is Windows XP , i want to operate R from the command line and i want it to operate a

[R] rw1062

2003-06-25 Thread Søren Merser
hi I need 'rw1062.zip' since i can't get excel, R1070 or R1071 to work with the R (D)COM Server everything worked fine in the god rw1062 days the lapack routines can't be loaded 'unable to load shared library c:\r/moduleslapack.dll, the specified library could not be found' don't know if it's

Re: [R] Help

2003-06-25 Thread Prof Brian Ripley
On Wed, 25 Jun 2003, Tomer Maymon wrote: my name is Tomer,im using R version 1.4 As the current version is 1.7.1 (and there never was a 1.4), you need to upgrade. i've encontered a couple of problems with my my R programing. 1. i cant understand what is the whights in the nnet$wts

Re: [R] rw1062

2003-06-25 Thread Prof Brian Ripley
The problem is that you have not put the rw1071/bin directory in your path, and so your DCOM-using application is unable to find the dependent DLLs of R. This is a problem with the R (D)COM instructions. On Wed, 25 Jun 2003, Søren Merser wrote: I need 'rw1062.zip' since i can't get excel,

Re: [R] excel files and R

2003-06-25 Thread Dirk Eddelbuettel
On Wed, Jun 25, 2003 at 10:02:07AM -0500, Marc Schwartz wrote: Yet another would be Gnumeric, which like Calc is GPL'd and can read and write native Excel file formats. The Gretl econometrics package (http://gretl.sf.net) also has a small library for reading Excel files (in the file

[R] sampling

2003-06-25 Thread Liliana Forzani
I need to know if there is a way in r to apply the hidiroglou lavalle algorithm...thanks __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

RE: [R] rw1062

2003-06-25 Thread David Khabie-Zeitoune
On the subject of the LAPACK error -- I also had this problem with the R (D)COM package. It appears that there is a problem accessing the newer LAPACK routines rather than the original LINPACK routines which were built into R. I sent a query to the r-com mailing list and found the following

RE: [R] excel files and R

2003-06-25 Thread Norm Phillips
I have to remove the dollar sign from the end of the sheet names. There's a function odbcConnectExcel, a wrapper to odbcDriverConnect. Neither require any work with Windows menus. Try the following sample script and save it as foo.R: library(RODBC) chan1 -

[R] logLik.lm()

2003-06-25 Thread Edward Dick
Hello, I'm trying to use AIC to choose between 2 models with positive, continuous response variables and different error distributions (specifically a Gamma GLM with log link and a normal linear model for log(y)). I understand that in some cases it may not be possible (or necessary) to

Re: [R] logLik.lm()

2003-06-25 Thread Achim Zeileis
On Wednesday 25 June 2003 20:23, Edward Dick wrote: Hello, I'm trying to use AIC to choose between 2 models with positive, continuous response variables and different error distributions (specifically a Gamma GLM with log link and a normal linear model for log(y)). I understand that in some

[R] robust regression

2003-06-25 Thread Rafael Bertola
Is there a command in R that make the same regression like l1fit in S-plus? -- [EMAIL PROTECTED] -- __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Re: [R] logLik.lm()

2003-06-25 Thread Prof Brian Ripley
Your by-hand calculation is wrong -- you have to use the MLE of sigma^2. sum(dnorm(y, y.hat, sigma * sqrt(16/18), log=TRUE)) Also, this is an inappropriate use of AIC: the models are not nested, and Akaike only proposed it for nested models. Next, the gamma GLM is not a maximum-likelihood fit

Re: [R] robust regression

2003-06-25 Thread Prof Brian Ripley
You can use the quantreg package. However, neither l1fit nor that do `robust regression', so you need to think more carefully about what you really want. There are almost always better alternatives than L1 fits. On Wed, 25 Jun 2003, Rafael Bertola wrote: Is there a command in R that make

Re: [R] Markov chain simulation

2003-06-25 Thread Christian Schulz
Is the Markov chain Monte Carlo (MCMC) Package perhaps something for you!? christian - Original Message - From: Philippe Hupé [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 10:01 AM Subject: [R] Markov chain simulation Hi, Does anybody know a function to

Re: [R] NLME Covariates

2003-06-25 Thread Andrew Perrin
I am foggy on this myself, but I *think* it is inferred from the grouping structure in the call to (n)lme or in the groupedData data structure. Have a look at ?groupedData in R for more details. ap -- Andrew J Perrin -

Re: [R] logLik.lm()

2003-06-25 Thread Spencer Graves
Dear Prof. Ripley: I gather you disagree with the observation in Burnham and Anderson (2002, ch. 2) that the complexity penalty in the Akaike Information Criterion is a bias correction, and with this correction, they can use density = exp(-AIC/2) to compute approximate posterior

Re: [R] logLik.lm()

2003-06-25 Thread Prof Brian Ripley
On Wed, 25 Jun 2003, Spencer Graves wrote: Dear Prof. Ripley: I gather you disagree with the observation in Burnham and Anderson (2002, ch. 2) that the complexity penalty in the Akaike Information Criterion is a bias correction, and with this correction, they can use density =

[R] probelem of function inside function

2003-06-25 Thread array chip
Hi, I encountered a problem when I am trying to write my own function which contains another function. To simplify a problem, I tried the following simplified function, hope someone can idenfity the problem for me. I have a simple data frame called testdata as following:

[R] This item has been released from quarantine.

2003-06-25 Thread SymantecAlerts
This file, which was attached to the message titled R-help Digest, Vol 4, Issue 25 by [EMAIL PROTECTED] and was quarantined on 6/25/2003 3:18 AM, has been released. NOTE: If AutoProtect is enabled, then this restored attachment will be rescanned during the restore. If the attachment is still

Re: [R] excel files and R

2003-06-25 Thread Fan
For loading Excel data and many others file formats, one possibility is to use the free conversion utility: DataLoad. See: http://www.vsn-intl.com/genstat/downloads/datald.htm (there're probably also other links) It should be easy to create R wrappers to use that utility. Cheers -- Fan Marc

[R] within group variance of the coeficients in LME

2003-06-25 Thread Andrej Kveder
Dear listers, I can't find the variance or se of the coefficients in a multilevel model using lme. I want to calculate a Chi square test statistics for the variability of the coefficients across levels. I have a simple 2-level problem, where I want to check weather a certain covariate varies

[R] DB2 ODBC

2003-06-25 Thread Babu Prathap R
Hi, I need to do some statistical analysis of data that is stored in IBM DB2 UDB 8.1 using R. I understand that I need to use R ODBC. But I would like to know more about how to go about this. I apprecaite your help. Thanks Babu __ [EMAIL PROTECTED]

RE: [R] within group variance of the coeficients in LME

2003-06-25 Thread Harold Doran
lme does not produce standard errors for the variance components like HLM does. It does produce SEs for the fixed effects, however, along with t-statistics and p-values, just like HLM. Use the summary() command to see these. When you do this, you will get the AIC, BIC, and loglik values. Just

RE: [R] probelem of function inside function

2003-06-25 Thread Simon Blomberg
Your function works fine for me (R 1.7.1, Windows 2000): library(MASS) testdata-data.frame(cbind(x=c(129,109,52,118,217,278,606,198,99,133),y=c(89,118,99,137,34,14,130,30,131,30))) f.fun-function(var,fdata) { + fdata-data.frame(fdata) + fit-lm(y~1,data=fdata) + +

Re: [R] probelem of function inside function

2003-06-25 Thread Thomas Lumley
On Wed, 25 Jun 2003, array chip wrote: Hi, I encountered a problem when I am trying to write my own function which contains another function. To simplify a problem, I tried the following simplified function, hope someone can idenfity the problem for me. snip

Re: [R] probelem of function inside function

2003-06-25 Thread array chip
Actually, It is the question I encountered in S-Plus. Sorry that I forgot to mention. As Simon just pointed out, the function works fine in R (Thanks!). But in any case, does anyone know how to solve the problem in S-Plus? Thanks --- Thomas Lumley [EMAIL PROTECTED] wrote: On Wed, 25 Jun 2003,

[R] Random Number Testing

2003-06-25 Thread dcum007
I would like to thank all of you who replied to my last question regarding the generation of random numbers. I have read much about the theory and have been fortunate to find some rng code. Now my task lies in testing the randomness of these rng's. In the literature, there are many tests that

[R] RE: Movie

2003-06-25 Thread Jesus of Nazareth
My Child, This is getting truly annoying. I know I invented the concept of brotherly love and all, but really...go fuck yourself. Love, Jesus -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 4:23 PM To: [EMAIL PROTECTED]

[R] nonlinear constraint optimization function in R?

2003-06-25 Thread SUNDUZ Keles
Dear all, I am looking for a R-function that performs nonlinear constraint optimization (where the objective function and the constraints are allowed to be nonlinear). More specifically, I am trying to figure out whether there is an equivalent function of NAG fortran library' E04UCF or

[R] Votre courrier est rejeté

2003-06-25 Thread antiv
A L E R T E V I R U S Notre antivirus a détecté le VIRUS W32/[EMAIL PROTECTED] dans votre courrier destiné à : - [EMAIL PROTECTED] Nous refusons de le transmettre. Nous vous conseillons de décontaminer votre poste de travail. Pour

[R] Re: Application

2003-06-25 Thread W3C Postmaster
This is an autoreply to a message you have sent to [EMAIL PROTECTED]. Arnaud Le Hors no longer works for W3C; he may be now reached at [EMAIL PROTECTED]. Please resend your message there. Thanks, -- W3C Postmaster [EMAIL PROTECTED]

Re: [R] Markov chain simulation

2003-06-25 Thread kjetil brinchmann halvorsen
On 25 Jun 2003 at 10:01, Philippe Hupé wrote: For small transistion matrices (which seems to be what you ask for), something like this: P - matrix( c(0.2, 0.5, 0.5, 0.1, 0.8, 0.1, + 0.2, 0.1, 0.7), 3,3, byrow=TRUE) simMarkov - function( P, len=1000) { +n - NROW(P) +

[R] Residual plotting

2003-06-25 Thread wildscop
Dear all, So far i could do (in an informal way) to draw a Standardized Resisual plot in the following way- - x - c(104.1, 106.6, 105.5, 107.5, 109.6, 113.3, 115.5, 117.7, 119.9, 122.1, 124.3, 126.5, 128.2) y - c(53732, 52912, 57005, 61354, 67682, 71602, 71961, 75309, 82931,

RE: [R] Residual plotting

2003-06-25 Thread Simon Blomberg
-Original Message- From: wildscop [mailto:[EMAIL PROTECTED] Sent: Thursday, 26 June 2003 2:11 PM To: [EMAIL PROTECTED] Subject: [R] Residual plotting [snip] Or, in the formal way (using s-plus functions), in the following way, but i get stuck in the Resisual plot stage,