[R] TukeyHSD doubts

2007-09-27 Thread Mariana Botelho
Hello, I have some doubts on TukeyHSD application. I want to investigate the effects of depth, latitude and month variation on the length of a fish. These are orthogonal and observational data. For this, I have made an aov model (L~month+lat+prof+month*lat), after applying drop1 and step functio

Re: [R] lm error and how to sidestep an error occured in for loop to keep it going without being interrupted

2007-09-27 Thread Moshe Olshansky
For an answer to your question 2. look at help(try) and help(tryCatch). --- Yong Wang <[EMAIL PROTECTED]> wrote: > Dear Rlist > > I am runing a for loop on a large dataset to do > exploring > investigation. Code embedded in the loop include the > "lm" routine. > Unfortunately, for some specifica

[R] ELF file OS ABI invalid yes?????

2007-09-27 Thread vittorio
Compilation of MCMCpack under freebsd 6.2 i386 fails because of the following cryptic error: * Installing *source* package 'MCMCpack' ... checking for C++ compiler default output file name... a.out checking whether the C++ compiler works... yes checking whether we are cross compiling... no check

[R] plot or boxplot!

2007-09-27 Thread Samuel Okoye
Hello, if we suppose that times <- c("2006-05-14", "2006-06-12", "2006-06-12", "2006-05-14", "2006-05-14", "2006-06-12") value <- c(2,3,1,4,3,1) then with plot(times, value) we have two boxplots in one graph for 2006-05-14 and 2006-06-12 respectively! Is it possibl

Re: [R] Plots with discontinuity balls

2007-09-27 Thread Duncan Murdoch
On 27/09/2007 8:04 PM, Paul Smith wrote: > Dear All, > > Can R plot graphs like the one at > > http://www.mathwords.com/f/f_assets/floor_graph.gif > > with the balls at the discontinuity points? You can use segments() to draw the segments and symbols() to draw the balls. For example, plot(1,

Re: [R] Plots with discontinuity balls

2007-09-27 Thread jim holtman
Yes ?segments ?points ?pch On 9/27/07, Paul Smith <[EMAIL PROTECTED]> wrote: > Dear All, > > Can R plot graphs like the one at > > http://www.mathwords.com/f/f_assets/floor_graph.gif > > with the balls at the discontinuity points? > > Thanks in advance, > > Paul > > __

Re: [R] create data frame(s) from a list with different numbers of rows

2007-09-27 Thread jim holtman
Here is (I think) a shorter version of your code that is generic in that it will handle a matrix of any number of columns: #Creation of list elements c1<- c(1,4,3,2,4,1,3,2,4,3) c2<- c(2,4,3,4,2,3,4,1,3,2) c3<- c(1,3,2,4,4,3,4,4,2,2) c4<- c(2,3,2,3,1,3,2,4,4,3) c5<- c(1,2,1,1,2,2,3,3,2,1) c6<- c

[R] Plots with discontinuity balls

2007-09-27 Thread Paul Smith
Dear All, Can R plot graphs like the one at http://www.mathwords.com/f/f_assets/floor_graph.gif with the balls at the discontinuity points? Thanks in advance, Paul __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLE

Re: [R] create data frame(s) from a list with different numbers of rows

2007-09-27 Thread jim holtman
Instead of: sample.df1 <-data.frame(list.sample[[1]]) sample.df2 <-data.frame(list.sample[[2]]) sample.df3 <-data.frame(list.sample[[3]]) sample.df4 <-data.frame(list.sample[[4]]) sample.df5 <-data.frame(list.sample[[5]]) sample.df6 <-data.frame(list.sample[[6]]) use 'lapply' to create a list of

Re: [R] testing the contents of an environment

2007-09-27 Thread Deepayan Sarkar
On 9/27/07, Rolf Turner <[EMAIL PROTECTED]> wrote: > > On 28/09/2007, at 6:52 AM, Tim Bergsma wrote: > > > Suppose I want to delete everything in my working directory that is > > not > > a function. It seems that > > > > sapply(ls(),is.function) > > > > always returns FALSE, because ls() returns ob

[R] create data frame(s) from a list with different numbers of rows

2007-09-27 Thread Luke Neraas
# Hello, # I have a list with 6 categories and with different numbers of rows. # I would like to change each of them into a unique data frame in order to match # values with other data frames and perform some calculations. # Or I could make each category or list element have the same number of ro

[R] including images in a plot

2007-09-27 Thread Steve C. Wang
Does anyone know if it is possible to incorporate image files (e.g., jpgs or gifs) in an R graphic? I would like to make a scatterplot in which each point is a small picture of the animal represented by each value. Each picture would be a graphics file. Is there some way to use such files as plot

Re: [R] testing the contents of an environment

2007-09-27 Thread Rolf Turner
On 28/09/2007, at 6:52 AM, Tim Bergsma wrote: > Suppose I want to delete everything in my working directory that is > not > a function. It seems that > > sapply(ls(),is.function) > > always returns FALSE, because ls() returns objects of mode character. > How do I evaluate is.function(), not on

Re: [R] testing the contents of an environment

2007-09-27 Thread jim holtman
Need to use 'get': > ls(9) [1] "c.Factor" "cls.console" "date2POSIX" "Default.par" "delete.NULLs" [6] "f.apdex" "f.area""f.axis" "f.HHMMSS2hr" "f.hr2HHMMSS" [11] "f.integrate" "f.queue" "f.TimeAxis" "file.size" "function.pr

[R] testing the contents of an environment

2007-09-27 Thread Tim Bergsma
Suppose I want to delete everything in my working directory that is not a function. It seems that sapply(ls(),is.function) always returns FALSE, because ls() returns objects of mode character. How do I evaluate is.function(), not on a character string, but on the object that character string r

Re: [R] plot(cox.zph())

2007-09-27 Thread Terry Therneau
The problem posed was the following: > fit <- coxph( > zp <- cox.zph(fit) > plot(zp[1]) Error in plot.window(xlim, ylim, log, asp, ...) : need finite 'ylim' values There were 21 covariates, but over 7000 events, so the Cox model fits ok. After sending me t

Re: [R] crashing R through lattice

2007-09-27 Thread Deepayan Sarkar
On 9/27/07, Jon Loehrke <[EMAIL PROTECTED]> wrote: > I have been crashing R while using lattice. My system consists of a Mac > Intel, R 2.5.1, lattice 0.15-5, and I plot through the default quartz. > > R crashes after plotting several lattice functions. Has anyone else > encountered this problem

[R] New R website: R-Cookbook.com

2007-09-27 Thread Jeff
R Community, I've put together a website that I thought this mailing list might be interested in: http://www.r-cookbook.com It's a (free) community-driven content management system for R "recipes", or working examples. Some of the features of the site are code highlighting, recipe ratings,

[R] RMySQL NA/NULL value storage error

2007-09-27 Thread Adam Wilson
Greetings all, I am running R 2.5.1, RMySQL 0.6 , and DBI 0.2-3 on Windows XP Like others, I am having trouble with NA/Null value conversions between R and a MySQL database via DBI, but I could not find my exact problem in the archives. Most of the time NA values in R get transferred correctly t

Re: [R] Reading SAS SD2 Data file

2007-09-27 Thread Frank E Harrell Jr
Marc Schwartz wrote: > On Thu, 2007-09-27 at 19:56 +0200, Peter Dalgaard wrote: >> Corey Sparks wrote: >>> I am trying to read a SAS dataset into R that is in a .SD2 format, which >>> is the Version 6 standard format from SAS. >>> >> (for DOS/Windows, that is. The format was machine/OS dependent

[R] Question on gplot heatmap.2

2007-09-27 Thread Deanne Taylor
Hi there -- Did a google search and couldn't find an answer, so I'm writing the list -- In the gplot function heatmap.2, I've found that the actual heatmap image, when printed to the pdf() device, is about 1/4 or less of the page length. Is there any way to increase the size or the length of th

[R] lm error and how to sidestep an error occured in for loop to keep it going without being interrupted

2007-09-27 Thread Yong Wang
Dear Rlist I am runing a for loop on a large dataset to do exploring investigation. Code embedded in the loop include the "lm" routine. Unfortunately, for some specification of dependent variable, the loop will be interrupted by error as below: Error in `contrasts<-`(`*tmp*`, value = "contr.treat

Re: [R] A weird observation from using read.table

2007-09-27 Thread Charles C. Berry
On Thu, 27 Sep 2007, Jun Ding wrote: > Hi Everyone, > > Recently I got puzzled by the function read.table, > even though I have used it for a long time. > > I have such a file (tmp.txt, 2 rows and 3 columns, > with a space among columns): > > 1 2'-PDE 4 > 2 3'-PDE 5 > > if I do: > a = read.table("

Re: [R] Y-axis scale in Q-Qplot

2007-09-27 Thread Marc Schwartz
On Thu, 2007-09-27 at 18:19 +0100, S Bina wrote: > Dear All, > > I have made a Q-Qplot (qqnorm) and want to change the scale of the y-axis from > -4 to 25. > > How can I do that? > > Many thanks > Samira You can, but the real question is: should you? qqnorm(x, ylim = c(-4, 25)) will give y

[R] convergence problem in boolean logit

2007-09-27 Thread ckang2
Hello, folks when I ran my boolean logit model in R, I got an error message as > answer <- boolean (bp, link = "logit", method = "BFGS", data=pr2) 27061 observations dropped due to missing data. Warning message: fitted probabilities numerically 0 or 1 occurred in: glm.fit(x = X, y = Y, weights =

[R] crashing R through lattice

2007-09-27 Thread Jon Loehrke
I have been crashing R while using lattice. My system consists of a Mac Intel, R 2.5.1, lattice 0.15-5, and I plot through the default quartz. R crashes after plotting several lattice functions. Has anyone else encountered this problem and does anyone know the cause, or a solution? Is this a la

Re: [R] When is the periodogram is consistent with white noise?

2007-09-27 Thread Peter Wickham
A programme I wrote in R could be relevant. The reference is I. Lobato and C. Velasco, Econometric Theory, Vol.20, 2004, "A Simple and General Test for White Noise". The acf function and the spec.pgram function are used to produce a transformed von Mises statistic which is approx. N(0,4). Tests a

Re: [R] center option of basehaz in survfit

2007-09-27 Thread Prof Brian Ripley
On Thu, 27 Sep 2007, David Koons wrote: > I have a very general question about what the centering option in basehaz > does to factors. (basehaz computes the baseline cumulative hazard for a > coxph object using the Breslow estimator). > > Lets say I'm interested in a survival model with two (di

[R] ifelse and dates do not work together: What workaround?

2007-09-27 Thread Farrel Buchinsky
I encountered the above problem. I went to the help files and discovered the reason why. My insight as to why it was happening did not immediately provide me with a solution by which I could accomplish what I needed to do. I turned to the help archive. I encountered a thread on which somebody point

[R] different colors for two wireframes in same plot

2007-09-27 Thread marcg
Thanks a lot This already looks nice and I already checked the ?wireframe, but with no examples and as newcommer its hard to find out a correct code. If we set drape=F in the example: g <- expand.grid(x = 1:10, y = 5:15, gr = 1:2) g$z <- log((g$x^g$g + g$y^2) * g$gr) wireframe(z ~ x * y, data =

Re: [R] Reading SAS SD2 Data file

2007-09-27 Thread Peter Dalgaard
Marc Schwartz wrote: > On Thu, 2007-09-27 at 19:56 +0200, Peter Dalgaard wrote: > >> Corey Sparks wrote: >> >>> I am trying to read a SAS dataset into R that is in a .SD2 format, which >>> is the Version 6 standard format from SAS. >>> >>> >> (for DOS/Windows, that is. The format

Re: [R] Post-hoc after Anova() car package using linear.hypothesis() in a Repeated Measure Analysis

2007-09-27 Thread John Fox
Dear Alejandro, If I understand correctly what you want (that is, pairwise multivariate tests among the groups), you could do the following tests (some output suppressed): > linear.hypothesis(diversitylm.ok, c("(Intercept)=CategoryM"), + idata=idata.df, idesign=~Season, iterms="Season") Re

Re: [R] Reading SAS SD2 Data file

2007-09-27 Thread Marc Schwartz
On Thu, 2007-09-27 at 19:56 +0200, Peter Dalgaard wrote: > Corey Sparks wrote: > > I am trying to read a SAS dataset into R that is in a .SD2 format, which > > is the Version 6 standard format from SAS. > > > (for DOS/Windows, that is. The format was machine/OS dependent.) That is still the cas

[R] Getting intervals for within-group standard errors for each group using nlme and varIdent

2007-09-27 Thread Greg Snow
I am using lme from the nlme package to fit a mixed model. We have observations nested in patients(encounters) and patients nested in groups (2 different treatments). We are interested in the differences between the 2 groups, both the means and the standard deviations (are patients in group A

[R] converting numbers in "YYYYMM" format to last calendar day and last exchange trading day of the month

2007-09-27 Thread Thomas Pujol
I have a vector that contains month and year in the format MM (e.g.“200701”, “200702”) I wish to do to things: 1. I need to convert to a date that is the last calendar day of each month. 2. I need to convert this to a date that is the last U.S. stock-exchange trading day

Re: [R] Getting group-wise standard scores of a vector

2007-09-27 Thread jim holtman
Is this what you want: > test.data x group 1 32.66782 A 2 50.02132 A 3 43.69700 A 4 46.59031 A 5 38.43428 A 6 68.03142 A 7 46.68868 A 8 33.94487 A 9 51.97193 A 10 52.63176 A 11 40.14173 B 12 21.11079 B 13 43.59518 B 14 55.70508

Re: [R] Cairo on windows

2007-09-27 Thread Moisan Yves
> Don't you also get a popup, telling you that libgdk-win32-2.0-0.dll was not found? Duncan, No such popup. > The dll also requires imports from > libpangocairo-1.0-0.dll > libpango-1.0-0.dll > libgtk-win32-2.0-0.dll > libgobject-2.0-0.dll > libglib-2.0-0.dll > libcairo-2.dll I checked that

[R] center option of basehaz in survfit

2007-09-27 Thread David Koons
I have a very general question about what the centering option in basehaz does to factors. (basehaz computes the baseline cumulative hazard for a coxph object using the Breslow estimator). Lets say I'm interested in a survival model with two (dichotomous) factors and a continuous covariate. Va

Re: [R] Reading SAS SD2 Data file

2007-09-27 Thread Peter Dalgaard
Corey Sparks wrote: > I am trying to read a SAS dataset into R that is in a .SD2 format, which > is the Version 6 standard format from SAS. > (for DOS/Windows, that is. The format was machine/OS dependent.) > I see the routines that read the SAS XPORT format (foreign, Hmisc), but > is there any

[R] Post-hoc after Anova() car package using linear.hypothesis() in a Repeated Measure Analysis

2007-09-27 Thread Alejandro Luis Collantes Chávez-Costa
R masters: I need your help to figure out how can I perform Post-hoc test after “Anova()” “car package” using “linear.hypothesis()” in a Repeated Measure Analysis. I performed a Repeated Measures Analysis to test the effect of Category, Season and their Interaction on some ecological properties

Re: [R] Cairo on windows

2007-09-27 Thread Duncan Murdoch
On 9/27/2007 1:11 PM, Moisan Yves wrote: >> You could also try the cairoDevice package, which should definitely >> work with the gtk libraries that you probably have from installing >> GGobi. > > Hi Hadley, > > I tried that also before posting on R-help : > >> library(cairoDevice) > Error in dyn

Re: [R] Cairo on windows

2007-09-27 Thread Moisan Yves
> My experience is that cairoDevice is a lot slower than Cairo, especially on Windows, and about equally flaky. If you see how many layers are involved with Cairo on Windows you will not be surprised. Actually, I ended up trying to load deviceCairo simply because it was the only other package w

Re: [R] Cairo on windows

2007-09-27 Thread Prof Brian Ripley
On Thu, 27 Sep 2007, Moisan Yves wrote: You could also try the cairoDevice package, which should definitely work with the gtk libraries that you probably have from installing GGobi. Hi Hadley, I tried that also before posting on R-help : library(cairoDevice) Error in dyn.load(x, as.logical

[R] Reading SAS SD2 Data file

2007-09-27 Thread Corey Sparks
I am trying to read a SAS dataset into R that is in a .SD2 format, which is the Version 6 standard format from SAS. I see the routines that read the SAS XPORT format (foreign, Hmisc), but is there any way to read this one? Any help would be greatly appreciated. Corey Sparks Corey Sparks Assistant

Re: [R] sprucing up the R homepage

2007-09-27 Thread Marc Schwartz
Who are you and what have you done with the real Hadley? Marc On Thu, 2007-09-27 at 11:55 -0500, hadley wickham wrote: > Jim, > > After learning that you could produce translucent 3d pie charts in excel. > > Hadley > > On 9/27/07, Jim Porzak <[EMAIL PROTECTED]> wrote: > > Hadley, > > > > Whe

[R] Y-axis scale in Q-Qplot

2007-09-27 Thread S Bina
Dear All, I have made a Q-Qplot (qqnorm) and want to change the scale of the y-axis from -4 to 25. How can I do that? Many thanks Samira __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guid

Re: [R] Cairo on windows

2007-09-27 Thread Moisan Yves
> You could also try the cairoDevice package, which should definitely > work with the gtk libraries that you probably have from installing > GGobi. Hi Hadley, I tried that also before posting on R-help : > library(cairoDevice) Error in dyn.load(x, as.logical(local), as.logical(now)) : i

Re: [R] Cairo on windows

2007-09-27 Thread hadley wickham
You could also try the cairoDevice package, which should definitely work with the gtk libraries that you probably have from installing GGobi. Hadley On 9/27/07, Yves Moisan <[EMAIL PROTECTED]> wrote: > > Hi All, > > I just installed Cairo on R 2.5.1 on windows XP. My hope was to get to see > the

Re: [R] sprucing up the R homepage

2007-09-27 Thread hadley wickham
Jim, After learning that you could produce translucent 3d pie charts in excel. Hadley On 9/27/07, Jim Porzak <[EMAIL PROTECTED]> wrote: > Hadley, > > When did you switch to the Marketing MBA program? > > - Jim > > On 9/27/07, hadley wickham <[EMAIL PROTECTED]> wrote: > > Dear Antony, > > > > I t

Re: [R] sprucing up the R homepage

2007-09-27 Thread Jim Porzak
Hadley, When did you switch to the Marketing MBA program? - Jim On 9/27/07, hadley wickham <[EMAIL PROTECTED]> wrote: > Dear Antony, > > I think you have fundamentally misunderstood the purpose of graphics - > they are not to be used to gain insight into your data, but to add > excitement and in

Re: [R] sprucing up the R homepage

2007-09-27 Thread hadley wickham
Dear Antony, I think you have fundamentally misunderstood the purpose of graphics - they are not to be used to gain insight into your data, but to add excitement and interest to otherwise boring, text-filled pages ;) Hadley On 9/27/07, Antony Unwin <[EMAIL PROTECTED]> wrote: > It's a good idea t

Re: [R] A matrix multiplication

2007-09-27 Thread Jeffrey Robert Spies
How about this: a <- matrix(cbind(rep(2, 500), rep(3, 500)), 500, 2) b <- matrix(cbind(rep(5, 500), rep(6, 500), rep(7, 500)), 500, 3) matrix(apply(a, c(2), "*", b), nrow=500, ncol=6) We apply the multiplier (quoted as specified in the apply help) with argument b to every column of a as specif

[R] A matrix multiplication

2007-09-27 Thread Jose Luis Aznarte M.
Dear all, I'm having trouble using the 'apply' function to multiply some arrays. Let A be a 500x2 array and B a 500x3 array. I need a vector C which has 6 columns being the first three the result of A[,1] * B and the second three the result of A[,2] * B. What is the most efficient way to ex

Re: [R] add a row to a data frame

2007-09-27 Thread Alfredo Alessandrini
> > # set X's colnames to match d's > colnames(X) <- colnames(d) > > # Now rbind() > rbind(d, X) thanks, it's work... Alfredo [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/li

Re: [R] Arrows Pointing to Curve

2007-09-27 Thread P Ehlers
You might also look at ?Arrows in package IDPmisc and ?p.arrows in package sfsmisc. - Peter Ehlers > --- Lorenzo Isella <[EMAIL PROTECTED]> wrote: > >> Dear All, >> I hope this is not a FAQ, but my online research was >> not fruitful. >> Consider a standard 2D plot generated with the >> "plot

Re: [R] add a row to a data frame

2007-09-27 Thread Marc Schwartz
On Thu, 2007-09-27 at 17:16 +0200, Alfredo Alessandrini wrote: > Hi everybody, > > I've a data.frame "d" like this: > > 0 2468 10 12 14 16 X0 X2 > X4 > 1945 350 NA NA NA NA NA NA NA NA 0.3848451 0.000 0.000 > 1946 408 NA NA

[R] A weird observation from using read.table

2007-09-27 Thread Jun Ding
Hi Everyone, Recently I got puzzled by the function read.table, even though I have used it for a long time. I have such a file (tmp.txt, 2 rows and 3 columns, with a space among columns): 1 2'-PDE 4 2 3'-PDE 5 if I do: a = read.table("tmp.txt", header = F, quote = "") a V1 V2 V3 1 1 2'

Re: [R] sprucing up the R homepage

2007-09-27 Thread Finny Kuruvilla
Tim is correct -- there was no post-processing done. I've put the R script that was used to generate the graphic here: www.broad.mit.edu/~finnyk/acpclust.R As you will see, it's essentially identical to Eric Lecoutre's original script. A few margins are slightly different and of course, the Cai

[R] Cairo on windows

2007-09-27 Thread Yves Moisan
Hi All, I just installed Cairo on R 2.5.1 on windows XP. My hope was to get to see the transparency output e.g. http://had.co.nz/ggplot2/stat_smooth.html ggplot2 - stat_smooth , which I finally managed to do. However, I find the Cairo device, which I access either through CairoWin() or Cairo(t

[R] add a row to a data frame

2007-09-27 Thread Alfredo Alessandrini
Hi everybody, I've a data.frame "d" like this: 0 2468 10 12 14 16 X0 X2 X4 1945 350 NA NA NA NA NA NA NA NA 0.3848451 0.000 0.000 1946 408 NA NA NA NA NA NA NA NA 1.4202009 0.000 0.000 1947 511 NA NA NA N

Re: [R] sprucing up the R homepage

2007-09-27 Thread Peter Dalgaard
Kuhn, Max wrote: > Antony, > > >> be drawn with R, all applied to the swiss fertility dataset. Are >> these the kinds of graphics we would want to draw in a real >> analysis? >> > > You make a good point about what would need to be done for these data, > that wasn't the objective of t

Re: [R] Accessing the fixed- and random-effects variance-covariance matrices of an nlme model

2007-09-27 Thread Douglas Bates
On 9/26/07, Rob Forsyth <[EMAIL PROTECTED]> wrote: > I would appreciate confirmation that the function vcov(model.nlme) > gives the var-cov matrix of the fixed effects in an nlme model. It gives the approximate variance-covariance matrix for the fixed-effects parameters in the model. (Exact varia

Re: [R] Expressing number in percentage

2007-09-27 Thread Marc Schwartz
On Thu, 2007-09-27 at 14:36 +0100, stat stat wrote: > I am wondering if there is any procedure to write a particular value > in Percentage format, still maintaining it's numeric character. for > example I want to write '.33' as '33%' See ?sprintf > sprintf("%.0f%%", .33 * 100) [1] "33%" Note t

Re: [R] moran's i

2007-09-27 Thread Christophe DECLERCQ
> De : [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] De la part de [EMAIL PROTECTED] > Envoyé : jeudi 27 septembre 2007 16:16 > > i would like to perform moran's analysis with r... > thanks > duccio The 'spdep' package has Moran's index (and many other things) if that is what you want. You cou

[R] TukeyHSD doubts

2007-09-27 Thread Mariana Botelho
Hello, I have some doubts on TukeyHSD application. I want to investigate the effects of depth, latitude and month variation on the length of a fish. These are orthogonal and observational data. For this, I have made an aov model (L~month+lat+prof+month*lat), after applying drop1 and step functio

[R] Expressing number in percentage

2007-09-27 Thread stat stat
I am wondering if there is any procedure to write a particular value in Percentage format, still maintaining it's numeric character. for example I want to write '.33' as '33%' regards, thanks in advance - [[alternative HTML version

Re: [R] sprucing up the R homepage

2007-09-27 Thread Kuhn, Max
Antony, > be drawn with R, all applied to the swiss fertility dataset. Are > these the kinds of graphics we would want to draw in a real > analysis? You make a good point about what would need to be done for these data, that wasn't the objective of the graphic. I couldn't find the origina

Re: [R] moran's i

2007-09-27 Thread Stefano Calza
Have a look at library(ape) ?Moran.I Ciao Stefano On Thu, Sep 27, 2007 at 04:09:57PM +0200, [EMAIL PROTECTED] wrote: i would like to perform moran's analysis with r... thanks duccio __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] moran's i

2007-09-27 Thread John Kane
moran {package: spdep} ? --- "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > i would like to perform moran's analysis with r... > thanks > duccio > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do re

[R] moran's i

2007-09-27 Thread [EMAIL PROTECTED]
i would like to perform moran's analysis with r... thanks duccio __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal

[R] [R-pkgs] New version (2.2) of the sm package

2007-09-27 Thread Adrian Bowman
The sm package (by Adrian Bowman and Adelchi Azzalini) implements a variety of nonparametric smoothing techniques, centred on nonparametric regression for one or two covariates and density estimation for up to three variables. A new version of the package is now available on CRAN. In an earlier u

Re: [R] AIC questions

2007-09-27 Thread Joe Yarmus
Digging into the R-code behind AIC for gaussian family models, I see: AIC = nobs * (log(dev/nobs * 2 * pi) + 1) + 2 - sum(log(wt)) + 2 * p dev = sum(wt * (y - mean(y))^2 For the unweighted case, this translates directly to -2LL with the penalty number of parameters including both intercept and err

Re: [R] query on "random.seed" not found error in code

2007-09-27 Thread paulandpen
Duncan, Worked like a charm... Cheers Paul - Original Message - From: "Duncan Murdoch" <[EMAIL PROTECTED]> To: "paulandpen" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; "Bob Wheeler" <[EMAIL PROTECTED]> Sent: Thursday, September 27, 2007 11:28 PM Subject: Re: [R] query on "random.s

Re: [R] query on "random.seed" not found error in code

2007-09-27 Thread Duncan Murdoch
On 9/27/2007 8:53 AM, paulandpen wrote: > Hi, > > I am trying to use AlgDesign and am partially successful > > Two lines of code are taken from the help file > 1. Line 1 (below) works fine >> dat<-gen.factorial(levels=3,nVars=3,varNames=c("A","B","C")) > > 2. Line 2 (below) does not work fine >>

[R] How to choose name for package during install (was:Re: problem loading hexbin associated package colorspace)

2007-09-27 Thread Karin Lagesen
Prof Brian Ripley <[EMAIL PROTECTED]> writes: > Where does this 'hexbin' package come from? The one I have installed > (and the only one I found) is from BioC, and that does not depend on > colorspace: > > Description: > > Package: hexbin > Version: 1.10.0 > Date: 2006-09-28

Re: [R] sprucing up the R homepage

2007-09-27 Thread Tim Churches
Martin Maechler wrote: >> "Paul" == Paul Murrell <[EMAIL PROTECTED]> >> on Thu, 27 Sep 2007 08:13:05 +0200 writes: > > Paul> Hi > Paul> [EMAIL PROTECTED] wrote: > >> > >> > >>> So I applied my corrected margins to Tim's Cairo trick and voila: > >>> http://www.

[R] ReL plot(cox.zph())

2007-09-27 Thread Terry Therneau
You report an error message: > plot(zph.revasFit[1]) Error in plot.window(xlim, ylim, log, asp, ...) : need finite 'ylim' values I have never seen this error before, and I cannot guess what causes it. You need to provide more information, and likely a small data set that produces the pr

Re: [R] curvilinear grid

2007-09-27 Thread hadley wickham
On 9/26/07, tom sgouros <[EMAIL PROTECTED]> wrote: > > hadley wickham <[EMAIL PROTECTED]> wrote: > > > You might be able to do this with the ggplot2 package - see for > > example http://had.co.nz/ggplot2/coord_map.html, which shows plots on > > map coordinate systems. Because the design of ggplot2

[R] query on "random.seed" not found error in code

2007-09-27 Thread paulandpen
Hi, I am trying to use AlgDesign and am partially successful Two lines of code are taken from the help file 1. Line 1 (below) works fine > dat<-gen.factorial(levels=3,nVars=3,varNames=c("A","B","C")) 2. Line 2 (below) does not work fine > desD<-optFederov(~quad(A,B,C),dat,nTrials=14,eval=TRUE)

[R] Odp: nonlinear regression

2007-09-27 Thread Petr PIKAL
Hi Have a look at package nlme and maybe also you should consult a Pinheiro&Bates book about nonlinear mixed effects models. Regards Petr [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 27.09.2007 07:46:03: > I would appreciate some suggestions about nonlinear regression available in > R ...

[R] Confidence interval

2007-09-27 Thread Hadi Darzian Azizi
Hi, I use R to test a model although I'm not good in using it. To test the model I have to generate random number of arrival rate (lambda) that follows a Gamma distribution. Suppose that in each run I have 5 generated number,>data<-array(1:K*5,c(K,5)); for(i in 1:K) data[i,]=rgamma(5, a,b), that a

Re: [R] R: anova.Design

2007-09-27 Thread Frank E Harrell Jr
John Smith wrote: > Dear All: > > I tried to replicate a case study described by Prof. Harrell in Chapter 7 of > his Regression Modeling Strategies book, but failed on using anova.Design to > reproduce his table 7.1, Following is the code: > > rm(list=ls()) > library(Hmisc) > library(Design) >

Re: [R] Arrows Pointing to Curve

2007-09-27 Thread Frank E Harrell Jr
Dylan Beaudette wrote: > On Wednesday 26 September 2007, Lorenzo Isella wrote: >> Dear All, >> I hope this is not a FAQ, but my online research was not fruitful. >> Consider a standard 2D plot generated with the "plot" command. >> I would like to introduce inside the graph some text with an arrow >

Re: [R] different colors for two wireframes in same plot

2007-09-27 Thread Prof Brian Ripley
On Thu, 27 Sep 2007, Frede Aakmann Tøgersen wrote: You can obtain some transparency setting the alpha transparency. This is device dependent though. Using the pdf device you can do this obtaining transparency of both surfaces (the version must be at least 1.4 for semitransparent output to be u

Re: [R] curvilinear grid

2007-09-27 Thread tom sgouros
[EMAIL PROTECTED] wrote: > Ask on R-sig-geo? I haven't seen a query from you come through over > there... and that would be the logical place to ask questions about > the sp package and similar bits... > No query from me over there because I managed to overlook it. Many thanks. -tom --

Re: [R] problem loading hexbin associated package colorspace

2007-09-27 Thread Prof Brian Ripley
Where does this 'hexbin' package come from? The one I have installed (and the only one I found) is from BioC, and that does not depend on colorspace: Description: Package: hexbin Version: 1.10.0 Date: 2006-09-28 Depends: R (>= 2.0), methods, grid, lattice That said,

[R] problem loading hexbin associated package colorspace

2007-09-27 Thread Karin Lagesen
I have lots of data that I need to display, and I think hexbin would be good for it. However, I cannot load one of the requried packages associated with the hexbin package: > library(hexbin) Loading required package: colorspace Error in loadNamespace(package, c(which.lib.loc, lib.loc), keep.sour

[R] Plotting from different data sources on the same plot (with ggplot2)

2007-09-27 Thread jiho
Hello everyone (and Hadley in particular), I often need to plot data from multiple datasets on the same graph. A common example is when mapping some values: I want to plot the underlying map and then add the points. I currently do it with base graphics, by recording the maximum region in whi

Re: [R] Sweave problem in Windows

2007-09-27 Thread Eik Vettorazzi
See A.12 in http://www.ci.tuwien.ac.at/~leisch/Sweave/FAQ.html huang min schrieb: > Hi, > > I have searched the lists but still can not solve the problem. I am using a > windows machine. After I sweave some Rnw file, I got a tex file. However, > the tex file can not be compiled. I know the problem

Re: [R] sprucing up the R homepage

2007-09-27 Thread Antony Unwin
It's a good idea to spruce up the graphics on R's webpage, but before we get too excited about improving how they are drawn, shouldn't we think about improving what has been drawn? The original graphic showed off a wide variety of graphics which can be drawn with R, all applied to the swiss

Re: [R] Sweave problem in Windows

2007-09-27 Thread Christophe DECLERCQ
Hi, Huang > De : [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] De la part de huang min > Envoyé : jeudi 27 septembre 2007 11:31 > > Hi, > > I have searched the lists but still can not solve the > problem. I am using a windows machine. After I sweave some > Rnw file, I got a tex file. However

Re: [R] Arrows Pointing to Curve

2007-09-27 Thread John Kane
? arrows plot(1:10) text(2,5, "Point") arrows(3,5, 4.5, 5) --- Lorenzo Isella <[EMAIL PROTECTED]> wrote: > Dear All, > I hope this is not a FAQ, but my online research was > not fruitful. > Consider a standard 2D plot generated with the > "plot" command. > I would like to introduce inside the gr

Re: [R] different colors for two wireframes in same plot

2007-09-27 Thread marcg
Thanks a lot This already looks nice and I already checked the ?wireframe, but with no examples and as newcommer its hard to find out a correct code. If we set drape=F in the example: g <- expand.grid(x = 1:10, y = 5:15, gr = 1:2) g$z <- log((g$x^g$g + g$y^2) * g$gr) wireframe(z ~ x * y, data =

Re: [R] different colors for two wireframes in same plot

2007-09-27 Thread Frede Aakmann Tøgersen
You can obtain some transparency setting the alpha transparency. This is device dependent though. Using the pdf device you can do this obtaining transparency of both surfaces (the version must be at least 1.4 for semitransparent output to be understood): pdf("test.pdf",version="1.4") wireframe

[R] grossing-up weights in Survey package

2007-09-27 Thread eugen pircalabelu
Good afternoon! I can not find anywhere the formula by which the Survey package calculates the grossing-up weights for each element in a stratified sample which is then post-stratified by other variables. Can anyone help me? Thank you and have a great day! ---

[R] generate fourth vector based on known correlations

2007-09-27 Thread bkelcey
I am trying to generate a fourth vector,z, given three known and fixed vectors, x1,x2,x3with corresponding known and fixed correlations with themeselves and with z. That is, all correlations are known and prespecified. How can I do this? Thank you, ben

[R] Sample size

2007-09-27 Thread motaveiga
Hi for all. How can I determinate in R the sample size to estimate a logistic regression with two outcomes. One of outcomes was 47% in population and I want determine the factors that influence that probability. Thanks everyone __ R-help@r-project

[R] Sweave problem in Windows

2007-09-27 Thread huang min
Hi, I have searched the lists but still can not solve the problem. I am using a windows machine. After I sweave some Rnw file, I got a tex file. However, the tex file can not be compiled. I know the problem is in the line \usepackage{C:/PROGRA~1/R/R-25~1.1/share/texmf/Sweave} and I need to modify

[R] nonlinear regression

2007-09-27 Thread Maura E Monville
I would appreciate some suggestions about nonlinear regression available in R ... possible methods and plenty of worked out examples I have a bunch of noisy curves representing breathing amplitude from medical physics experiments recoding patients' breathing tracks in form of Amplitude, Phase

Re: [R] Need help with function writing

2007-09-27 Thread Wayne.W.Jones
Why dont you use the t.test within R? See help(t.test). It looks to have everything you need: here are the examples with different alternative hypothesese: with(sleep, t.test(extra[group == 1], extra[group == 2],alternative = "greater")) with(sleep, t.test(extra[group == 1], extra[group == 2],

  1   2   >