Re: [R] Recommended textbooks for R?

2007-11-28 Thread Jared O'Connell
This page may be helpful :) http://www.r-project.org/doc/bib/R-books.html Modern Applied Statistics with S is quite broad and very good. On Nov 28, 2007 4:38 PM, Max <[EMAIL PROTECTED]> wrote: > Hi everyone! > > I've recently begun to learn R for my job as the IT department suffers > from lack

[R] Recommended textbooks for R?

2007-11-28 Thread Max
Hi everyone! I've recently begun to learn R for my job as the IT department suffers from lack of funding for new software. I was talking to the guy in charge of Requisitions and have found out the budget for books is in great shape. So, I'm curious what books people know of that have R example

Re: [R] Simulate an AR(1) process via distributions? (without specifying a model specification)

2007-11-28 Thread Matthias Kohl
Dear Pedro, you might be interested in the demo "StationaryRegressorDistr" of package "distr". library(distr) demo("StationaryRegressorDistr") hth, Matthias [EMAIL PROTECTED] wrote: > Thanks Prof. Ripley. > > My apologies for not including the code. > > Below I illustrate my point using the G

Re: [R] ggplot2 melt function "value"

2007-11-28 Thread Dieter Menne
Felipe Carrillo yahoo.com> writes: > Hi:I recently started using the melt function and > found that it is very useful and powerful,however I > can't seem to find the way to change the default > column header "value" to my custom column name. melted data are data frames. You can names[..]<-"myva

[R] Locfit kernel regression: automatic bandwidth selection

2007-11-28 Thread Partho Sarkar
Hello all! I have recently started using the LOCFIT package, together with Clive Loader's book. I need to implement some method for automatic (plug-in) bandwidth selection in a multivariate kernel regression. From the book, and the LOCFIT documentation, it is not clear whether this is possible.

[R] how to call out the estimated parameter values

2007-11-28 Thread filame uyaco
hi! i've tried to run this code in R using the VGAM package. I know it's not a good fit. But i encountered a problem in calling the estimated parameter values using fit$estimate. But the codes worked if i put the estimated values just like in this case: y.l <- dgpd(x, scale=0.979421685 ,

Re: [R] help!!!

2007-11-28 Thread Gabor Grothendieck
See if the examples in demo(Ryacas) are what you want (after installing and loading the package). See: http://ryacas.googlecode.com On Nov 28, 2007 10:06 PM, <[EMAIL PROTECTED]> wrote: > Hi, > > I want to ask a question about expression for object. > In the example parts, I saw > trig.exp <-

Re: [R] convert an S plus file to R? ----- Thank you!

2007-11-28 Thread filame uyaco
hi all! Thank you for replying on my message. I will try all your suggestions. Thank you again! Filame filame uyaco <[EMAIL PROTECTED]> wrote: hi! i send again my question because there was a problem earlier that someone did not see my attached file. If you really can't download it,

Re: [R] How to know created time of object in R?

2007-11-28 Thread Tony Plate
The trackObjs package will do this, at the level of objects in an environment. E.g., from the docs: > library(trackObjs) > track.start("tmp1") > x <- 123 # Not yet tracked > track(x) # Variable 'x' is now tracked > track(y <- matrix(1:6, ncol=2)) # 'y' is as

Re: [R] how to read in a txt file with some blanks

2007-11-28 Thread Charilaos Skiadas
Allen, what is the separator then? Can you give us a minimal example of a file? Otherwise we can't really help you much I'm afraid. If you want spaces to count as NA, then you want to set na.strings=" " probably, but read.table by default uses spaces to separate columns, so you will want to

Re: [R] how to read in a txt file with some blanks

2007-11-28 Thread Patrick Connolly
On Wed, 28-Nov-2007 at 06:46PM -0500, affy snp wrote: |> Hi list, |> Is there a way to read in a txt file with some blanks? The ideal way could |> be to replace blanks with NAs. If the fields are delimited by tabs, the blanks will automatically become NAs if you use read.table but without any mor

Re: [R] how to find and use specific column after spliting dataframe

2007-11-28 Thread Hsin-Ya Lee
Dear Dallazuanna: Thanks for your reply. It really has solved my problems. However, I have another question. How can I do, if I need to calculate such equation in all sub-dataframe? I try to use "A.split[]" to catch all sub-dataframe, but it seems can not catch the columns of all sub-dataf

Re: [R] Simulate an AR(1) process via distributions? (without specifying a model specification)

2007-11-28 Thread Prof Brian Ripley
We provide arima.sim() to simulate from stationary ARIMA processes, and I had guessed you were trying to use that. But what your code did was to simulate a non-stationary Gaussian AR(1), fit a marginal distribution to it as if it were iid (it is neither 'i') and then simulate iid samples from t

Re: [R] how to read in a txt file with some blanks

2007-11-28 Thread affy snp
Hi Jim, Thanks a lot! I would like the blanks to be read as NAs. I tried cgh<-read.table(file="WM115A.txt",header = TRUE,fill = TRUE,na.strings = "NA") but the blanks were just filled by their flanking columns. Best, Allen On Nov 28, 2007 7:42 PM, jim holtman <[EMAIL PROTECTED]> wrote:

Re: [R] how to read in a txt file with some blanks

2007-11-28 Thread jim holtman
The question is what do the 'blanks' mean? I assume that they are separating the variables since that is the default for read.table. So what is the difference between: 1) "1 2" one blank 2) "1 2" two blanks 3) "1 2" three blanks 4) How are these different conditions supposed to be

Re: [R] convert an S plus file to R?

2007-11-28 Thread Steven McKinney
Hi, The function you show below performs relatively simple S language stuff, and looks as if it will run as is in R. Looks like you'll need an output object "Hill.2oQV" (I'm guessing from a function of the same name). That Hill.2oQV() function may need some work, but the Hill.AMSE.kopt() funct

Re: [R] boxplot with datapoint

2007-11-28 Thread Charilaos Skiadas
On Nov 28, 2007, at 5:59 PM, Yupu Liang wrote: > Hi, > > I'm using boxplot in R to show box-whiskers plots for about 15 > categories of data. I'd like to display ALL of the data points--not > just the outliers. Does anyone know if there's a parameter setting > that will accomplish this with boxp

[R] help!!!

2007-11-28 Thread guowei
Hi, I want to ask a question about expression for object. In the example parts, I saw trig.exp <- expression(sin(cos(x + y^2))) D(trig.exp, c("x", "y")) Now, I want to define a complex function in "expression", for example, f1(x)=... f2(y)=.. final f=f2(f1(x)+4) may I define

[R] convert an S plus file to R?

2007-11-28 Thread filame uyaco
hi! i send again my question because there was a problem earlier that someone did not see my attached file. If you really can't download it, this is the attached file. Please help me how to convert this S plus file to R. Is there a quick method to do it? I don't have an S plus installer h

Re: [R] Survreg(), Surv() and interval-censored data

2007-11-28 Thread Mohammad Ehsanul Karim
Can anybody give me a neat example of interval censored data analysis codes in R? Given that suvreg(Surv(c(1,1,NA,3),c(2,NA,2,3),type="interval2")~1) works why does survreg(Surv(data[,1],data[,2],type="interval2")~1) not work where data is : T.1 T.2 Status 1 0.0

Re: [R] how to read in a txt file with some blanks

2007-11-28 Thread jim holtman
If the data is fixed field, then read.fwf. Else blanks are normally allowed delimiters. How do you want to interprete blanks? There are number of ways, none of which you have specified. On Nov 28, 2007 6:46 PM, affy snp <[EMAIL PROTECTED]> wrote: > Hi list, > Is there a way to read in a txt fil

Re: [R] Power model in R

2007-11-28 Thread Ruben Roa Ureta
> Dear all, > > How can I fit a power model in R. > > Thanks in advance, > > miltinho > > > > para armazenamento! > > [[alternative HTML version deleted]] Try the approach below with the lognormal distribution for the data. The data is real. Rubén y<-c(2841,1151,1579,1491,1306,2294,1781,1

[R] 6 Courses: Upcoming January-February 2008 R/S+ Course Schedule by XLSolutions Corp

2007-11-28 Thread Sue Turner
Our January-February 2008 R/S+ course schedule is now available. Please check out this link for additional information and direct enquiries to Sue Turner [EMAIL PROTECTED] Phone: 206 686 1578 Can't see your city? Please email us! [2]www.xlsolutions-corp.com/courselist.htm

[R] how to read in a txt file with some blanks

2007-11-28 Thread affy snp
Hi list, Is there a way to read in a txt file with some blanks? The ideal way could be to replace blanks with NAs. Thanks a lot! Allen [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listi

[R] convert an S file to R?

2007-11-28 Thread filame uyaco
hi! attached is an example of S file i got from the net. Can anyone help me how to convert it in R? Is there a quick method on conversion? I don't have S installer here. Thanks for the help. Filame - __ R-he

[R] Power model in R

2007-11-28 Thread Milton Cezar Ribeiro
Dear all, How can I fit a power model in R. Thanks in advance, miltinho para armazenamento! [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] boxplot with datapoint

2007-11-28 Thread Yupu Liang
Hi, I'm using boxplot in R to show box-whiskers plots for about 15 categories of data. I'd like to display ALL of the data points--not just the outliers. Does anyone know if there's a parameter setting that will accomplish this with boxplot? Other options would be to overlay the plotted

[R] Designs with many periods

2007-11-28 Thread Michael Kubovy
Dear R-helpers, Jones & Kenward (2003)¶ discuss balanced designs with many periods (p). It is my impression the algorithmic design packages (AlgDesign, crossdes, conf.design) in R do not handle cases in which the number of treatments (t) is < p. Am I mistaken? To be concrete: I am designing

[R] trouble for building R package in Windows

2007-11-28 Thread aminzoll
Dear All, I think I have followed everything for building my first R package (Downloading Rtools, necessary files in necessary locations, no space in path and...). But when in command Prompt I write "Rcmd check mypackage" the first few steps are "OK" but then it gives the following error: c

Re: [R] ftable as latex (with Hmisc?)

2007-11-28 Thread Richard M. Heiberger
I think this does what you are asking for. It should be relatively easy to write a method latex.ftable() based on this. One or two row.vars and one or two col.vars should be straightforward (with n.rgroup and n.cgroup used for the second row and column). Rich start here df = data.frame(d

[R] Heatmap or Heatmap.2---hclust

2007-11-28 Thread affy snp
Hi list, I used heatmap() and heatmap.2() to draw the dendrogram and got error messages for both. They were: heatmap(as.matrix(y3),col=rainbow(256),scale = "column");dev.off(); Error in hclustfun(distfun(x)) : NA/NaN/Inf in foreign function call (arg 11) Does anybody know how to correct this?

Re: [R] Dates in R

2007-11-28 Thread Horace Tso
Irina, you must have them in character format. You need to convert to Date type. mydates = as.Date(mydates, "%m/%d/%Y") HTH. Horace -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Irina Burmenko Sent: Wednesday, November 28, 2007 11:44 AM To: Horace Tso

Re: [R] Dates in R

2007-11-28 Thread jim holtman
Convert to Date and then compare; > x <- as.Date("4/8/2006", "%m/%d/%Y") > y <- as.Date("5/10/2007", "%m/%d/%Y") > x>y [1] FALSE > On Nov 28, 2007 2:44 PM, Irina Burmenko <[EMAIL PROTECTED]> wrote: > Hi, > > I have dates in the following format: 4/8/2006 (MM/DD/). I need to have > R compar

[R] Power Spectral Sensity

2007-11-28 Thread stephen sefick
I am working with a dissolved oxygen dataset. continuous readings are taken at 15 minute intervals and we have been recording these data at 12 stations along the savannah river for two years now. The longest set of readings that are continuous without interuption is 53 days. I would like to look

[R] Dates in R

2007-11-28 Thread Irina Burmenko
Hi, I have dates in the following format: 4/8/2006 (MM/DD/). I need to have R compare date A to date B to figure out which one is more recent. Is there a way to do that? Simply using the '>' or '<' signs doesn't seem to work. I think in this case R treats '/' as a division sign and give

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

2007-11-28 Thread Galkowski, Jan
Thanks much, François. The price of Okabe et al is quite dear, so I think I'll stick with Aurenhammer's survey, http://doi.acm.org/10.1145/116873.116880 and Aurenhammer and Klein, http://www.pi6.fernuni-hagen.de/publ/tr198.pdf -Original Message- From: Sandrine-et-Francois [mai

Re: [R] Problem using Tobit models in R (Testing and controlling for distributional assumptions and endogeneity)

2007-11-28 Thread roger koenker
url:www.econ.uiuc.edu/~rogerRoger Koenker email[EMAIL PROTECTED]Department of Economics vox: 217-333-4558University of Illinois fax: 217-244-6678Champaign, IL 61820 On Nov 28, 2007, at 2:45 PM, Malte Brockmann wrote: > >

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

2007-11-28 Thread Sandrine-et-Francois
Hi Jan, In case you don't know it already, the reference book for Voronoi diagrams and co. is : Spatial Tessellations: Concepts and Applications of Voronoi Diagrams by Okabe et al. (Ed. Wiley). It's a bit old now ... but it's 'a' good reference. HTH, Best regards, François - Original Message

[R] Problem using Tobit models in R (Testing and controlling for distributional assumptions and endogeneity)

2007-11-28 Thread Malte Brockmann
Dear R-Community, I am currently using Tobit models (survreg in the survival package). 1a) Does R provide a straight-forward way to test distributional assumptions for tobit models? 1b) If not: I tried to apply the Hausman-test proposed in Newey (1987), Journal of Econometrics, on the Tobit es

[R] Rmpi : openmpi and mpi.spawn.Rslaves

2007-11-28 Thread Paul Hewson
Hello, I'm using R on a 10 blade dual quad core Rocks Cluster, and trying to use Rpmi and snow. I basically wondered if at the moment I ought to install Rmpi against another form of mpi (not openmpi) and wondered whether anyone could pass on any experience. I'm mainly worried about (a) the R

Re: [R] visualizing nucleotide sequence properties

2007-11-28 Thread Jean lobry
>Hi there, > >I am looking for R-packages that can help me visualize properties on >nucleotide sequences. I want to display sequences in the 1-100K base range >as lines and plot features above and below those lines. > >Any ideas would be welcome. > >Thanks, > >Bernd Hi Bernd, not sure to understa

Re: [R] Can't make affylmGUI work

2007-11-28 Thread Martin Morgan
Feifei -- Ask on the Bioconductor mailing list http://bioconductor.org. Update your Bioc packages following instructions on the 'install - how to' page linked from the main bioconductor page -- your affy is out of date. Best, Martin Feifei <[EMAIL PROTECTED]> writes: > Hi, > > Can anyone help

Re: [R] Simulate an AR(1) process via distributions? (without specifying a model specification)

2007-11-28 Thread Pedro.Rodriguez
Thanks Prof. Ripley. My apologies for not including the code. Below I illustrate my point using the GLD package. Thank you very much for your time. Kind Regards, Pedro N. Rodriguez # Code begins # Simulate an ar(1) process # x = 0.05 + 0.64*x(t-1) + e # Create the vector x x

Re: [R] How to create data frame from data with unequal length

2007-11-28 Thread Henrique Dallazuanna
Try this: merge(df1, df2, by.y=1, by.x=1, all=T) merge(df1, df2, by.y=1, by.x=1) On 28/11/2007, tom soyer <[EMAIL PROTECTED]> wrote: > Hi, > > I have two sets of data that I would like to put into a data frame. But > since they have different length, I am not sure how to do this. Here is an > exa

Re: [R] How to create data frame from data with unequal length

2007-11-28 Thread Peter Dalgaard
tom soyer wrote: > Hi, > > I have two sets of data that I would like to put into a data frame. But > since they have different length, I am not sure how to do this. Here is an > example of my data: > > data set one: > date growth > 1/1/2007 10 > 1/2/2007 10.2 > 1/3/2007 10.4 > 1/4/200

Re: [R] How to create data frame from data with unequal length

2007-11-28 Thread tom soyer
Merge worked! Thanks!!! On 11/28/07, Matthew Keller <[EMAIL PROTECTED]> wrote: > > Tom, > > Check out ?merge. Does exactly what you need > > Matt > > On Nov 28, 2007 11:27 AM, tom soyer <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I have two sets of data that I would like to put into a data frame. B

Re: [R] How to create data frame from data with unequal length

2007-11-28 Thread Matthew Keller
Tom, Check out ?merge. Does exactly what you need Matt On Nov 28, 2007 11:27 AM, tom soyer <[EMAIL PROTECTED]> wrote: > Hi, > > I have two sets of data that I would like to put into a data frame. But > since they have different length, I am not sure how to do this. Here is an > example of my dat

Re: [R] Graphics after invoking R from the command line

2007-11-28 Thread Duncan Murdoch
On 11/28/2007 12:52 PM, Mithun Jacob wrote: > I wish to run R with Visual C++ as a front end. So I was hoping to run > a file such as graph.r in the following manner: > > R --slave --save --file=graph.r I'd set things up to save the graphics to a file, and get your C++ program to display the fi

[R] How to create data frame from data with unequal length

2007-11-28 Thread tom soyer
Hi, I have two sets of data that I would like to put into a data frame. But since they have different length, I am not sure how to do this. Here is an example of my data: data set one: date growth 1/1/2007 10 1/2/2007 10.2 1/3/2007 10.4 1/4/2007 10.6 data set two: date g

Re: [R] Graphics after invoking R from the command line

2007-11-28 Thread Prof Brian Ripley
On Wed, 28 Nov 2007, Mithun Jacob wrote: >>> Duncan Murdoch > > I wish to run R with Visual C++ as a front end. So I was hoping to run > a file such as graph.r in the following manner: > > R --slave --save --file=graph.r > > But when the plot function runs, it does not display the graph. > >>> Pro

[R] ggplot2 melt function "value"

2007-11-28 Thread Felipe Carrillo
Hi:I recently started using the melt function and found that it is very useful and powerful,however I can't seem to find the way to change the default column header "value" to my custom column name. Does anyone know how to go about this? any suggestions are very appreciated. Thanks Felipe D. Carri

Re: [R] Graphics after invoking R from the command line

2007-11-28 Thread Mithun Jacob
>>Duncan Murdoch I wish to run R with Visual C++ as a front end. So I was hoping to run a file such as graph.r in the following manner: R --slave --save --file=graph.r But when the plot function runs, it does not display the graph. >>Prof Brian Ripley: So would I be correct to assume that it's

Re: [R] Graphics after invoking R from the command line

2007-11-28 Thread Prof Brian Ripley
On Wed, 28 Nov 2007, Mithun Jacob wrote: > I've tried running graphics commands like plot by invoking R at the > command line but the graphics window does not appear. I'm using > R-2.6.0 on Windows XP and am using the cmd shell. Here's a sample > session: > > R --slave --save --file=- > x<-c(1,2,3

Re: [R] PCA with NA

2007-11-28 Thread Paul Hewson
Hello, It's on bioconductor. Try changing the repository when installing packages Best Paul -=-=-=-=-=-=-=-=-=-=-=-= Paul Hewson Lecturer in Statistics School of Mathematics and Statistics University of Plymouth Drake Circus Plymouth PL4 8AA tel (01752) 232778 (Campus) tel (01752) 764437 (Ta

Re: [R] Graphics after invoking R from the command line

2007-11-28 Thread Duncan Murdoch
On 11/28/2007 12:05 PM, Mithun Jacob wrote: > I've tried running graphics commands like plot by invoking R at the > command line but the graphics window does not appear. I'm using > R-2.6.0 on Windows XP and am using the cmd shell. Here's a sample > session: > > R --slave --save --file=- > x<-c(1,

Re: [R] problem with plotting table

2007-11-28 Thread Carlos Gershenson
Thank you very much Duncan, that did the works. Thank you also Gavin and Bernardo for your feedback. Best regards, Carlos __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-pr

Re: [R] Replacing values job

2007-11-28 Thread Peter Dalgaard
Barry Rowlingson wrote: > jim holtman wrote: > >> ?match >> >> >>> X >>> >> [1] 2 6 1 7 4 3 5 >> >>> Y >>> >> [1] 1 1 6 4 6 1 4 1 2 3 6 6 1 2 4 4 5 4 1 7 6 6 4 4 7 1 2 >> >>> match(Y,X) >>> >> [1] 3 3 2 5 2 3 5 3 1 6 2 2 3 1 5 5 7 5 3 4 2 2 5 5 4 3 1 >> >>

Re: [R] Fortran Code to R Code

2007-11-28 Thread Duncan Murdoch
On 11/28/2007 12:54 PM, Dave Roberts wrote: > Bryan, > > The previous responses will point you in the right direction. I > have found, however, that it takes a while to get used to the > requirements, and there are many possible sources of error. This is true, and the advice below is all

Re: [R] PCA with NA

2007-11-28 Thread Birgit Lemcke
Hello, unfortunately I can not find the pcaMethods package. Birgit Am 26.11.2007 um 16:26 schrieb Kevin Wright: > The pcaMethods package offers a collection of different algorithms for > PCA, some of which (NIPALS and others) can be used on data that have > missing values. > > Kevin Wright > >

[R] Graphics after invoking R from the command line

2007-11-28 Thread Mithun Jacob
I've tried running graphics commands like plot by invoking R at the command line but the graphics window does not appear. I'm using R-2.6.0 on Windows XP and am using the cmd shell. Here's a sample session: R --slave --save --file=- x<-c(1,2,3,4) plot(x,x) This leads to nothing. I've found a way

Re: [R] Fortran Code to R Code

2007-11-28 Thread Dave Roberts
Bryan, The previous responses will point you in the right direction. I have found, however, that it takes a while to get used to the requirements, and there are many possible sources of error. 1) You have to convert the main program to a subroutine. Any arrays declared in the main progr

Re: [R] simulating a 2-parameter integrated ornstein-uhlenbeck process?

2007-11-28 Thread Ravi Varadhan
You may want to check the package "sde" that can simulate from a number of different stochastic differential equations, including the OU process. Ravi. --- Ravi Varadhan, Ph.D. Assistant Professor, The Center o

Re: [R] alternatives to traditional least squares method in linear regression ?

2007-11-28 Thread Gabor Grothendieck
You could use the weights= argument of lm or if these points represent a different factor you could add a dummy variable which is one for those points and 0 otherwise. Also check out quantile regression in the quantreg package. On Nov 28, 2007 11:14 AM, Wolfgang Raffelsberger <[EMAIL PROTECTED]> w

[R] Can't make affylmGUI work

2007-11-28 Thread Feifei
Hi, Can anyone help me of the affylmGUI package, I can't get it work and searched for google but can't find any proper solutions. I get the error information each time when I load my cells files, which are shown in the following links. - http://clarezoe.googlepages.com/1.png http://cl

Re: [R] Simulate an AR(1) process via distributions? (without specifying a model specification)

2007-11-28 Thread Prof Brian Ripley
On Wed, 28 Nov 2007, [EMAIL PROTECTED] wrote: > Is it possible to simulate an AR(1) process via a distribution? Any distribution *of errors*, yes. Of the process values, not in general. > I have simulated an AR(1) process the usual way (that is, using a model > specification and using the rando

Re: [R] Clustering

2007-11-28 Thread Dave Roberts
Eleni, The method= argument is in reference to how clusters are constructed, not how the dissimilarity or distance is calculated. If you pass agnes diss=TRUE then it will use the distances you have calculated by whatever means. method="complete" means that clusters are evaluated by the

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

2007-11-28 Thread Mike Prager
"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? In future, you might want to post such questions in group comp.text.tex Mike -- Mike Prager, NOAA, Beaufort, NC * Opinion

Re: [R] Replacing values job

2007-11-28 Thread Barry Rowlingson
jim holtman wrote: > ?match > >> X > [1] 2 6 1 7 4 3 5 >> Y > [1] 1 1 6 4 6 1 4 1 2 3 6 6 1 2 4 4 5 4 1 7 6 6 4 4 7 1 2 >> match(Y,X) > [1] 3 3 2 5 2 3 5 3 1 6 2 2 3 1 5 5 7 5 3 4 2 2 5 5 4 3 1 > I quite like this solution: > X[X[X[X[X[X[X[X[X[X[X]][Y] [1] 3 3 2 5 2 3 5 3 1 6

Re: [R] Clustering

2007-11-28 Thread Birgit Lemcke
Hello Eleni, as far as I understood and used agnes() the method argument determines only the clustering method. If you use diss=TRUE the distances should be taken from the distance matrix. Birgit Am 28.11.2007 um 12:18 schrieb Eleni Christodoulou: > Hello all! > > I am performingsome cluste

Re: [R] Different value between R variance and definition of variance

2007-11-28 Thread Daniel Nordlund
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > Of Tine > Sent: Wednesday, November 28, 2007 12:57 AM > To: r-help@r-project.org > Subject: [R] Different value between R variance and definition of variance > > Hi! > > Let us define random variable: >

Re: [R] using names with functions..

2007-11-28 Thread Peter Dalgaard
vito muggeo wrote: > Dear all, > I have the following (rather) strange problem.. > For some reasons, I finally work with a variable whose name includes an > R function, "a.log(z)", say. And that is a problem when I call it in a > formula, for instance: > > > myname<-"a.log(z)" > > dd<-data.fram

[R] alternatives to traditional least squares method in linear regression ?

2007-11-28 Thread Wolfgang Raffelsberger
Dear list, I have encountered a special case for searching a linear regression where I'm not satisfied with the results obtained using the traditional least squares method (sometimes called OLS) for estimating/optimizing the residues to the regression line (see code below). Basically, a group

Re: [R] Replacing values job

2007-11-28 Thread Peter Dalgaard
Ingmar Visser wrote: > does this do what you want? > > sapply(y,function(y){which(y==x)}) > Maybe, but match(Y,X) would be more to the point. > hth, Ingmar > > On 28 Nov 2007, at 15:53, Serguei Kaniovski wrote: > > >> Hallo, >> >> I have two vectors of different lengths which contain the sam

Re: [R] using names with functions..

2007-11-28 Thread Duncan Murdoch
On 11/28/2007 9:52 AM, vito muggeo wrote: > Dear all, > I have the following (rather) strange problem.. > For some reasons, I finally work with a variable whose name includes an > R function, "a.log(z)", say. And that is a problem when I call it in a > formula, for instance: > > > myname<-"a.lo

Re: [R] Replacing values job

2007-11-28 Thread markleeds
>From: Serguei Kaniovski <[EMAIL PROTECTED]> >Date: 2007/11/28 Wed AM 08:53:34 CST >To: [EMAIL PROTECTED] >Subject: [R] Replacing values job newY<-sapply(1:length(Y), function(.element) match(Y[.element],X)) i hope it helps you. > >Hallo, > >I have two vectors of different lengths which conta

[R] Simulate an AR(1) process via distributions? (without specifying a model specification)

2007-11-28 Thread Pedro.Rodriguez
Dear All, Is it possible to simulate an AR(1) process via a distribution? I have simulated an AR(1) process the usual way (that is, using a model specification and using the random deviates in the error), and used the generated time series to estimate 3- and 4-parameter distributions (for

Re: [R] Replacing values job

2007-11-28 Thread Ingmar Visser
does this do what you want? sapply(y,function(y){which(y==x)}) hth, Ingmar On 28 Nov 2007, at 15:53, Serguei Kaniovski wrote: > > Hallo, > > I have two vectors of different lengths which contain the same set of > values: > > X < -c(2,6,1,7,4,3,5) > Y <- c(1,1,6,4,6,1,4,1,2,3,6,6,1,2,4,4,5,4,1,7

Re: [R] Questions on RWeka classifiers?

2007-11-28 Thread Hans W. Borchers
Li Li gmail.com> writes: > > 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 eval

[R] simulating a 2-parameter integrated ornstein-uhlenbeck process?

2007-11-28 Thread Farzad Noubary
hello everyone, i'm trying to simulate a 2-parameter integrated ornstein-uhlenbeck (IOU) process, but i'm not sure exactly where to start (which package, which function). the motivation is the paper by taylor et. al. (JASA 1994) "a stochastic model for the analysis of longitudinal aids data." t

[R] Clustering

2007-11-28 Thread Eleni Christodoulou
Hello all! I am performingsome clustering analysis on microarray data using agnes{cluster} and I have created my own dissimilarity matrix according to a distance measure different from "euclidean" or "manhattan" etc. My question is, if I choose for example method="complete", how are the distances

Re: [R] using names with functions..

2007-11-28 Thread Gabor Grothendieck
Names not conforming to the usual R syntax can be placed in backquotes: > `log(x)` <- 1:10 > lm(`log(x)` ~ 1) Call: lm(formula = `log(x)` ~ 1) Coefficients: (Intercept) 5.5 On Nov 28, 2007 9:52 AM, vito muggeo <[EMAIL PROTECTED]> wrote: > Dear all, > I have the following (rather) stran

Re: [R] Fail to open R 2.6.1 - additional information

2007-11-28 Thread Duncan Murdoch
On 11/28/2007 9:41 AM, Luis Ridao Cruz wrote: > This is additional information to my previous email (pasted below) > > > ## I opened an R session ( R 2.6.0 on Windows) and got the following > pop-up window: > > ## "This application has failed to start because tk84.dll was not > found. Re-install

Re: [R] Replacing values job

2007-11-28 Thread jim holtman
?match > X [1] 2 6 1 7 4 3 5 > Y [1] 1 1 6 4 6 1 4 1 2 3 6 6 1 2 4 4 5 4 1 7 6 6 4 4 7 1 2 > match(Y,X) [1] 3 3 2 5 2 3 5 3 1 6 2 2 3 1 5 5 7 5 3 4 2 2 5 5 4 3 1 > On Nov 28, 2007 9:53 AM, Serguei Kaniovski <[EMAIL PROTECTED]> wrote: > > Hallo, > > I have two vectors of different lengths which

Re: [R] Replacing values job

2007-11-28 Thread Richard . Cotton
> I have two vectors of different lengths which contain the same set of > values: > > X < -c(2,6,1,7,4,3,5) > Y <- c(1,1,6,4,6,1,4,1,2,3,6,6,1,2,4,4,5,4,1,7,6,6,4,4,7,1,2) > > How can I replace the values in Y with the index (!) of the corresponding > values in X. So 2 appears in X in the first

Re: [R] windows vista

2007-11-28 Thread Wolfgang Raffelsberger
Dear Suzuky, basically you can run R on Vista like you can on Windows XP. However, there is one issue about installing additional packages : When launching R under Vista, by default you won't launch as administrator, and in consequence you can't install additional packages (i.e. installing conv

[R] using names with functions..

2007-11-28 Thread vito muggeo
Dear all, I have the following (rather) strange problem.. For some reasons, I finally work with a variable whose name includes an R function, "a.log(z)", say. And that is a problem when I call it in a formula, for instance: > myname<-"a.log(z)" > dd<-data.frame("a.log(z)"=1:10,y=rnorm(10)) >

Re: [R] windows vista

2007-11-28 Thread Gabor Grothendieck
R works on Vista provided you have learned enough about Vista to get around the enhanced security model. Microsoft One Care software and the overall better security of Vista is, in my opinion, much superior to Norton/Symantec/XP. Many people use Skype these days and Skype is not officially suppor

[R] Replacing values job

2007-11-28 Thread Serguei Kaniovski
Hallo, I have two vectors of different lengths which contain the same set of values: X < -c(2,6,1,7,4,3,5) Y <- c(1,1,6,4,6,1,4,1,2,3,6,6,1,2,4,4,5,4,1,7,6,6,4,4,7,1,2) How can I replace the values in Y with the index (!) of the corresponding values in X. So 2 appears in X in the first coordina

[R] Fail to open R 2.6.1 - additional information

2007-11-28 Thread Luis Ridao Cruz
This is additional information to my previous email (pasted below) ## I opened an R session ( R 2.6.0 on Windows) and got the following pop-up window: ## "This application has failed to start because tk84.dll was not found. Re-installing the application may fix the problem" ## I have now upgr

[R] Fail to open R 2.6.1

2007-11-28 Thread Luis Ridao Cruz
R-help, I opened an R session ( R 2.6.0 on Windows) and got the following pop-up window: "This application has failed to start because tk84.dll was not found. Re-installing the application may fix the problem" I have now upgraded to R 2.6.1 but the same fatal error comes up. Can someone let me

Re: [R] Antwort: Re: Order observations in a dataframe

2007-11-28 Thread Richard . Cotton
> >How > >can > >> I re-label the groups in the descending order of their cumulative > >"weight", > >foo = data.frame(country=c("bul", "cze", "grc", "hun", "prt", "rom", > >"fra", "ita", "gbr", "aut", "bel"), > >weight=c(10,12,12,12,12,4,29,29,29,10,12), > >group=c(1,1,1,1,1,1,2,2,2,3,3)) > > > >#

Re: [R] windows vista

2007-11-28 Thread aaront
If the administrator account does not exist, this info provided for another software program I use may be helpful: "Some Windows Vista installations may have the Administrator account turned off. If so, it is easy to turn the true Administrator account on. To do so, open the Control Panel and ope

[R] question about warning message in nlme model

2007-11-28 Thread Christine Calmes
I am writing to inquire about a warning message that I receive when trying to model a random slope and intercept at the second level of a 3-level model. Specifically, I am testing a 3-level model in which time (WEEK) is nested in participants (PARTICIP) and participants are nested in dyads (DY

Re: [R] Http_proxy settings with autoproxy.php

2007-11-28 Thread Prof Brian Ripley
On Wed, 28 Nov 2007, Lusseau, David wrote: > Just installed R on a new machine which is on a server. I am trying to Under Windows, I infer. > download packages but seem to have trouble with our proxy settings. I > have read the 2.19 section in R for Windows and tried what was suggested > (settin

Re: [R] interaction of continuous terms

2007-11-28 Thread Prof Brian Ripley
It's meaningful, but not under the name 'interaction'. The model is the same as y ~ x1 + x2 + I(x1*x2) that is, 'including a product term'. However, needing product terms often indicates a missed transformation of y (e.g. it might be better to use log(y)). On Wed, 28 Nov 2007, Irene Mantzou

[R] Http_proxy settings with autoproxy.php

2007-11-28 Thread Lusseau, David
Just installed R on a new machine which is on a server. I am trying to download packages but seem to have trouble with our proxy settings. I have read the 2.19 section in R for Windows and tried what was suggested (setting http_proxy) but that did not help (still cannot connect). I think my problem

[R] interaction of continuous terms

2007-11-28 Thread Irene Mantzouni
Hi all! this is a rather statistical question: is it meaningful to consider an interaction effect between 2 continuous covariates? for example: lm(y~x1+x2+x1:x2) Should one of continuous x1, x2 be "transformed" to a categorical variable, i.e. be classified into groups? Is it easier to interpre

Re: [R] Fortran Code to R Code

2007-11-28 Thread Scionforbai
help.start(), then "Writing R extensions". You can link fortran subroutines to R by compiling them in a shared library (.so or .dll depending on your system) by the command: R CMD SHLIB file1.f file2.f -o myfortransubroutines.so and then from R you first dyn.load("myfortransubroutines.so") and

Re: [R] how to find and use specific column after spliting dataframe

2007-11-28 Thread Henrique Dallazuanna
Try this: A.split[[1]]["time"] A.split[[1]][["concentration"]] test <- NULL for(i in 2:4){ test[i] <- (A.split[[1]][["time"]][i] - A.split[[1]][["time"]][i-1]) * (A.split[[1]][["concentration"]][i] - A.split[[1]][["concentration"]][i-1]) * 0.5 } On 28/11/2007, leeznar <[EMAIL PROTECTED]>

Re: [R] Order observations in a dataframe

2007-11-28 Thread Henrique Dallazuanna
Try this: df$group <- factor(df$group) levels(df$group)<- names(sort(tapply(df$weight, df$group, sum), decreasing=T)) On 28/11/2007, Serguei Kaniovski <[EMAIL PROTECTED]> wrote: > > > Dear All, > > Suppose I have the following dataframe: > > country;weight;group > bul;10;1 > cze;12;1 > grc;12;1

  1   2   >