Re: [R] Factors.

2004-07-07 Thread Uwe Ligges
[last week,] [EMAIL PROTECTED] wrote: Hello, I'm new with R. I need some help; I have a matrix of data to wich i want to apply the function dudi.acm to perform multiple correspondence analysis. However to use it all variables must be factors, so how can i turn each column of the matrix into a

[R] Daily time series

2004-07-07 Thread Vito Ricci
Hi, I'm dealing with time series with 1 observaton for day (data sampled daily). I will create a ts object using that time series and the function ts(). In ts() help is written: The value of argument 'frequency' is used when the series is sampled an integral number of times in each unit time

[R] boxplot a list of objects

2004-07-07 Thread Lefebure Tristan
Hi list, #Imagine we have vectors of different length (in practice 100 vectors): a-c(1:10) b-c(1:20) c-c(1:30) #then we got a list of the names of those objects: list-c(a,b,c) #I don't find how to boxplot them using a less stupid way than : boxplot(get(list[1]),get(list[2]),get(list[3]))

[R] Howto debug R on Windows XP?

2004-07-07 Thread Brueckner-Keutmann-GbR
Hello, I start working with R and I have tried to debug R on a Windows XP system. Unfortunately I am not able to set a breakpoint in the package SJava, which I am interested in. So far I succeed to compile R with the DEBUG=T option, and followed the hints given in the manual/FAQs about debugging.

[R] AW: Howto debug R on Windows XP?

2004-07-07 Thread Brueckner-Keutmann-GbR
-Ursprüngliche Nachricht- Von: Brueckner-Keutmann-GbR [mailto:[EMAIL PROTECTED] Gesendet: Wednesday, July 07, 2004 9:48 AM An: R_Help Mailing List Betreff: Howto debug R on Windows XP? Hello, I start working with R and I have tried to debug R on a Windows XP system. Unfortunately I am

Re: [R] Random intercept model with time-dependent covariates, results different from SAS

2004-07-07 Thread Dan Bebber
Hello, I have been struggling with a similar problem, i.e. fitting an LME model to unbalanced repeated measures data. I found Linear Mixed Models by John Fox (http://socserv2.socsci.mcmaster.ca/jfox/Books/Companion/appendix-mixed-mode ls.pdf) quite helpful. Fox gives examples which are unbalanced,

Re: [R] boxplot a list of objects

2004-07-07 Thread Lefebure Tristan
thanks a lot ! an other simple solution proposed by Stefano Guazzetti is : boxplot(list(a, b, c)) (ok I will never use again a function name for an object name) On Wednesday 07 July 2004 10:48, Unternährer Thomas, uth wrote: One possibility ist boxplot(sapply(ListOfNames, get, env =

Re: [R] AW: Howto debug R on Windows XP?

2004-07-07 Thread Duncan Murdoch
On Wed, 7 Jul 2004 10:50:18 +0200, Brueckner-Keutmann-GbR [EMAIL PROTECTED] wrote: -Ursprüngliche Nachricht- Von: Brueckner-Keutmann-GbR [mailto:[EMAIL PROTECTED] Gesendet: Wednesday, July 07, 2004 9:48 AM An: R_Help Mailing List Betreff: Howto debug R on Windows XP? Hello, I start

[R] Rmetrics Documentation Update

2004-07-07 Thread Diethelm Wuertz
I like to announce that some of the Rmetrics Documents have been updated to Version R 191.10057 Rmetrics Flyer: http://www.itp.phys.ethz.ch/econophysics/R/pdf/DocRmetrics.pdf Rmetrics Fact Sheet: http://www.itp.phys.ethz.ch/econophysics/R/pdf/DocFactsheet.pdf Rmetrics Reference Card:

[R] Using permax with Data Frame Containing Missing Values

2004-07-07 Thread Brian Lane
I'm new to this site so I hope this isn't too naive a problem. I'm trying to use the permax function with a data frame containing gene expression measurements taken from 79 microarray experiments with 3000 genes per array. The data contains missing values and every time I use permax with the

[R] vectorizing sapply() code (Modified by Aaron J. Mackey)

2004-07-07 Thread Aaron J. Mackey
[ Not sure why, but the first time I sent this it never seemed to go through; apologies if you're seeing this twice ... ] I have some fully functional code that I'm guessing can be done better/quicker with some savvy R vector tricks; any help to make this run a bit faster would be greatly

Re: [R] Using permax with Data Frame Containing Missing Values

2004-07-07 Thread Robert Gentleman
There is currently no handling of NAs in permax. Your only simple option is to drop those rows with NA's in them, or to perform some sort of imputation. I will mention it to the package's author, Robert On Wed, Jul 07, 2004 at 12:47:05PM +0100, Brian Lane wrote: I'm new to this site so I hope

[R] Mapinfo mid and mif files

2004-07-07 Thread Andrew McCulloch
Hi , Has anyone any experience of converting Mapinfo mid and mif files into a format that can be used with the R spatial packages. Thanks. yours sincerely Andrew McCulloch Department of Urban Studies University of Glasgow G12 8RS __ [EMAIL

Re: [R] Creating Binary Outcomes from a continuous variable

2004-07-07 Thread Roger Bivand
On Wed, 7 Jul 2004, Doran, Harold wrote: Dear List: ?cut I have searched the archives and my R books and cannot find a method to transform a continuous variable into a binary variable. For example, I have test score data along a continuous scale. I want to create a new variable in

Re: [R] Mapinfo mid and mif files

2004-07-07 Thread F. Tusell
Not sure if it will work straight with .mid or .mif files, but it works for me on .tab files, which were supposed to be read with the Excel map tool package and beleive confro to the MapInfo format. I asked Roger Bivand at the recent useR!2004 meeting and he made several suggestions. Following

Re: [R] Creating Binary Outcomes from a continuous variable

2004-07-07 Thread Marc Schwartz
On Wed, 2004-07-07 at 07:57, Doran, Harold wrote: Dear List: I have searched the archives and my R books and cannot find a method to transform a continuous variable into a binary variable. For example, I have test score data along a continuous scale. I want to create a new variable in my

R: [R] Creating Binary Outcomes from a continuous variable

2004-07-07 Thread Guazzetti Stefano
consider a cutpoint of 20 x-runif(100, min=1, max=50) as.integer(x 20) Stefano -Messaggio originale- Da: Doran, Harold [mailto:[EMAIL PROTECTED] Inviato: mercoledì 7 luglio 2004 14.57 A: [EMAIL PROTECTED] Oggetto: [R] Creating Binary Outcomes from a continuous variable Dear

[R] Creating Binary Outcomes from a continuous variable

2004-07-07 Thread Doran, Harold
Dear List: I have searched the archives and my R books and cannot find a method to transform a continuous variable into a binary variable. For example, I have test score data along a continuous scale. I want to create a new variable in my dataset that is 1=above a cutpoint (or passed the test)

[R] lme with poly(x,2) terms

2004-07-07 Thread Andrew Beckerman
Hi there. Mac OSX 3.3.4 R 1.9.1 I am analysing a data set with the following model m4- lme(fixed=sr~time*poly(energy,2)*poly(dist,2),random=~time|pot,data=deh) where time is one of six months, pot is a jar in which the repeated measures of species number (sr) was made. energy and dist

[R] KalmanSmooth problem

2004-07-07 Thread Hazenberg21, Pieter
Hello, In R I am trying to use Kalman filtering to find a solution for an hydrological problem. With Kalman Filtering I want to estimate the discharge comming from three storage bassins. I have programmed a function in R which can run KalmanSmooth. When I'm asking for the function and putting

Re: [R] Daily time series

2004-07-07 Thread Vincent Goulet
Hi Vito, Short answer: argument 'start' can take any value you want. For monthly observations (the case 'ts()' handles most nicely, with quarterly observations), 'start' will be used to specify the year and month (or quarter) of the first observation. From what I can gather from the help

Re: [R] fast NA elimination ?

2004-07-07 Thread Roger D. Peng
I find complete.cases() to be very useful for this kind of stuff (and very fast). As in, d - data.frame(x = c(1,2,3,NA,5), y = c(1,NA,3,4,5)) d x y 1 1 1 2 2 NA 3 3 3 4 NA 4 5 5 5 complete.cases(d) [1] TRUE FALSE TRUE FALSE TRUE use - complete.cases(d) d[use, ] x y 1 1 1 3

Re: [R] fast NA elimination ?

2004-07-07 Thread Marc Schwartz
On Wed, 2004-07-07 at 09:35, ivo welch wrote: dear R wizards: an operation I execute often is the deletion of all observations (in a matrix or data set) that have at least one NA. (I now need this operation for kde2d, because its internal quantile call complains; could this be considered a

Re: [R] Code density functions

2004-07-07 Thread F Z
Thanks to Andy Liaw, James Holtman and Uwe Ligges; I downloaded and looked at the source and found what I need!! Francisco From: Uwe Ligges [EMAIL PROTECTED] To: F Z [EMAIL PROTECTED] CC: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: [R] Code density functions Date: Wed, 07 Jul 2004

Re: [R] fast NA elimination ?

2004-07-07 Thread F Z
Hi Ivo Try ?na.omit Example : d - data.frame(x = c(1:5,NA), y = c(NA,3:7)) d x y 1 1 NA 2 2 3 3 3 4 4 4 5 5 5 6 6 NA 7 do-na.omit(d) do x y 2 2 3 3 3 4 4 4 5 5 5 6 I usually pass na.omit within the data argument of a function i.e. m-lm(x~y,data=na.omit(d)). In this way you don't

[R] Win32 C code

2004-07-07 Thread Simon Cullen
Hi, I'm trying to get C code working with R. This is my first time writing C on Windows and I'm making a mess of it. Help! I'm following the example in Roger Peng's An Introduction to the .C interface to R. The C code is: #include R.h void hello(int *n){ int i; for(i=0; i

Re: [R] Enumeration in R

2004-07-07 Thread Paul Roebuck
On Tue, 7 Jul 2004, Peter Dalgaard wrote: Paul Roebuck [EMAIL PROTECTED] writes: I want the equivalent of this 'C' declaration. enum StoplightColor { green = 3, yellow = 5, red = 7 }; I think you *dis*abled it by specifying an initializer which

[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

Re: [R] Win32 C code

2004-07-07 Thread Paul Roebuck
On Wed, 7 Jul 2004, Simon Cullen wrote: I'm trying to get C code working with R. This is my first time writing C on Windows and I'm making a mess of it. Help! ... I seem to be unable to make Windows pay attention to additions to the PATH variable so I stuck the code (test.c) into the

Re: [R] Win32 C code

2004-07-07 Thread Simon Cullen
On Wed, 7 Jul 2004 12:32:41 -0500 (CDT), Paul Roebuck [EMAIL PROTECTED] wrote: I wrote a batch file to get mine working. Change directory paths to match your setup. That batch file was exactly what I needed! Thanks. -- SC __ [EMAIL PROTECTED] mailing

[R] Observational error in ARIMA

2004-07-07 Thread Guiming Wang
Hi, Does anyone know how to include observation errors in the arima of R, which is implemented with the Kalman filter. I want to estimate observational error variance for noisy data in the context of ARMA model using arima of R. I read the manual and tried the example codes, but did not

[R] Importing an Excel file

2004-07-07 Thread Park, Kyong H Mr. RDECOM
Hello, R users, I am a very beginner of R and tried read.csv to import an excel file after saving an excel file as csv. But it added alternating rows of fictitious NA values after row number 16. When I applied read.delim, there were trailing several commas at the end of each row after row number

[R] Sorry forgot to mention about OS system in an previous email

2004-07-07 Thread Park, Kyong H Mr. RDECOM
Sorry for not mentioning about OS for importing an excel file in an previous email. I'm using R 1.9.1 with Windows 2000. Kyong [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list

[R] lost messages

2004-07-07 Thread Aaron J. Mackey
I've posted a message twice to this list, and never seen it appear yet ... perhaps this one will go through ... ? -- Aaron J. Mackey, Ph.D. Dept. of Biology, Goddard 212 University of Pennsylvania email: [EMAIL PROTECTED] 415 S. University Avenue office: 215-898-1205 Philadelphia,

Re: [R] Generate a matrix Q satisfying t(Q)%*%Q=Z and XQ=W

2004-07-07 Thread Stephane DRAY
thanks, I want to create matrices for simulation purpose (in order to evaluate the efficiency of different methods on this simulated data set). So, I want to create a data matrix Q (m individuals and r variables). I want to specify the variance-covariance structure for this matrix (t(Q)%*%Q=Z )

[R] vectorizing sapply() code (Modified by Aaron J. Mackey)

2004-07-07 Thread Aaron J. Mackey
[ Not sure why, but the first two times I sent this it never seemed to go through; apologies if you're seeing this thrice ... ] I have some fully functional code that I'm guessing can be done better/quicker with some savvy R vector tricks; any help to make this run a bit faster would be

Re: [R] Importing an Excel file

2004-07-07 Thread Marc Schwartz
On Wed, 2004-07-07 at 13:21, Park, Kyong H Mr. RDECOM wrote: Hello, R users, I am a very beginner of R and tried read.csv to import an excel file after saving an excel file as csv. But it added alternating rows of fictitious NA values after row number 16. When I applied read.delim, there were

Re: [R] KalmanSmooth problem

2004-07-07 Thread Uwe Ligges
Hazenberg21, Pieter wrote: Hello, In R I am trying to use Kalman filtering to find a solution for an hydrological problem. With Kalman Filtering I want to estimate the discharge comming from three storage bassins. I have programmed a function in R which can run KalmanSmooth. When I'm asking for

Re: [R] Importing an Excel file

2004-07-07 Thread Marc Schwartz
On Wed, 2004-07-07 at 13:44, Marc Schwartz wrote: On Wed, 2004-07-07 at 13:21, Park, Kyong H Mr. RDECOM wrote: Hello, R users, I am a very beginner of R and tried read.csv to import an excel file after saving an excel file as csv. But it added alternating rows of fictitious NA values

Re: [R] Generate a matrix Q satisfying t(Q)%*%Q=Z and XQ=W

2004-07-07 Thread Spencer Graves
How about generating matrices (X1|X2), dim(X1) = c(n, k1), dim(X2) = c(n, k2), with mean 0 and covariance matrix as follows: (S11 | S12) (S21 | S22), with S12 = W, S22 = Z and S11 = whatever you want? With X = t(X1), and Q = X2, we have E(XQ) = W and E(Q'Q) = Z. This can be done

[R] lme: extract variance estimate

2004-07-07 Thread Stephen Ellner
Spencer Graves wrote: Have you considered VarCorr? I've used it with lme, and the documentation in package lme4 suggests it should work with GLMM, which might also do what you want from glmmPQL. Thanks for the pointer (I was not aware that nlme and lme4 had different versions of lme),

Re: [R] Generate a matrix Q satisfying t(Q)%*%Q=Z and XQ=W

2004-07-07 Thread Stephane DRAY
Thanks but it does not solve my problem because I would like to generate Q (X2) for a given X(X1). X is fixed. But It seems hard to do it and perhaps It would be easier to change my approach. Thanks again for your help At 14:55 07/07/2004, Spencer Graves wrote: How about generating

[R] a small bug in spatstat::rmh

2004-07-07 Thread Evgueni Parilov
Time to time, rmh.default fails to simulate a lookup-type process on a statement: if(all.equal(diff(r),rep(deltar,nlook-1))) { equisp - 1 par - c(beta,nlook,equisp,deltar,rmax,h) } else { equisp - 0 par - c(beta,nlook,equisp,deltar,rmax,h,r) } According to the

Re: [R] Importing an Excel file

2004-07-07 Thread Richard Mller
Am Mittwoch, 7. Juli 2004 20:21 schrieb Park, Kyong H Mr. RDECOM: Hello, R users, I am a very beginner of R and tried read.csv to import an excel file after saving an excel file as csv. But it added alternating rows of fictitious NA values after row number 16. When I applied read.delim, there

[R] NAMESPACE and tests for unexported functions

2004-07-07 Thread Paul Roebuck
How do you get around the problem of having tests for functions that are not exported in NAMESPACE? It seems rather self-defeating to have to export everything so that 'R CMD CHECK pkg' won't crash when it encounters a test case for an internal function. I don't want someone using the package to

Re: [R] lme: extract variance estimate

2004-07-07 Thread Spencer Graves
I just tried it in both lme4 and nlme. I got it in nlme but not lme4. I'm sure lme4 is better in many ways, but I could not figure out how to get what you want in lme4. Specifically, I tried the following: DF - data.frame(x=rep(letters[1:2], 2), y=rep(1:2, 2)+0.01*(1:4)) fit -

RE: [R] NAMESPACE and tests for unexported functions

2004-07-07 Thread Liaw, Andy
Not sure if this is recommended for testing purposes, but you can try using `:::'; e.g., mypkg:::invisibleFunction(...). Andy From: Paul Roebuck How do you get around the problem of having tests for functions that are not exported in NAMESPACE? It seems rather self-defeating to have to

Re: [R] KalmanSmooth problem

2004-07-07 Thread Uwe Ligges
Spencer Graves wrote: Hi, Uwe: KalmanSmooth is in the stats package in R 1.9.1. R is moving so fast that it is impossible to keep current with all parts of it. Best Wishes, Spencer Graves U thanks, Spencer. My apologies to Pieter. Indeed, looks like I forgot to upgrade my R version

Re: [R] a small bug in spatstat::rmh

2004-07-07 Thread Uwe Ligges
Evgueni Parilov wrote: Time to time, rmh.default fails to simulate a lookup-type process on a statement: if(all.equal(diff(r),rep(deltar,nlook-1))) { equisp - 1 par - c(beta,nlook,equisp,deltar,rmax,h) } else { equisp - 0 par - c(beta,nlook,equisp,deltar,rmax,h,r)

RE: [R] KalmanSmooth problem

2004-07-07 Thread Hazenberg21, Pieter
Dear Uwe and Spencer, Thanks for replying so soon. The R version I wrote is indeed R 1.9.1, and the package is stats. Sorry I didn't wrote it in my first email. I've have tried to use the comments you gave, and simplified my function. It is changed to: Kalm = function(x){ +

[R] question about seq.dates from chron vs. as.POSIXct

2004-07-07 Thread Laura Holt
Dear R People: Here is an interesting question: library(chron) xt - seq.dates(from=01/01/2004,by=days,length=5) xt [1] 01/01/04 01/02/04 01/03/04 01/04/04 01/05/04 #Fine so far as.POSIXct(xt) [1] 2003-12-31 18:00:00 Central Standard Time [2] 2004-01-01 18:00:00 Central Standard Time [3]

Re: [R] lost messages

2004-07-07 Thread Aaron J. Mackey
The second two resends did go through (I checked on the web archive), but the first did not; additionally, the second two resends both came through with the exact same timestamp, even though I resent them over the space of 4 hours or so (and only after I had sent the lost messages message,

[R] text editor for R

2004-07-07 Thread Yi-Xiong Sean Zhou
Hi, What is the best text editor for programming in R? I am using JEdit as the text editor, however, it does not have anything specific for R. It will be nice to have a developing environment where the keywords are highlighted, plus some other debugging functions. Yi-Xiong

Re: [R] text editor for R

2004-07-07 Thread Sundar Dorai-Raj
Yi-Xiong Sean Zhou wrote: Hi, What is the best text editor for programming in R? I am using JEdit as the text editor, however, it does not have anything specific for R. It will be nice to have a developing environment where the keywords are highlighted, plus some other debugging functions.

Re: [R] text editor for R

2004-07-07 Thread Marc Schwartz
On Wed, 2004-07-07 at 17:47, Yi-Xiong Sean Zhou wrote: Hi, What is the best text editor for programming in R? I am using JEdit as the text editor, however, it does not have anything specific for R. It will be nice to have a developing environment where the keywords are highlighted, plus

Re: [R] text editor for R

2004-07-07 Thread Murray Jorgensen
I tried R-WinEdt a few years ago, but as I remember it interfered with my usual use of WinEdt which is as a front end to MiKTeX. Is there a way to use WinEdt both ways? Murray Jorgensen Marc Schwartz wrote: On Wed, 2004-07-07 at 17:47, Yi-Xiong Sean Zhou wrote: Hi, What is the best text

RE: [R] text editor for R

2004-07-07 Thread Liaw, Andy
Uwe would be the authority on this 8-), but my impression is that if you keep two separate shortcuts, you should be fine. The one for R-WinEdt has flags that sets it up for R, which should not be used in the one for MikTeX. Andy From: Murray Jorgensen I tried R-WinEdt a few years ago, but

[R] omit complete cases

2004-07-07 Thread ivo_welch-rstat8783
thanks everyone. all solutions were better than what I had, and simple. R is an interesting experience. Extremely powerful and awe-inspiring for its elegance; things work like I would never have believed how elegantly they work. The IQ in the subsetting alone is superbly clever. And

[R] command line interface

2004-07-07 Thread Lana Schaffer
How can plots (histograms) be implemented with the command line interface to R? Lana Schaffer __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

RE: [R] text editor for R

2004-07-07 Thread Kevin Wang
Hi, Uwe would be the authority on this 8-), but my impression is that if you keep two separate shortcuts, you should be fine. The one for R-WinEdt has flags that sets it up for R, which should not be used in the one for MikTeX. I think Andy is correct. A few years ago (back in the dark ages

Re: [R] text editor for R

2004-07-07 Thread David Scott
On Thu, 8 Jul 2004, Murray Jorgensen wrote: I tried R-WinEdt a few years ago, but as I remember it interfered with my usual use of WinEdt which is as a front end to MiKTeX. Is there a way to use WinEdt both ways? Murray Jorgensen This problem annoyed me for a while too. My solution

[R] S data library

2004-07-07 Thread Kimpel, Mark W
I am currently working my way through Statistical Models in S (Chambers Hastie, 1992) and it would be helpful to me if I had access to the data library they refer to and which contains the authors sample datasets. Are these datasets available as an R package or any other type of download?

Re: [R] text editor for R

2004-07-07 Thread Peter Flom
I use WinEdt for both. I simply installed it twice, and set up one version for R and one for LaTeX, I have seperate icons on the desktop, with different names, and it works fine. HTH Peter Peter L. Flom, PhD Assistant Director, Statistics and Data Analysis Core Center for Drug Use and HIV

Re: [R] text editor for R

2004-07-07 Thread Murray Jorgensen
Oh, yes. I think I did do something like this, but for some reason the two incarnations bothered me. Murray Jorgensen David Scott wrote: On Thu, 8 Jul 2004, Murray Jorgensen wrote: I tried R-WinEdt a few years ago, but as I remember it interfered with my usual use of WinEdt which is as a front

[R] read.frame

2004-07-07 Thread S Peri
Hello group, I am learning R and I am new to many concepts.I face the following errors when I am trying to execute the following. I have 4 text files with protein accession numbers. I wanted to represent them in a venn diagram and for that I using intersect and setdiff functions. My data looks

R cookbook (Re: [R] omit complete cases)

2004-07-07 Thread Arin Basu
Hi Ivo: You might check out Paul Jobnson's following page: http://www.ukans.edu/~pauljohn/R/Rtips.html   HTH, Arin On Thu, 08 Jul 2004 [EMAIL PROTECTED] wrote : ...I used to use perl for much work, and although there is much to like about it, R seems to be even better for most

Re: [R] read.frame

2004-07-07 Thread S Peri
Dear Alec, Thank you for your response and it worked. Further, I have another mathematical problem. I apologize ahead as this question is not apt for this list. I am a biologist working at Johns Hopkins School of Medicine. As I listed in my previous e-mail (attached below)I mentioned I have 4

RE: [R] question about seq.dates from chron vs. as.POSIXct

2004-07-07 Thread Gabor Grothendieck
Yes, its assuming GMT. I find it best to use an intermediate conversion to character to avoid these sorts of problems. If, as in your example, you just have dates and no times then the following would do it (and has the advantage that you don't have to specify your time zone explicitly so it

Re: [R] read.frame

2004-07-07 Thread DJNordlund
In a message dated 7/7/2004 9:42:03 PM Pacific Daylight Time, [EMAIL PROTECTED] writes: Dear Alec, Thank you for your response and it worked. Further, I have another mathematical problem. I apologize ahead as this question is not apt for this list. I am a biologist working at Johns