Re: [R] Packages - a great resource, but hard to find the right one

2007-11-27 Thread Felix Andrews
On Nov 26, 2007 2:44 PM, hadley wickham <[EMAIL PROTECTED]> wrote: > > As for who should do the review, I wouldn't trust so much any user as I > > would an organization such as the JSS. If the latter is not possible, the > > first alternative is better than nothing. > > Of course, it doesn't have t

[R] R 2.6.1 & library(svIDE)

2007-11-27 Thread Olivier Delaigue
Hi all, I have installed in R 2.6.1 the svIDE package (0.9-5), but I have a problem when I load it. > library(svIDE) Warning messages: 1: '\A' is an unrecognized escape in a character string 2: unrecognized escape removed from ";for Options\AutoIndent: 0=Off, 1=follow language scoping and 2=co

Re: [R] R 2.6.1 & library(svIDE)

2007-11-27 Thread Uwe Ligges
Olivier Delaigue wrote: > Hi all, > > I have installed in R 2.6.1 the svIDE package (0.9-5), but I have a problem > when I load it. > > >> library(svIDE) > Warning messages: > 1: '\A' is an unrecognized escape in a character string > 2: unrecognized escape removed from ";for Options\AutoInden

Re: [R] R 2.6.1 & library(svIDE)

2007-11-27 Thread Prof Brian Ripley
These are warnings, which you can choose to ignore. svIDE is part of the SciViews bundle, and the author has acknowledged several times that it needs updating for R 2.6.x. See e.g. http://finzi.psych.upenn.edu/R/Rhelp02a/archive/104637.html On Tue, 27 Nov 2007, Olivier Delaigue wrote: > > H

Re: [R] spss, string factors, selecting

2007-11-27 Thread James Reilly
It does sound like there could be a problem with the merging process. I have two questions about your merge command: chaffmerge2<-merge(chaff, chafffat, by.x=c("RINGNO", "FAT", "FATMTD"), by.y=c("RINGNO", "FAT", "FATMTD"), all=T) 1. What is the reason for matching on "FAT" and "FATMTD"? From your

Re: [R] how to wait after plotting in BATCH mode?

2007-11-27 Thread Ramon Diaz-Uriarte
Dear Jonas, I don't understand why you want to do that. BATCH is supposed to be for non-interactive, unnatended operation. If you want the plot to remain there for any arbitrary time, why don't you open an R interactive session and do: source("cp_messung.R") Otherwise, you'll have to think of way

Re: [R] mvr error in PLS package

2007-11-27 Thread Bjørn-Helge Mevik
Gavin Simpson wrote: > On Mon, 2007-11-26 at 09:25 -0800, Bricklemyer, Ross S wrote: >> >> > libs.IC.cal <- mvr(libs.IC.fmla, data = libsdata.cond.cal, >> ncomp=20,validation = "LOO", method = "oscorespls") >> >> Error in colMeans(x, n, prod(dn), na.rm) : >> 'x' must be numeric >> >>

Re: [R] R 2.6.1 & library(svIDE)

2007-11-27 Thread Philippe Grosjean
Prof Brian Ripley wrote: > These are warnings, which you can choose to ignore. svIDE is part of the > SciViews bundle, and the author has acknowledged several times that it > needs updating for R 2.6.x. See e.g. > > http://finzi.psych.upenn.edu/R/Rhelp02a/archive/104637.html Yes, reworking o

[R] Packages for Animal Models & QG analyses

2007-11-27 Thread Deepa Senapathi
Hi, I am looking to do some quantitative genetic analyses using animal models and was wondering if someone could suggest an appropriate package in R. It would help if it was similar to the ASReml genetic analyses software. Thanks, Deepa Senapathi Deepa Senapathi Centre for Agri-Env

Re: [R] GAM with constraints

2007-11-27 Thread Simon Wood
Are you interested in equality constraints or inequality constraints? mgcv::gam will allow you to supply your own smooths (see e.g. ?p.spline), and the specification mechanism allows you to supply linear equality constraints that the smooth must satisfy, which are then handled automatically. Whe

[R] exporting a split list

2007-11-27 Thread Alexy Khrabrov
Using wk <- with(d, split(word, kind)), I get the following class table: wk$`1` [1] "a" "bra" ... # (*) wk$`10` "ca" "dabra" ... Now I need to export it in the following format: classnum_members examples 1 23 a bra ... 104 ca

Re: [R] lme object manipulation

2007-11-27 Thread SHIN LIN
Thanks for the reply, but I looked in each element of names(lme_res2) but did not find the value I was looking for. Is there a way to output the object contents to a text file? I can then lift the value with text manipulation. Obviously, other solutions are welcome, too. Shin - Origina

[R] exporting clustering results to table

2007-11-27 Thread Martin Tomko
Hello list, the following approach did not work: clustersA <- pam(distances, nkA, diss=TRUE); gc(); filenameclu = paste("filenameclu", ".txt"); write.table(clustersA , file=filenameclu,sep=","); although it worked with clustersA <- hclust(distances, method="ward"); and a consecutive kclassA <- c

Re: [R] recovering "status" after q(status=n) in Windows

2007-11-27 Thread Prof Brian Ripley
As one more data point http://blogs.msdn.com/powershell/archive/2006/09/15/ErrorLevel-equivalent.aspx says $LASTEXITCODE is the equivalent in Windows PowerShell. And for the cmd.exe shell: https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx

[R] Function to calculate eigenvector bootstrap error

2007-11-27 Thread Monica Pisica
Hi everybody, I need help in writing a statistical function for bootstrap. Suppose m is a matrix with n cols and p rows, my original data. What I want to do is a bootstrap (using boot from package boot) on eigenvectors from a PCA done on m with a statistic function calculating the eigenvector

Re: [R] lme object manipulation

2007-11-27 Thread Richard . Cotton
> > > I have an lme object, say lme_res2, which was > > > generated using the varIdent. I'm trying to extract > > > the double 1.532940 from the object, but I can't > > > find it by attributes(lme_res2) or > > > attributes(summary(lme_res2)). How can I pull it > > > out (so that I can save

[R] Difference between AIC in GLM and GLS - not an R question

2007-11-27 Thread Geertje Van der Heijden
Hi, I have fitted a model using a glm() approach and using a gls() approach (but without correcting for spatially autocorrelated errors). I have noticed that although these models are the same (as they should be), the AIC value differs between glm() and gls(). Can anyone tell me why they differ?

Re: [R] exporting a split list

2007-11-27 Thread jim holtman
Let me try again; > x <- list('1'=c('a','b','c'), '10'=letters[1:20]) > output <- lapply(names(x), function(values){ + paste(values, length(x[[values]]), paste(x[[values]], collapse=' '), "\n", sep='\t') + }) > cat(do.call('rbind', output), sep='') 1 3 a b c 10 20 a b c d

Re: [R] 'Split' character

2007-11-27 Thread Sébastien
Yes, now that you mention it, I probably overlooked this option. As a matter of fact, I did try interaction outside the split function. As he did give me the same 'list' of elements as paste, I reject it... it is only now that I realize that interaction returns a factor and that split uses the

Re: [R] generating .Rd files

2007-11-27 Thread Martin Maechler
> "GaGr" == Gabor Grothendieck <[EMAIL PROTECTED]> > on Mon, 26 Nov 2007 23:25:45 -0500 writes: GaGr> See ?package.skeleton GaGr> ?prompt Yes, indeed. And I think that was the only pertinent answer to Edna's question. GaGr> On Nov 26, 2007 6:59 PM, Edna Bell GaG

Re: [R] exporting a split list

2007-11-27 Thread jim holtman
Here is a start. You can add code to limit the length of 'examples' and add the header line: > x <- list('1'=c('a','b','c'), '10'=letters[1:20]) > output <- lapply(names(x), function(values){ + paste(values, length(values), paste(x[[values]], collapse=' '), "\n", sep='\t') + }) > cat(do.call(

Re: [R] Fwd: Empty list to use in a for cycle

2007-11-27 Thread Vincent Goulet
Le lun. 26 nov. à 10:35, Niccolò Bassani a écrit : > Dear R-users, > I'm posting a problem I already asked help for some time ago, > because I'm > facing that problem once again and even because now, reading that old > e-mail, and the answer recevied, I understand I've not made myself > clear.

Re: [R] exporting clustering results to table

2007-11-27 Thread Martin Tomko
Hello Haris, no, that is not the problem. But thank you anyway. I figured that paste has a funny behavior. But the object resulting from pam is complex, and cannot be cast into a table frame easily... Charilaos Skiadas wrote: > On Nov 27, 2007, at 7:41 AM, Martin Tomko wrote: > >> filename = p

Re: [R] Difference between AIC in GLM and GLS - not an R question

2007-11-27 Thread Prof Brian Ripley
On Tue, 27 Nov 2007, Geertje Van der Heijden wrote: > I have fitted a model using a glm() approach and using a gls() approach > (but without correcting for spatially autocorrelated errors). I have > noticed that although these models are the same (as they should be), the > AIC value differs betwe

Re: [R] newbie polr() question

2007-11-27 Thread Max
Prof Brian Ripley used his keyboard to write : > On Mon, 26 Nov 2007, Max wrote: > >> Prof Brian Ripley explained : >>> On Mon, 26 Nov 2007, Max wrote: >>> Hi everyone, I'm trying to understand some R output here for ordinal regression. I have some integer data called "A" split up into 3

Re: [R] Difference between AIC in GLM and GLS - not an R question

2007-11-27 Thread Geertje Van der Heijden
Dear Prof. Ripley, Thanks for your response! I used the REML method. If I estimate the gls models using ML estimation, the AIC values are equal. Many thanks, Geertje On Tue, 27 Nov 2007, Geertje Van der Heijden wrote: > I have fitted a model using a glm() approach and using a gls() > approach

Re: [R] seasonal time serie with missing values

2007-11-27 Thread CCordeiro
Hi I am interested in this issue also. I have some papers concerning this and if you want it let me know. Best regards, Clara Cordeiro Joao Santos wrote: > > Hello All, > > I trying to find some way to fill in missing values in a seasonal time > series. All the function that I find until now

Re: [R] Difference between AIC in GLM and GLS - not an R question

2007-11-27 Thread John C Frain
There are several different formulae for AIC. They are all monotone transformations of the basic penalized log likelihood or likelihood. Thus when compared over different models the maximum (or minimum) occurs at the same specification. If you use the exact same estimation technique in different

Re: [R] seasonal time serie with missing values

2007-11-27 Thread John C Frain
The TRAMO/SEATS suite of programs can interpolate missing values in seasonal time series. A stand alone version of the software and various papers are available from http://www.bde.es/servicio/software/softwaree.htm. TRAMO/SEATS is integrated into the econometric package GRETL which interfaces we

[R] measure smoothness

2007-11-27 Thread Al Lelopath
I have 3 sets of Cartesian data, one is 'original' data and the other 2 are "smoothed"data. The smoothed data is the result of applying a smoothing algorithm to the original.One set of smoothed data is the 'old' algorithm and the other set is the 'new' algorithm. Does R have the capability of tell

[R] Export in pdf, png, jpg, eps, etc...

2007-11-27 Thread Sébastien
Dear R-users, I have created a bunch of R scripts that automatically create multiple plots, all saved in a pdf device. I initially chose pdf output in order to easily access to multiple plots in a single file. Now, I am trying to play with different devices, like png or eps and I realize that t

Re: [R] seasonal time serie with missing values

2007-11-27 Thread Clara Cordeiro
Thanks a lot for the information J Best regards, Clara 2007/11/27, John C Frain <[EMAIL PROTECTED]>: > > The TRAMO/SEATS suite of programs can interpolate missing values in > seasonal time series. A stand alone version of the software and > various papers are available from > http://www.bde.es/s

Re: [R] R 2.6.1 & library(svIDE)

2007-11-27 Thread Bos, Roger
I get that even with R 2.6.0, but its not really a problem, just a warning. In other words, everything I have done in R has worked fine despite that warning. It would be nice if it was eventually cleaned up, but it doesn't stop you from using R. -Original Message- From: [EMAIL PROTEC

[R] voronoi/Delaunay/Dirichlet tessellation on sphere in R or S?

2007-11-27 Thread Galkowski, Jan
There's Renka's STRIPACK, and TRIPACK, respectively, ACM TOMS Algorithms 772 and 751, and there's the R package "deldir" which does the Delaunay for a plane, but does anyone have or know of the tessellation in R for a sphere? Also, is there a standard indexing scheme for Delaunay facets, and perha

Re: [R] measure smoothness

2007-11-27 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Al Lelopath > Sent: Tuesday, November 27, 2007 8:20 AM > To: r-help@r-project.org > Subject: [R] measure smoothness > > I have 3 sets of Cartesian data, one is 'original' data and the other > 2 are "sm

[R] help in ar function

2007-11-27 Thread cmhcordei
Dears Sirs During my computational work I encountered unexpected behaviour when calling "ar" function. I want to select the order p of the autoregressive approximation by AIC criterion and sometimes an error occurs. Example: # time series x<-ts(c(-0.2052083,-0.3764986,-0.3762448,0.3740089,0.27

Re: [R] measure smoothness

2007-11-27 Thread Ravi Varadhan
Assuming that the data are sampled at equal intervals, you can do the following: A <- matrix(scan("h:/test/junk.txt"), ncol=2, by=T) # I read your data in # the following plots show that the 3rd set of data (in green) is smoothest plot(A[1:11,1], A[1:11,2], type="o") lines(A[12:22,1], A[12:22,2]

[R] max() and min() functions not found

2007-11-27 Thread Millo Giovanni
Dear List, I just installed R 2.6.1 (on Win2K) and I get a strange error in functions min() and max(): > min(1:3) Errore in .Internal(min(..., na.rm = na.rm)) : nessuna funzione interna "min" which, as you may have guessed, means 'no internal function "min" '. The same happens for max(). May

Re: [R] help in ar function

2007-11-27 Thread Prof Brian Ripley
1) This is fixed in R 2.6.1. In 2.6.0 you can reduce order.max: the default is longer than your series. 2) Do you really expect to be able to do model fitting on a quarterly series of length 9? It's quite unrealistic even for a non-seasonal series. Unsurprisingly, the order selected is 0, an

Re: [R] max() and min() functions not found

2007-11-27 Thread Uwe Ligges
I guess you have some library in the search path that includes a base package of an outdated R installation. Uwe Ligges Millo Giovanni wrote: > Dear List, > > I just installed R 2.6.1 (on Win2K) and I get a strange error in > functions min() and max(): > >> min(1:3) > Errore in .Internal(min

Re: [R] max() and min() functions not found

2007-11-27 Thread Prof Brian Ripley
You have a rogue package loaded into your session, one that was installed for R < 2.6.0. The R posting guide asked for For questions about unexpected behavior or a possible bug, you should, at a minimum, copy and paste the output from sessionInfo() into your message. and that would hav

[R] R: max() and min() functions not found

2007-11-27 Thread Millo Giovanni
Dear Sirs, thanks for helping. Opening up another instance of R *without* loading any package in fact I get the usual behaviour for max()/min(). I'm updating my packages: sorry for my laziness, I'm behind a corporate firewall and it doesn't go as smooth as at home. Sorry for careless posting as

[R] rearrange data: one line per subject, one column per condition

2007-11-27 Thread Dieter Vanderelst
Dear R-list, Is there a way to convert the typical long R data-format to a 1-line per subject format? I have data formatted as: Group subjcondition variable 1 1 1 746.36625 2 2 1 1076.152857 1 3 1 1076.152857 2 4 1

[R] if condition and for cycles

2007-11-27 Thread ljantunes
I have two questions about R: 1) Does anyone knows why I get the plots but not the summary results of the linear fitting when I run this code? When I run it outside the if condition it works fine. if (op==4) { t=1:length(time(SeaIce)) fitlinear=lm(SeaIce~t) windows()

[R] Questions on RWeka classifiers?

2007-11-27 Thread Li Li
Hi, I am using some classifiers in RWeka packages and met a couple problems. (1) J48 implements C45 classifier, the C45 should be able to handle missing values in both training set and test set. But I found the J48 classifier can not be evaluated on test set with missing values--it just

Re: [R] if condition and for cycles

2007-11-27 Thread Rolf Turner
Output from an R command is printed to the console ***only*** if the command is issued *directly* from the command line. Otherwise the output is invisible. This includes unassigned output from commands issued ***inside functions***. And, finally, functions include things like ``if'' and for

Re: [R] rearrange data: one line per subject, one column per condition

2007-11-27 Thread Henrique Dallazuanna
Hi, reshape(df, direction="wide", idvar="subj", timevar="condition")[,c(2,1,3,5)] On 27/11/2007, Dieter Vanderelst <[EMAIL PROTECTED]> wrote: > > Dear R-list, > > Is there a way to convert the typical long R data-format to a 1-line per > subject format? > > I have data formatted as: > > Group s

Re: [R] rearrange data: one line per subject, one column per condition

2007-11-27 Thread jim holtman
You can use the reshape package: > > x <- read.table(textConnection("Group subjcondition variable + 1 1 1 746.36625 + 2 2 1 1076.152857 + 1 3 1 1076.152857 + 2 4 1 657.4263636 + 1 5 1 854.127

[R] str() options

2007-11-27 Thread Thompson, David (MNR)
Hello, Is there a way to have str() and ls.str() return all factor levels? Thanx, DaveT. * Silviculture Data Analyst Ontario Forest Research Institute Ontario Ministry of Natural Resources [EMAIL PROTECTED] http://ofri.mnr.gov.on.ca ___

[R] problem with plotting table

2007-11-27 Thread Carlos Gershenson
Hi all, Let us have: x<-1:10 y<-x/2 plot(table(x), type="p") points(table(y), pch=2) Why does the last command plots the values of table(y) using the x coordinates of table(x)??? Am I doing something wrong? What would be a way of plotting the points of table(y) on their place? #this problem

[R] R graph window

2007-11-27 Thread catherine xu
Dear all, I am using R 2.6.0 on Windows XP. I am wondering if R can show multiple graph at the same graph window with different tabs at the bottom of the window, like in S-plus. Does anybody have experience on this? Thank you. Cathy - [[alternat

[R] Re place values in Data matrix

2007-11-27 Thread mogra
I have data matrix and I want to replace values. > try Rh.Rj RR.RjRT.Rj V1 0.08465125 0.19159688 0.617294468 V2 0.74853203 0.88826790 0.113979660 V3 0.68767961 0.17979307 0.013802852 V4 0.31722379 0.25611821 -0.021954454 V5 0.17931687 0.04491838 0.011484522 V6 0.87455663

Re: [R] Export in pdf, png, jpg, eps, etc...

2007-11-27 Thread Mark Wardle
I don't have any problems with this: I generate PDFs directly. All other formats I post-process using command line tools to automatically batch convert (using ImageMagick). Best wishes, Mark On 27/11/2007, Sébastien <[EMAIL PROTECTED]> wrote: > Dear R-users, > > I have created a bunch of R scri

Re: [R] R graph window

2007-11-27 Thread Duncan Murdoch
catherine xu wrote: > Dear all, > > I am using R 2.6.0 on Windows XP. > I am wondering if R can show multiple graph at the same graph window with > different tabs at the bottom of the window, like in S-plus. > Does anybody have experience on this? > No, it can't. If you turn history recording

Re: [R] problem with plotting table

2007-11-27 Thread Duncan Murdoch
Carlos Gershenson wrote: > Hi all, > > Let us have: > > x<-1:10 > y<-x/2 > plot(table(x), type="p") > points(table(y), pch=2) > > > Why does the last command plots the values of table(y) using the x > coordinates of table(x)??? > It's just a coincidence. It's actually using the indices 1:10,

Re: [R] R graph window

2007-11-27 Thread Prof Brian Ripley
On Tue, 27 Nov 2007, catherine xu wrote: > Dear all, > > I am using R 2.6.0 on Windows XP. > I am wondering if R can show multiple graph at the same graph window > with different tabs at the bottom of the window, like in S-plus. > Does anybody have experience on this? It cannot. IF you want S-P

Re: [R] Re place values in Data matrix

2007-11-27 Thread T.K.
This will may work. Note that there is only one '&' instead of two. try[try > 0.0 & try < 0.05]<-1 On Nov 27, 2007 12:37 PM, mogra <[EMAIL PROTECTED]> wrote: > > I have data matrix and I want to replace values. > > > try >Rh.Rj RR.RjRT.Rj > V1 0.08465125 0.19159688 0.617294

Re: [R] Packages for Animal Models & QG analyses

2007-11-27 Thread David Duffy
Deepa Senapathi asked: > > I am looking to do some quantitative genetic analyses using animal models > and was wondering if someone could suggest an appropriate package in R. It > would help if it was similar to the ASReml genetic analyses software. > > Thanks, > > Deepa Senapathi > > Deepa S

Re: [R] R graph window

2007-11-27 Thread Mike Prager
Duncan Murdoch <[EMAIL PROTECTED]> wrote: > > I am using R 2.6.0 on Windows XP. > > I am wondering if R can show multiple graph at the same graph window with > > different tabs at the bottom of the window, like in S-plus. > > Does anybody have experience on this? > > > No, it can't. If you tu

Re: [R] problem with plotting table

2007-11-27 Thread Gavin Simpson
Duncan Murdoch wrote: > Carlos Gershenson wrote: >> Hi all, >> >> Let us have: >> >> x<-1:10 >> y<-x/2 >> plot(table(x), type="p") >> points(table(y), pch=2) >> >> >> Why does the last command plots the values of table(y) using the x >> coordinates of table(x)??? >> > > It's just a coincidenc

Re: [R] exporting clustering results to table

2007-11-27 Thread Dave Roberts
Martin, The cutree() function returns the cluster membership as a vector. To get a similar result from pam() (and other functions in library cluster) you need to extract the component $clustering, e.g. > clustersA <- pam(distances, nkA, diss=TRUE) > filenameclu = paste("filenameclu", ".t

Re: [R] if condition and for cycles

2007-11-27 Thread Thomas Lumley
In both cases the problem is that you didn't print() the results. This is a similar issue to FAQ 7.16, which discusses the problem in more detail. -thomas On Tue, 27 Nov 2007, ljantunes wrote: I have two questions about R: 1) Does anyone knows why I get the plots but not the summ

Re: [R] Permutation of a distance matrix

2007-11-27 Thread Dave Roberts
Andy, Sorry, my first response was a little hasty. I see you're trying to preserve the distance of a sample to itself along the diagonal and the symmetry of the matrix. This is actually simpler. > library(labdsv) > dis.bc <- dsvdis(bryceveg,'bray') # bray/curtis dissimilarity matrix >

Re: [R] Permutation of a distance matrix

2007-11-27 Thread Dave Roberts
Andy, As you have noted, there are issues related to looping in R. There are a couple of possible solutions. 1) code the permutation routine in FORTRAN or C and only call it once. If you don't know either of those languages then this won't help. 2) avoid recalculating the raw distances an

Re: [R] str() options

2007-11-27 Thread jim holtman
Does this do what you want? > x <- data.frame(a=factor(letters), b=1:26, c=factor(LETTERS)) > str(x) 'data.frame': 26 obs. of 3 variables: $ a: Factor w/ 26 levels "a","b","c","d",..: 1 2 3 4 5 6 7 8 9 10 ... $ b: int 1 2 3 4 5 6 7 8 9 10 ... $ c: Factor w/ 26 levels "A","B","C","D",..: 1 2

Re: [R] Packages for Animal Models & QG analyses

2007-11-27 Thread Simon Blomberg
I don't think lme4 can handle user-specified correlation structures for the residuals (yet), which are necessary for animal models. Cheers, Simon. On Wed, 2007-11-28 at 07:50 +1000, David Duffy wrote: > Deepa Senapathi asked: > > > > I am looking to do some quantitative genetic analyses using a

[R] Histograms and Sturges rule

2007-11-27 Thread Paul Smith
Dear All, According to the Sturges rule, the number of classes of a histogram is the closest integer to 1 + logb(n,base=2) where n is the number of observations. The function hist(), by default, uses the Sturges rule. However, the code x <- 1:200 hist(x) produces a histogram with 10 classes an

Re: [R] Histograms and Sturges rule

2007-11-27 Thread Deepayan Sarkar
On 11/27/07, Paul Smith <[EMAIL PROTECTED]> wrote: > Dear All, > > According to the Sturges rule, the number of classes of a histogram is > the closest integer to > > 1 + logb(n,base=2) > > where n is the number of observations. The function hist(), by > default, uses the Sturges rule. However, the

[R] extracting year an month from ts data set

2007-11-27 Thread Richard Saba
I have an ascii data set of monthly observation starting in Jan 1946 with a header. hstarts 57 65 95 103 103 97 94 . . . Which I read with the following code tab6.1<-ts(read.table(fname, header=TRUE),frequency=12,start=c(1946,1)) I would like to run a time series model with dummy variabl

Re: [R] Histograms and Sturges rule

2007-11-27 Thread Paul Smith
On Nov 28, 2007 12:32 AM, Deepayan Sarkar <[EMAIL PROTECTED]> wrote: > > According to the Sturges rule, the number of classes of a histogram is > > the closest integer to > > > > 1 + logb(n,base=2) > > > > where n is the number of observations. The function hist(), by > > default, uses the Sturges

Re: [R] Permutation of a distance matrix

2007-11-27 Thread Duncan Murdoch
On 16/11/2007 6:42 PM, Andrew Park wrote: > > Hi there, > > I would like to find a more efficient way of permuting the rows and columns > of a symmetrical matrix that represents ecological or actual distances > between objects in space. The permutation is of the type used in a Mantel > test.

Re: [R] extracting year an month from ts data set

2007-11-27 Thread Moshe Olshansky
In your case months <- rep(1:12,len=length(tab6.1)) should work. --- Richard Saba <[EMAIL PROTECTED]> wrote: > I have an ascii data set of monthly observation > starting in Jan 1946 with a > header. > > hstarts > 57 > 65 > 95 > 103 > 103 > 97 > 94 > . > . > . > > Which I read with the follow

[R] interaction of shingles and tapply()

2007-11-27 Thread Roger Levy
I'm interested in a version of tapply() that operates with shingles instead of factors. For instance: x <- c(1,1,2,2,3,3) y <- c(1,1,1,0,0,0) s <- shingle(x,intervals=cbind(c(0.5,1.5),c(2.5,3.5))) # the following function should exist! tapply.shingle(x,s,mean) # returns the vector c(0.75,0.2

[R] R crash using rpanel on mac os x

2007-11-27 Thread Aaron Robotham
Hello, I've recently discovered a persistent issue with rpanel when running R.app (2.6.1) on Mac OS X 10.4.11. tcltk and rpanel load without any apparent error, and the interactive panels appear to work as expected, however upon closing the panels rpanel has created I get catastrophic errors and R

Re: [R] interaction of shingles and tapply()

2007-11-27 Thread jim holtman
One way to get rid of the 'for' loop: tapply.shingle <- function(x, s, fn, ...){ unlist(lapply(levels(s), function(.val) mean(x[s > .val[1] & s < .val[2]], ...)) } On Nov 27, 2007 8:56 PM, Roger Levy <[EMAIL PROTECTED]> wrote: > I'm interested in a version of tapply() that operates with shin

Re: [R] extracting year an month from ts data set

2007-11-27 Thread Gabor Grothendieck
If x is your series cycle(x) gives the months and floor(time(x)) gives the years. On Nov 27, 2007 7:57 PM, Richard Saba <[EMAIL PROTECTED]> wrote: > I have an ascii data set of monthly observation starting in Jan 1946 with a > header. > > hstarts > 57 > 65 > 95 > 103 > 103 > 97 > 94 > . > . > . >

[R] Questions on RWeka classifiers

2007-11-27 Thread Li Li
Hi, I am using some classifiers in RWeka packages and met a couple problems. (1) J48 implements C45 classifier, the C45 should be able to handle missing values in both training set and test set. But I found the J48 classifier can not be evaluated on test set with missing values--it just

Re: [R] looking for packages that visualize nucleotide sequence properties

2007-11-27 Thread Bernd Jagla
Hi Jim, I don't have an explicit example. But, most genome browsers have something similar and much more sophisticated than what I am looking for: e.g. http://www.ensembl.org/Homo_sapiens/contigview?seq_region_right=158821424&se q_region_name=7&click_right=490&click_left=40&seq_region_left=1&seq_r

[R] ifelse function

2007-11-27 Thread Min (Tilda) Zhang
Hi there, I need help with IFELSE function. The column g of my dataset pth, pth$g consists of "aa", "ao", "dcl", "iy", "sh". The last few values of pth$g looks like: [4496] sh ao ao sh iy dcl dcl aa iy iy aa sh ao ao Levels: aa ao dcl iy sh I want to convert these values into 1,2,3,4

Re: [R] ifelse function

2007-11-27 Thread Steven McKinney
Hi Min, You don't need to loop. Since your column "g" is a factor variable, it already has integer values 'under the covers'. > pth <- data.frame(g = > c("sh","ao","ao","sh","iy","dcl","dcl","aa","iy","iy","aa","sh","ao","ao")) > > pth g 1 sh 2 ao 3 ao 4 sh 5 iy 6 dcl 7 dcl 8

[R] [OT] putting URLs in Latex

2007-11-27 Thread Edna Bell
Hi R Gurus! This is definitely off topic, but I thought I'd try: what is the way to put in url's into a Latex file, please? I know that you start with a \newcommand statement, with some kind of argument that will change, but I'm not sure how to set it up, please. thanks, Edna Bell

Re: [R] looking for packages that visualize nucleotide sequence properties

2007-11-27 Thread Martin Morgan
The Bioconductor package 'geneplotter' might be useful, http://bioconductor.org/packages/2.1/bioc/html/geneplotter.html Martin "Bernd Jagla" <[EMAIL PROTECTED]> writes: > Hi Jim, > > I don't have an explicit example. But, most genome browsers have something > similar and much more sophisticated

Re: [R] [OT] putting URLs in Latex

2007-11-27 Thread Gabor Grothendieck
See: http://www.stdout.org/~winston/latex/latexsheet.pdf On Nov 27, 2007 11:14 PM, Edna Bell <[EMAIL PROTECTED]> wrote: > Hi R Gurus! > > This is definitely off topic, but I thought I'd try: what is the way > to put in url's into a Latex file, please? > > I know that you start with a \newcommand

Re: [R] [OT] putting URLs in Latex

2007-11-27 Thread Charilaos Skiadas
Nice cheatsheet! Edna, in that cheatsheet you'll find a mention to a package called "url". That's what you want to use. Haris Skiadas Department of Mathematics and Computer Science Hanover College On Nov 28, 2007, at 12:31 AM, Gabor Grothendieck wrote: > See: > > http://www.stdout.org/~winston

[R] question on cdf compare in R

2007-11-27 Thread G Ilhamto
Dear list, I was attracted to a comment that the cdf.compare in S+ is not available in R. I wonder if anyone have more information on this. Thank you. Ilham __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do rea

[R] qestion on cmd scale

2007-11-27 Thread G Ilhamto
Dear list, I am starting a new project in cmdscale, and I have a question regarding distance matrix and covariance matrix. Can anyone help me in this? I sent this message so many times but always bounced with no further explanation. (1) Can I use covariance as my distance matrix? (2) Any good ref

Re: [R] if condition and for cycles

2007-11-27 Thread Frede Aakmann Tøgersen
Compare the evaluation of for (i in 1:10) i to for (i in 1:10) print(i) See also http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-is-the-output-not-printed-when-I-source_0028_0029-a-file_003f Best regards Frede Aakmann Tøgersen Scientist UNIVERSITY OF AARHUS Faculty of Agricultural Scienc