Re: [R] Simple Newbie Question

2008-02-22 Thread Liviu Andronic
On 2/21/08, MassimoH <[EMAIL PROTECTED]> wrote: > 1) How does R handle dates? It seems there is no built-in support for dates, This might be useful: http://www.statmethods.net/input/dates.html Liviu __ R-help@r-project.org mailing list https://stat.et

Re: [R] How to Include greek symbol in axis label?

2008-02-22 Thread Prof Brian Ripley
On Fri, 22 Feb 2008, Kenneth Takagi wrote: > Hi, I'm fairly new to R, so hopefully this is an easy question... Sorry, no as you haven't given us the minimum information asked for in the posting guide and we are reduced to attempted mind reading. What is 'font=6'? R only has font = 1 to 5. The

[R] ginv and matlab's pinv give different results

2008-02-22 Thread Pedro Mardones
Dear all; I'm kind of confused with the results obtained using the ginv function from package MASS and pinv function from Matlab. Accroding to the documentation both functions performs a Moore-Penrose generalized inverse of a matrix X. The problem is when I change the tolerance value, say to 1E-3.

Re: [R] Fixed effects

2008-02-22 Thread jim holtman
help.search('fixed effect') creates these matches. Does one of the do what you want? Help files with alias or concept or title matching 'fixed effect' using fuzzy matching: fixef(lme4)Extract Fixed Effects lmer(lme4) Fit (Generalized) Linear Mixed-Effect

Re: [R] counting sequence mismatches

2008-02-22 Thread Martin Morgan
One kind of ugly solution > d.f=data.frame(seq1, seq2, stringsAsFactors=FALSE) > d.f[["nMismatch"]] <- with(d.f, { + m <- mapply("!=", strsplit(seq1, ""), strsplit(seq2, "")) + colSums(m) + }) Check out the Bioconductor Biostrings package, especially the version available with the developm

[R] counting sequence mismatches

2008-02-22 Thread joseph
Hello I have 2 columns of short sequences that I would like to compare and count the number of mismatches and record the number of mismatches in a new column. The sequences are part of a data frame that looks like this: seq1=c("CGGTGTAGAGGAAAGGAAACAGGAGTTC","CGGTGGTCAGTCTGGGACCTGGGCAGCAGGCT

[R] Fixed effects

2008-02-22 Thread Petros Andreou
Hello everyone! I would really appreciate it if someone knew where could I find the command in R in order to run a fixed effects regression. What format should my data have? I have looked through the manual and I could not find anything Thank you in advance, Petros [[alternative HTML

[R] using subset() in data frame

2008-02-22 Thread Robert Walters
R folks, As an R novice, I struggle with the mystery of subsetting. Textbook and online examples of this seem quite straightforward yet I cannot get my mind around it. For practice, I'm using the code in MASS Ch. 6, "whiteside data" to analyze a different data set with similar variables and str

Re: [R] Corrected : Efficient writing of calculation involving each element of 2 data frames

2008-02-22 Thread jim holtman
take a look at the 'embed' function. With the you can create a matrix with the added shifted in each column. You would want to do embed(your.data,100). On Fri, Feb 22, 2008 at 4:15 PM, Vikas N Kumar <[EMAIL PROTECTED]> wrote: > Hi > > I have 2 data.frames each of the same number of rows (approxi

Re: [R] Problem with cut

2008-02-22 Thread jim holtman
You can also get more detail on where the intervals are with 'dig.lab': > cc <- cut(vv, 12, dig.lab=6) > str(cc) Factor w/ 12 levels "(149.804,166.17]",..: 1 1 1 1 1 2 2 2 2 3 ... > cc [1] (149.804,166.17] (149.804,166.17] (149.804,166.17] (149.804,166.17] (149.804,166.17] [6] (166.17,182.53

Re: [R] Problem with cut

2008-02-22 Thread jim holtman
One way of finding out is to look at the code for cut.default. Here is the result of tracing through it where it determines where the cuts are for 12 equal spacings: D(2)> [1] 149.804 166.170 182.536 198.902 215.268 231.634 248.000 264.366 280.732 297.098 313.464 329.830 [13] 346.196 As you can

[R] projection.matrix() {popbio} for more than one matrix

2008-02-22 Thread Michelle DePrenger-Levin
Hello, I am trying to use the projection.matrix( ) function and am following the example given. I have my data formatted very similar to the test.census example. > str(AsMi05mat) `data.frame': 1854 obs. of 6 variables: $ Tag : num 501 502 503 504 505 506 507 508 509 510 ... $

Re: [R] Mixed model Nested ANOVA

2008-02-22 Thread Rune Haubo
Hi Stephen On 22/02/2008, Stephen Cole <[EMAIL PROTECTED]> wrote: > hello R help > > I am trying to analyze a data set that has been collected from a > hierarchical sampling design. The model should be a mixed model nested > ANOVA. The purpose of my study is to analyze the variability at each

Re: [R] Mixed model Nested ANOVA

2008-02-22 Thread jebyrnes
So, Site is nested in location. Location is nested in Region. And you are looking at how density varies. Let's think about this from the point of view of a model with varying intercepts. You have some mean density in your study. That mean will deviate by site, location, and region. Each of w

[R] How to Include greek symbol in axis label?

2008-02-22 Thread Kenneth Takagi
Hi, I'm fairly new to R, so hopefully this is an easy question... On a plot, I would like to have the y label read: "Response(phi)" with phi = the greek character. From old posts I've found this: title(ylab=expression(paste("Response (", phi, ")"))) This displays nicely, but in the default fo

Re: [R] History of R

2008-02-22 Thread Paul Gilbert
Kathy The dedication of the developers and several other important things have already been mentioned. Here are a few points I have not seen. - I believe S was originally open source (before the term existed and before GPL, and license issues were probably clouded with respect to changing the

Re: [R] abline in log-log power law plot

2008-02-22 Thread Peter Dalgaard
hadley wickham wrote: > On Fri, Feb 22, 2008 at 2:38 PM, martin klein <[EMAIL PROTECTED]> wrote: > >> I have a power law plot in log-log scale using plot(x,y,log="xy") but I >> can't get the regression line to plot correctly. >> abline(lm(log(y)~log(x))) plots a straight line that looks promi

Re: [R] abline in log-log power law plot

2008-02-22 Thread hadley wickham
On Fri, Feb 22, 2008 at 2:38 PM, martin klein <[EMAIL PROTECTED]> wrote: > > I have a power law plot in log-log scale using plot(x,y,log="xy") but I > can't get the regression line to plot correctly. > abline(lm(log(y)~log(x))) plots a straight line that looks promising but > the intercept with

Re: [R] Mixed model Nested ANOVA

2008-02-22 Thread Mark Difford
Hi Stephen, Hopefully you will get an answer from one of the experts on mixed models who subscribe to this list. However, you should know that both lme() and lmer() currently have anova() methods. The first will give you p-values (but no SS), and the second will give you SS (but no p-values).

[R] Corrected : Efficient writing of calculation involving each element of 2 data frames

2008-02-22 Thread Vikas N Kumar
Hi I have 2 data.frames each of the same number of rows (approximately 3 or more entries). They also have the same number of columns, lets say 2. One column has the date, the other column has a double precision number. Let the column names be V1, V2. Now I want to calculate the correlation of

Re: [R] applying a function to data frame columns

2008-02-22 Thread Henrique Dallazuanna
One thing is needed: names(v) <- names(u) PS:Thanks Mark Leeds On 22/02/2008, Henrique Dallazuanna <[EMAIL PROTECTED]> wrote: > Try this: > > sapply(names(u), function(x)u[x][u[x] >=min(v[x]) & u[x] <= max(v[x])]) > > > On 21/02/2008, dxc13 <[EMAIL PROTECTED]> wrote: > > > > useR's, > >

[R] efficient writing of calculation involving each element of 2 data frames.

2008-02-22 Thread Vikas N Kumar
Hi I have 2 data.frames each of the same number of rows (approximately 3 or more entries). They also have the same number of columns, lets say 2. One column has the date, the other column has a double precision number. Let the column names be V1, V2. Now I want to calculate the correlation of

[R] abline in log-log power law plot

2008-02-22 Thread martin klein
I have a power law plot in log-log scale using plot(x,y,log="xy") but I can't get the regression line to plot correctly. abline(lm(log(y)~log(x))) plots a straight line that looks promising but the intercept with the y-axis seems to be way off. summary(lm(log(y)~log(x))) gives the values but i can

Re: [R] Drawing several pictures on a plot

2008-02-22 Thread Roland Rau
Hi Marcin, in addition to Greg Snow's answer, you may also check the "Introduction to R" Manual, especially Section 12.5. In subsection 12.5.3 (in the PDF version), there is also a graphical example of the margins. http://cran.r-project.org/doc/manuals/R-intro.pdf Mam nadzieje, ze to pomoze. D

Re: [R] Looping and Pasting

2008-02-22 Thread Erik Iverson
See if the following helps you understand what you want. This won't work: get("m.1$medoids") But you can do get("m.1")$medoids lst1 <- list(a = 10, b = 20, c = 30) ##create a list get("lst1") ## gets whole objec get("lst1$a") ## does not work get("lst1")$a ## works get(paste("lst", 1, sep =

Re: [R] Looping and Pasting

2008-02-22 Thread Greg Snow
Try: for( i in 255 ){ plot( get( paste('m.', i, sep='') )$medoids ) } For future use it may be easier to put m1, m2, ... Into a list and work with that: med.list <- list() for( i in 1:255 ){ med.list[[i]] <- get( paste('m.',i,sep='') ) } lapply( med.list, function(x) plot(x

[R] Looping and Pasting

2008-02-22 Thread Mark Orr
Hello R-community: Much of the time I want to use loops to look at graphs, etc. For example, I have 25 plots, for which the names are m.1$medoids, m.2$medoids, ..., m.25$medoids. I want to index the object number (1:25) as below (just to show concept). for (i in 1:25){ plot(m.i$medoids) } I've

Re: [R] Drawing several pictures on a plot

2008-02-22 Thread Greg Snow
The empty space is the margins around the plot. The par function is used to set the size of the margins using either mar or mai arguments. Setting this to a smaller set of values will give your individual plots more space. You may also want to look at the oma argument to set an outer margin (for

Re: [R] plotting every ith data point?

2008-02-22 Thread Greg Snow
Just to give you more options to choose from, Here is a variation on Gabor's solution: with(example.df[c(TRUE,FALSE,FALSE,FALSE,FALSE),], { plot(DSR1 ~ StartDate, type = "b", ylim = c(0.3, 0.9)) points(DSR2 ~ StartDate, type = "b", pch = 3) }) Move the TRUE around and you get the differe

[R] best practise for organizing data for ggplot faceting?

2008-02-22 Thread B. Bogart
Hello all,, What is the best practise for organizing data for easy ggplot faceting? Right now I have a list of data.frames, each being an image. I can plot them with geom_tile separately, but as a list of data.frames I see no easy way to facet. For this kind of data what is the best practise to o

Re: [R] Labels in plot()

2008-02-22 Thread Erik Iverson
Should be ?axis , not ?axes, apologies. Erik Iverson wrote: > Marcin - > > Those are warnings, not errors. You probably are looking for > > plot(xy, ann = FALSE, axes = FALSE) > > If you want a box drawn around the plot still, try > > plot(xy, ann = FALSE, axes = FALSE, frame.plot = TRUE) > >

[R] Nonlinear autoregression and spectral analysis (mixed spectra)

2008-02-22 Thread Nuno Prista
Hi, I am studying frequency the seasonal cycle of a time-series that I believe includes also an AR (1) component. I would be interested in estimating frequency, amplitude and phase of the main seasonal cycle of the parameter of the AR component. I have preliminary estimates of the seasonal par

Re: [R] Labels in plot()

2008-02-22 Thread Erik Iverson
Marcin - Those are warnings, not errors. You probably are looking for plot(xy, ann = FALSE, axes = FALSE) If you want a box drawn around the plot still, try plot(xy, ann = FALSE, axes = FALSE, frame.plot = TRUE) see ?plot.default and ?axes for more options. Best, Erik Iverson Marcin Kozak w

[R] Labels in plot()

2008-02-22 Thread Marcin Kozak
Hi, Look here: xy<-matrix(rnorm(100,100,10),50) plot(xy,ann=F,labels=F) Even though the error is reported, the "labels" do what I want them to. Any reason for this? Thanks, Marcin __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/list

[R] Drawing several pictures on a plot

2008-02-22 Thread Marcin Kozak
Hi, I want to draw several pictures on one plot and do as follows: xy<-matrix(rnorm(100,100,10),50) op <- par(mfrow = c(2, 2), pty = "s") plot(xy,ann=F);plot(xy,ann=F);plot(xy,ann=F);plot(xy,ann=F) par(op) What I need now is to set the size of the pictures within this plot since there is too muc

Re: [R] Combining Data Frames

2008-02-22 Thread Gabor Grothendieck
You could do it with zoo: DF1 <- data.frame(Datetime = ISOdate(2000, 1:2, 1), Temp = 1:2) DF2 <- data.frame(Datetime = ISOdate(2000, 2:3, 1), Temp = 3:4) library(zoo) # convert to zoo z1 <- zoo(DF1[,2], DF1[,1]) z2 <- zoo(DF2[,2], DF2[,1]) # merge z <- merge(z1, z2, all = TRUE) # take rowmeans

Re: [R] Simultaneously summarizing many models

2008-02-22 Thread Henrique Dallazuanna
Another option: lapply(ls(patt="^m[0-9]"), function(model)summary(get(model))) On 22/02/2008, Christoph Scherber <[EMAIL PROTECTED]> wrote: > Dear R users, > > Let´s say I have 10 models, each named m1,m2,m3..., and I would like to > summarize them automatically > and simultaneously - e.g., t

Re: [R] Combining Data Frames

2008-02-22 Thread Henrique Dallazuanna
Try this: x Datetime Temp 1 01/01/07 00:01 11.5 2 01/01/07 00:16 11.6 y Datetime Temp 1 01/01/07 00:01 10 2 01/01/07 00:163 merge(x, y, by="Datetime") Datetime Temp.x Temp.y 1 01/01/07 00:01 11.5 10 2 01/01/07 00:16 11.6 3 On 22/02/2008, stephen sef

[R] Combining Data Frames

2008-02-22 Thread stephen sefick
I have two dataframes in R that were tab seperated .txt files y<-read.table("foo.txt", header=T) x<-read.table("foo.txt", header=T) these are set up like this: Datetime Temp 01/01/07 00:01 11.5 01/01/07 00:16 11.6 etc etc to 66000 rows in y and 33000 rows in x T

Re: [R] applying a function to data frame columns

2008-02-22 Thread Tim Hesterberg
You can do: lapply2(u, v, function(u,v) u[inRange(u, range(v))]) using two functions 'lapply2' and 'inRange' defined at bottom. This basically does: lapply(seq(along=u), function(i, U, V){ u <- U[[i]] v <- V[[i]] u

Re: [R] coloring a graph left or right of an abline

2008-02-22 Thread Greg Snow
Here is one approach: > library(TeachingDemos) > > x <- rnorm(1000) > > hist(x) > clipplot( hist(x, col='blue', add=TRUE), xlim=c(0.2,par('usr')[2] ) ) > clipplot( hist(x, col='red', add=TRUE), xlim=c( par('usr')[1], 0.2 ) ) > abline(v=0.2, col='green', lwd=5) > Hope this helps, -- Gregory (

Re: [R] Biomechanics

2008-02-22 Thread Duncan Murdoch
On 2/22/2008 11:46 AM, Maura E Monville wrote: > I serched the R packages list for Biomechanics applications. > I am sure there are many. Maybe I did not use the right keywords. > Please, any suggestion is welcome. My orientlib package was motivated by a biomechanics application, and you might

[R] Mixed model Nested ANOVA

2008-02-22 Thread Stephen Cole
hello R help I am trying to analyze a data set that has been collected from a hierarchical sampling design. The model should be a mixed model nested ANOVA. The purpose of my study is to analyze the variability at each spatial scale in my design (random factors, variance components), and say some

Re: [R] re place column names

2008-02-22 Thread John Kane
What code did you use? It is difficult to guess what you have done. names(dataset)<- myfile$labels should work --- hochoi <[EMAIL PROTECTED]> wrote: > > Hi, > > When I tried to replace column names in a data set > with label names read > from a separated file, > I got the following message: >

Re: [R] triangle.plot - change the axes orientation

2008-02-22 Thread Greg Snow
There are several implementations of these plots in different packages, The ones I know of are: 'triangle.plot' in package ade4, 'ternaryplot' in package vcd, 'tri' in package cwhtool, 'soil.texture' and 'triax.plot' in package plotrix, and 'triplot' in TeachingDemos. (are there any ot

Re: [R] YAML parser for R in Windows

2008-02-22 Thread Barry Rowlingson
Albicelli, Nicholas (Exchange) wrote: > How can I parse a YAML file in R 2.6.0 in Windows? I cannot get the > RYaml package to compile in Windows, I can't find a MinGW compiled .dll > for an existing YAML parser like syck (which would appear to be the best > hope for creating my own R wrapper func

Re: [R] fitting a lognormal distribution using cumulative probabilities

2008-02-22 Thread Prof Brian Ripley
On Sat, 23 Feb 2008, ahimsa campos-arceiz wrote: > Dear all, > > I'm trying to estimate the parameters of a lognormal distribution fitted > from some data. > > The tricky thing is that my data represent the time at which I recorded > certain events. However, in many cases I don't really know when

[R] Biomechanics

2008-02-22 Thread Maura E Monville
I serched the R packages list for Biomechanics applications. I am sure there are many. Maybe I did not use the right keywords. Please, any suggestion is welcome. Thank you in advance, -- Maura E.M [[alternative HTML version deleted]] __ R-help

Re: [R] What exactly does rchkusr() do?

2008-02-22 Thread Prof Brian Ripley
rchkusr is documented in 'Writing R Extensions', as an entry point in R. Please read there exactly what it does. On Fri, 22 Feb 2008, Guilherme Veiga da Rocha wrote: > Hi all, > > I am trying to compile a fortran routine originally written for R > from within matlab. > > It all

[R] What exactly does rchkusr() do?

2008-02-22 Thread Guilherme Veiga da Rocha
Hi all, I am trying to compile a fortran routine originally written for R from within matlab. It all worked fine, but the newest version of the Fortran code has a call to rchkusr() and I now get a message that this is an undefined symbol.

[R] YAML parser for R in Windows

2008-02-22 Thread Albicelli, Nicholas (Exchange)
How can I parse a YAML file in R 2.6.0 in Windows? I cannot get the RYaml package to compile in Windows, I can't find a MinGW compiled .dll for an existing YAML parser like syck (which would appear to be the best hope for creating my own R wrapper functions), and I don't know how to call a Ruby or

Re: [R] Problems with aggregate

2008-02-22 Thread Mcmahon, Kevin
Thank you so much, Martin and Henrique! I followed Martin's advice and everything worked great! I'm sure Henrique's advice will also prove helpful, because it often asked for a 'FUN' that was missing, which I'm sure is match.fun(min). Anyway, I'm just glad it worked! Thanks so much! K. Wyatt

Re: [R] Problem with cut

2008-02-22 Thread Henrique Dallazuanna
Is to show the categorys which contains '330' On 22/02/2008, Heinz Tuechler <[EMAIL PROTECTED]> wrote: > At 15:22 22.02.2008, Henrique Dallazuanna wrote: > >Try this: > > > >grep("330", levels(cc), value=T) > > > Could you please explain in a little more detail, > how this answers the original

Re: [R] re place column names

2008-02-22 Thread R Help
names(dat) will return the column names for a dataset called dat, and they can also be set this way. names(dat) <- c("firstName","secondName","thirdName",...) I would suggest reading the column names into a vector, and then assigning them as demonstrated above. On Fri, Feb 22, 2008 at 9:42 AM, h

Re: [R] Problem with cut

2008-02-22 Thread Heinz Tuechler
At 15:22 22.02.2008, Henrique Dallazuanna wrote: >Try this: > >grep("330", levels(cc), value=T) Could you please explain in a little more detail, how this answers the original question? "I would have expected 330 to fall into (313,330] category. Can you please advice what do I do wrong?" Thank

[R] Cross Validation in rpart

2008-02-22 Thread R Help
Hello All, I'm writing a custom rpart function, and I'm wondering about cross-validation. Specifically, why isn't my splitting function being called more often with the xval increased? One would expect that, with xval=10 compared to xval=1, that the prior would call the splitting function mo

Re: [R] bootstrap: definition of original statistic

2008-02-22 Thread Frank E Harrell Jr
Gad Abraham wrote: > Hi, > > In the boot package, the original statistic is simply the statistic > function evaluated on the original data (called t0). > > However, in Harrell et al 1996 "Multivariable prognostic models..." > Stats Med vol 15, pp. 361--387, it is different (p. 372): > The statist

Re: [R] Simultaneously summarizing many models

2008-02-22 Thread Richard . Cotton
> Let´s say I have 10 models, each named m1,m2,m3..., and I would like > to summarize them automatically > and simultaneously - e.g., to extract parameter estimates later on > from all models; how can I do that? > > I have tried: > > x=1:10 #this creates some example data > y=rnorm(10) > > m1

Re: [R] History of R

2008-02-22 Thread Michael A. Miller
> "Greg" == Greg Snow <[EMAIL PROTECTED]> writes: > There are a couple of ideas that I would like to add that > may have played a part in the level of growth that R has > had. Something that I haven't seen mentioned yet that played a role in my adopting R is the ability to create

[R] fitting a lognormal distribution using cumulative probabilities

2008-02-22 Thread ahimsa campos-arceiz
Dear all, I'm trying to estimate the parameters of a lognormal distribution fitted from some data. The tricky thing is that my data represent the time at which I recorded certain events. However, in many cases I don't really know when the event happened. I' only know the time at which I recorded

Re: [R] Problem with cut

2008-02-22 Thread Henrique Dallazuanna
Try this: grep("330", levels(cc), value=T) On 22/02/2008, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi All, > > I might misunderstood how cut works. But following behaviour surprises > me. > > vv <- seq(150, 346, by= 4) > cc <- cut(vv, 12) > cc[vv == 330] > Results [1] (330,346] > > I

[R] re place column names

2008-02-22 Thread hochoi
Hi, When I tried to replace column names in a data set with label names read from a separated file, I got the following message: Error in `[.data.frame` (dataset, , classlabel): undefined columns selected I am new in R programming languague. Could someone please tell me what do I need to consid

[R] R expertise

2008-02-22 Thread beukerspkpd
Dear all, Should you be interested in a career at our mechanism-based PK-PD modeling platform, please read the remainder of this message. Best wishes, Margot Beukers Unique PK-PD modeling platform established in The Netherlands Are you our ambitious IT platform manager with a pr

[R] I am away on 22 Feb (pm)

2008-02-22 Thread Hwee Pin PHUA
I will be out of the office starting 22/02/2008 and will not return until 25/02/2008. I will respond to you when I return. Have a great day! Hwee Pin __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] Nested frailty model

2008-02-22 Thread Terry Therneau
You want to use coxme, currently found in the kinship package. It uses lme style input, e.g. coxme(Surv(time, status) ~ age + weight, data=mydata, random= ~1 | school/teacher) One note: your message seems to imply that you want to use group/subject as

[R] Problem with cut

2008-02-22 Thread Jussi.Lehto
Hi All, I might misunderstood how cut works. But following behaviour surprises me. vv <- seq(150, 346, by= 4) cc <- cut(vv, 12) cc[vv == 330] Results [1] (330,346] I would have expected 330 to fall into (313,330] category. Can you please advice what do I do wrong? Many Thanks, Jussi Lehto V

Re: [R] reshaping data frame

2008-02-22 Thread ahimsa campos-arceiz
Dear Chuck, John, Vikas, and useRs, thank you very much for your great suggestions. I received three replies providing different ways to reshape my original data.frame (original question at the bottom). There are however some discrepancies in their results (most likely because I didn't explain my

Re: [R] how to create ROC curve for 2 dimensional classifiers

2008-02-22 Thread Tobias Sing
The are some papers on the topic (google for "roc surfaces"), but no R packages for multi-class ROC analysis. I personally have some doubts about the practical value of these approaches in the case of more than two classes, but others may disagree. Kind regards, Tobias On Thu, Feb 21, 2008 at

Re: [R] how to create ROC curve for 2 dimensional classifiers

2008-02-22 Thread Richard Pearson
I'm not aware of any packages for doing such plots. Conceptually, presumably a ROC curve for a 2d classifier would be a 3d chart, with x-axis being FPR for 1st classifier, z-axis being FPR for 2nd classifier and y-axis being TPR. You would get a "ROC surface" rather than a ROC curve. Does that

Re: [R] Transfer Crosstable to Word-Document

2008-02-22 Thread bartjoosen
I must admit it's a very bad practice, but if you put these files in a separate folder, and you know what you have been busy with, I think it's less important. At least it saves you some mouse clicks But Philippe, you are absolutely rigth about the bad practice! Bart Philippe Grosjean wrot

Re: [R] Simultaneously summarizing many models

2008-02-22 Thread ONKELINX, Thierry
Store the models into a list and the use an apply-function. x=1:10 #this creates some example data y=rnorm(10) m1=lm(x~y) m2=lm(x~1) Models <- list(m1, m2) lapply(Models, summary) HTH, Thierry ir. Thierry Onkelinx I

[R] Simultaneously summarizing many models

2008-02-22 Thread Christoph Scherber
Dear R users, Let´s say I have 10 models, each named m1,m2,m3..., and I would like to summarize them automatically and simultaneously - e.g., to extract parameter estimates later on from all models; how can I do that? I have tried: x=1:10 #this creates some example data y=rnorm(10) m1=lm(x~

[R] Creating subplots of a ridge trace generated using matplot (ridge regression)

2008-02-22 Thread lara harrup (IAH-P)
Hi I am using ridge regression as a method to over come the multicollinearity in my dataset and in order to select the lambda (ridge estimator/regularization parameter) I am generating a ridge trace using the following commands (using R version 2.6.1): >library(MASS) >model_0.5km_ridge<- lm.ridge

Re: [R] Problems with aggregate

2008-02-22 Thread Henrique Dallazuanna
You can use match.fun x V1 V2 1 2 3.2 2 15 1.2 3 2 8.4 4 8 9.2 5 7 0.4 min <- aggregate(x, list(x[,1]), min) min <- aggregate(x, list(x[,1]), match.fun(min)) On 21/02/2008, Mcmahon, Kevin <[EMAIL PROTECTED]> wrote: > Hello list, > > > > I'm new to this list, so please forgive my ignoran

[R] addtable2plot(plotrix)

2008-02-22 Thread Markus Didion
Dear List adding a table to a plot using addtable2plot(plotrix) does not seem to work when using a logarithmic axis. The table is then reduced to one line. Is there an argument to indicate that a log-scale is used, or an alternative to add a bunch of information to a plot? I'm using R 2.6.1 o

Re: [R] applying a function to data frame columns

2008-02-22 Thread Henrique Dallazuanna
Try this: sapply(names(u), function(x)u[x][u[x] >=min(v[x]) & u[x] <= max(v[x])]) On 21/02/2008, dxc13 <[EMAIL PROTECTED]> wrote: > > useR's, > > I want to apply this function to the columns of a data frame: > > u[u >= range(v)[1] & u <= range(v)[2]] > > where u is the n column data frame und

Re: [R] Function for linear mixed model with gamma-distribu ted random effects?

2008-02-22 Thread Dieter Menne
Christopher Hatherly anu.edu.au> writes: I am trying to fit an ellipse equation to some spatial human factors data, varying the major and minor axes randomly and specifying an exp~ variogram for errors. Using normally-distributed random effects produces some -ve minor/major axes. I am hoping t

Re: [R] Problems with aggregate

2008-02-22 Thread Martin Elff
I guess it will save you some trouble to give the results of 'aggregate' some other name than 'min' or 'max', as in min.humanneph <- aggregate(as.numeric(humanneph[,2]), list(as.numeric(humanneph[,1])), min) max.humanneph <- aggregate(as.numeric(humanneph[,2]), list(as.numeric(hum

[R] seeking function to perform Flexible UPGMA clustering

2008-02-22 Thread Ton Snelder
Hi all, Has anyone got a function to perform clustering by Flexible UPGMA (Un-weighted Pair Group Using Arithmetic Averaging) . It does not seem to exist in any R package. Regards, Ton -- Laboratoire d'Hydroécologie Quantitative 3 bis, Quai Chauveau - CP 220 69336 LYON cedex 09 tél. : +33 (0)