Re: [R] Can not load msm package

2008-04-01 Thread Uwe Ligges
John Sorkin wrote: > windows XP R 2.6.0 What about upgrading to some recent version of R? > I have tried to install the msm package several > times. How? Using the menu? Or with install.packages("msm") ? Which mirror did you choose? > Each time the installation appears to work. I then

[R] Subset: data frames and factor levels

2008-04-01 Thread Agustin Lobo
Hi! I'm doing: etni <- subset(etni, NAMECOM!="Maniquisito") where etni is a data.frame, NAMECOM a factor and "Maniquisito" labels a row that I want to delete. The problem is that while the row is deleted, the factor level is still there (I can see "Maniquisito" if I do levels(etni$NAMECOM) ).

Re: [R] Subset: data frames and factor levels

2008-04-01 Thread Stefan Grosse
On Tuesday 01 April 2008 09:43:00 am Agustin Lobo wrote: AL> I'm doing: AL> etni <- subset(etni, NAMECOM!="Maniquisito") AL> AL> where etni is a data.frame, NAMECOM a factor and "Maniquisito" labels AL> a row that I want to delete. AL> AL> The problem is that while the row is deleted, the factor le

[R] comparison of intercepts and slopes in linear regression

2008-04-01 Thread Diogo André Alagador
Hi all, I would like to make a 2-by-2 comparison of intercepts and slopes from linear regression models. Can you advise me on that? All the best, Diogo André Alagador [[alternative HTML version deleted]] __ R-help@r-project.org mailing li

Re: [R] Subset: data frames and factor levels

2008-04-01 Thread Agustin Lobo
Thanks, problem solved thanks to your hints, but, within subset(), drop=T still keeps the unused levels (I'm using 2.6.1 on win). Agus Stefan Grosse escribió: > On Tuesday 01 April 2008 09:43:00 am Agustin Lobo wrote: > AL> I'm doing: > AL> etni <- subset(etni, NAMECOM!="Maniquisito") > AL> > AL>

[R] access networked PCs directories/files with R ?

2008-04-01 Thread mel
access networked PCs directories/files with R ? Dear group, I would like to know if there is an "easy" way to access several networked PCs directories/files from one PC with R ? Concerned OS is windows. I can for instance use dir() on my current PC. Is there a way to do dir() on a connected PC ?

Re: [R] spatial cross-correlation

2008-04-01 Thread ONKELINX, Thierry
Dear Javier, It seems to me that you want to calculate cross variograms. You can do that with the gstat package. Have a look at the example in ?gstat libary(gstat) data(meuse) # let's do some manual fitting of two direct variograms and a cross variogram g <- gstat(id = "ln.zinc", formula = log(zi

Re: [R] ps or pdf

2008-04-01 Thread Stefan Grosse
On Monday 31 March 2008 10:17:50 pm Francois Pepin wrote: FP> Example of row names that are truncated in Illustrator (* denoting FP> truncation): FP> CCDC3*4 (2nd row) FP> MUC2*0 (3rd row) FP> MBNL*1 (8th row) Those are not truncated with me but there are some truncated, this is true. Note that

Re: [R] filtering out duplicates & creating a dataframe with unique id

2008-04-01 Thread Dimitris Rizopoulos
try the following: dat <- data.frame( id = gl(10, 5), y = rnorm(50), time = rep(1:5, 10), sex = gl(2, 25, labels = c("male", "female")), age = round(rep(runif(10, 18, 55), each = 5), 1) ) dat[tapply(row.names(dat), dat$id, head, n = 1), ] dat[!duplicated(dat$id), ] I hope it

[R] spatial cross-correlation

2008-04-01 Thread jgarcia
Hi; I cannot find in the R html documentation a way to evaluate cross-correlation in 2D data sets. I would like to evaluate cross-correlation in a series of moving windows between two maps. i,e, specify several windows inside the complete 2D spatial matrixes and for each one ofthese windows evalu

Re: [R] access networked PCs directories/files with R ?

2008-04-01 Thread Prof Brian Ripley
On Tue, 1 Apr 2008, mel wrote: > access networked PCs directories/files with R ? > > Dear group, > > I would like to know if there is an "easy" way to access several > networked PCs directories/files from one PC with R ? > Concerned OS is windows. > > I can for instance use dir() on my current PC.

Re: [R] GeoDa spdep

2008-04-01 Thread Roger Bivand
Steve Schachterle gmail.com> writes: > > My question is in regard to the spdep and GeoDa packages. Do you know how > to extract a neighborhood/adjacency matrix from R? I need a matrix that has > all the neighborhoods on the X and Y axis, and then a r=1 when the > neighborhoods touch, and a r=0

[R] filtering out duplicates & creating a dataframe with unique id

2008-04-01 Thread Bob Green
Hello, I am working on a dataframe that contains a number of duplicates (e.g a person may have more than one court appearance). There are 539 rows. If I run the code: > length(unique(Feb25$ Patient.Id)) this indicates there are 508 unique individuals. I have been unable to work out how to fi

[R] lmer function :method="AGQ"

2008-04-01 Thread Boikanyo Makubate
I am using the lmer function from the lme4 package. I wrote the following statement, specifying the method to be adaptive Gaussian quadrature. I am getting an error saying "method = "AGQ" not yet implemented for supernodal representation". Please help. How can i implement AGQ. fit<-lmer(respons

[R] set the lower bound of normal distribution to 0 ?

2008-04-01 Thread Tom Cohen
Tom Cohen <[EMAIL PROTECTED]> skrev:Thanks Prof Brian for your suggestion. I should know that for right-skewed data, one should generate the samples from a lognormal. My problem is that x and y are two instruments that were thought to be measured the same thing but somehow show a wide c

Re: [R] set the lower bound of normal distribution to 0 ?

2008-04-01 Thread ONKELINX, Thierry
Dear Tom, In my opinion you should first transform your data to the log-scale and then calculate the mean and st.dev. of the log-transformed data. Because mean(log(x)) is not equal to log(mean(x)). HTH, Thierry ir.

Re: [R] lmer function :method="AGQ"

2008-04-01 Thread Stefan Grosse
On Tuesday 01 April 2008 02:20:39 pm Boikanyo Makubate wrote: BM> I am using the lmer function from the lme4 package. I wrote the BM> following statement, specifying the method to be adaptive Gaussian BM> quadrature. I am getting an error saying "method = "AGQ" not yet BM> implemented for supernod

Re: [R] Subset: data frames and factor levels

2008-04-01 Thread Weidong Gu
Try drop.levels in library gdata. Weidong Gu, Department of Medicine University of Alabama, Birmingham 1900 University Blvd., Birmingham, Alabama 35294 Email: [EMAIL PROTECTED] PH: (205)-975-9053 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Agustin Lo

[R] comparison of intercepts and slopes in linear regression

2008-04-01 Thread Diogo André Alagador
Sorry if cross-posting Hi all, I would like to make a 2-by-2 comparison of intercepts and slopes from linear regression models. Can you advise me on that? All the best, Diogo André Alagador [[alternative HTML version deleted]] __ R-h

Re: [R] SiZer plots in R

2008-04-01 Thread tshort
Try: http://www.math.usu.edu/~minnotte/research/software/sizer.r Note that I haven't tried it... sewatkins wrote: > > Hello, > > I am a graduate student at UNC Chapel Hill, and I am attempting to create > a SiZer plot for a nonparametric analysis. I have found the file to use > this progra

Re: [R] SiZer plots in R

2008-04-01 Thread tshort
See also the CRAN package feature, by Tarn Duong and Matt Wand: http://cran.r-project.org/web/packages/feature/index.html sewatkins wrote: > > Hello, > > I am a graduate student at UNC Chapel Hill, and I am attempting to create > a SiZer plot for a nonparametric analysis. I have found the f

[R] NEW: Sociolects in R

2008-04-01 Thread Peter Dalgaard
The R translation teams have done a great job in making R usable for people who do not have English as their mother tongue. However, even within English speaking countries, there are groups which have trouble with the language, and it may be valuable to support the Sociolects of these groups too. T

Re: [R] lmer function :method="AGQ"

2008-04-01 Thread Douglas Bates
On Tue, Apr 1, 2008 at 7:45 AM, Stefan Grosse <[EMAIL PROTECTED]> wrote: > On Tuesday 01 April 2008 02:20:39 pm Boikanyo Makubate wrote: > BM> I am using the lmer function from the lme4 package. I wrote the > BM> following statement, specifying the method to be adaptive Gaussian > BM> quadratur

[R] lrm -interaction without main effect-error message

2008-04-01 Thread Eva Mosner
Dear all, this might be not only an R-question but also a statistical. When I do a logistic regression analysis (species distribution modeling) with function lrm (Design package) I get the follwoing error message: > tadl1<-lrm(triad~fd+dista+fd2+dista2+fd:dista+dista:geo2, x=T, y=T) Error in i

Re: [R] NEW: Sociolects in R

2008-04-01 Thread Charles Annis, P.E.
Groovy!!! Charles Annis, P.E. [EMAIL PROTECTED] phone: 561-352-9699 eFax: 614-455-3265 http://www.StatisticalEngineering.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Dalgaard Sent: Tuesday, April 01, 2008 10:19 AM To: R help Subject: [R]

Re: [R] download.file error

2008-04-01 Thread john seers (IFR)
Hi Chib >>whether there is a way of handling the error you get in the download.file() function I think the function "try" will do this for you. That is, handle the error. Have a look at ?try. Regards John Seers --- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTE

Re: [R] download.file error

2008-04-01 Thread CHIB CO
Hi Jim, I just wanted to know if there is a function in R that can tell you whether a file on the internet exists before you attempt to download it or whether there is a way of handling the error you get in the download.file() function without having it break a for loop with the download error

Re: [R] download.file error

2008-04-01 Thread jim holtman
?file.exists On 4/1/08, CHIB CO <[EMAIL PROTECTED]> wrote: > Hi Jim, > > I just wanted to know if there is a function in R that can tell you whether > a file on the internet exists before you attempt to download it or whether > there is a way of handling the error you get in the download.file() fu

Re: [R] tkconfigure throws an error

2008-04-01 Thread stephen bond
When I do it with a function I lose the workspace. This is on a regulated matter and I MUST keep record of all commands/output from the source script plus the resulting workspace. Thanks everybody. Original Message From: [EMAIL PROTECTED] Date: 03/31/2008 13:10 To: "stephen bond"<[EMAI

Re: [R] NEW: Sociolects in R

2008-04-01 Thread Roland Rau
Dear Peter, congratulations. Looks very impressive. Seems like you guys in Denmark are very productive this time of the year. This brings me to my actual problem: isn't Lars Polifo a close relative of Rolf Poalis? Has there been any recent progress with the 'sas2r' parser? http://tolstoy.newcas

[R] Applying rbind() to a sequence of data frame names

2008-04-01 Thread Hans W. Borchers
I have a set of data frames ds1, ds2, ... each having the same columns and column names: ds1 <- data.frame(x=c(1,2,3,4), y=c(5,6,7,8)) ds1 <- data.frame(x=c(9,10,11,12), y=c(13,14,15,16)) ... and I would like to combine them into just one data frame like ds <- rbind(ds1, ds2, ...) Becau

Re: [R] NEW: Sociolects in R

2008-04-01 Thread Eric Lecoutre
I can see that R_help mailing list always has the same quality and educative interest, even at some recurrent dates. Keep up the good job, eh. Best wishes, Eric 2008/4/1, Peter Dalgaard <[EMAIL PROTECTED]>: > > The R translation teams have done a great job in making R usable for > people who d

[R] strange behavior of my function

2008-04-01 Thread Kyeongmi Cheon
Hello, I wrote a program to convert normal distribution to trinomial distribution (three levels=0,1,2). But the first function I wrote (convert.to.trinom1) converts everything to 2. When I changed it slightly (convert.to.trinom2), it works correctly (ie. converts to 0,1, or 2). I cannot figure out

Re: [R] strange behavior of my function

2008-04-01 Thread ronggui
You should write the function in this way, I think. convert.to.trinom3=function(data, z1, z2){ ans <- data ans[data=z2]=2 ans } On Tue, Apr 1, 2008 at 11:54 PM, Kyeongmi Cheon <[EMAIL PROTECTED]> wrote: > Hello, > I wrote a program to convert normal distribution to trinomial > distrib

Re: [R] Overlay plots from different data sets using the Lattice package

2008-04-01 Thread Christoph Meyer
Hi all, I'm a newbie to lattice graphics. I think I have a very similar problem trying to overlay plots from different data sets. I tried a number of different things but don't seem to get it to work. I am using xYplot from library Hmisc to produce a lattice plot with Median plus error bands plott

Re: [R] access networked PCs directories/files with R ?

2008-04-01 Thread mel
Prof Brian Ripley a écrit : > On Tue, 1 Apr 2008, mel wrote: > >> access networked PCs directories/files with R ? >> >> Dear group, >> >> I would like to know if there is an "easy" way to access several >> networked PCs directories/files from one PC with R ? >> Concerned OS is windows. >> >> I can

Re: [R] Applying rbind() to a sequence of data frame names

2008-04-01 Thread Henrique Dallazuanna
Try this: do.call(rbind, lapply(ls(patt="^ds[0-9]"), get)) On 01/04/2008, Hans W. Borchers <[EMAIL PROTECTED]> wrote: > I have a set of data frames ds1, ds2, ... each having the same columns > and column names: > > ds1 <- data.frame(x=c(1,2,3,4), y=c(5,6,7,8)) > ds1 <- data.frame(x=c(9,10,11

Re: [R] Applying rbind() to a sequence of data frame names

2008-04-01 Thread jim holtman
Will this do it for you: > ds1 <- data.frame(x=c(1,2,3,4), y=c(5,6,7,8)) > ds2 <- data.frame(x=c(9,10,11,12), y=c(13,14,15,16)) > ds3 <- data.frame(x=c(1,2,3,4), y=c(5,6,7,8)) > ds4 <- data.frame(x=c(9,10,11,12), y=c(13,14,15,16)) > x.n <- c('ds1','ds2','ds3','ds4') > > # create a list of data

[R] superimpose histogram on biplot

2008-04-01 Thread Jennie Lavine
Hi all, I've been trying to figure out how to superimpose a histogram on a biplot that shows the relative contribution of each axis. I have been using the NIPALS function (http://biomserv.univ-lyon1.fr/~dray/ files/softwares/nipals.R) to run principal component analyses. Here is a toy exa

Re: [R] superimpose histogram on biplot

2008-04-01 Thread Stéphane Dray
Hi Jennie, if you have questions about ade4, you can use the adelist http://listes.univ-lyon1.fr/wws/info/adelist ade4 has the add.scatter.eig function which is exactly what you need. Try add.scatter.eig(nipmat$eig, xax=1, yax=2) Cheers, Jennie Lavine wrote: > Hi all, > > I've been trying to

Re: [R] NEW: Sociolects in R

2008-04-01 Thread Stefan Grosse
On Tuesday 01 April 2008 04:18:55 pm Peter Dalgaard wrote: PD> The R translation teams have done a great job in making R usable for PD> people who do not have English as their mother tongue. However, even PD> within English speaking countries, there are groups which have trouble PD> with the langua

Re: [R] lrm -interaction without main effect-error message

2008-04-01 Thread Frank E Harrell Jr
Eva Mosner wrote: > Dear all, > > this might be not only an R-question but also a statistical. > When I do a logistic regression analysis (species distribution modeling) > with function lrm (Design package) I get the follwoing error message: > > > tadl1<-lrm(triad~fd+dista+fd2+dista2+fd:dista+d

Re: [R] using a variable in a subset of a dataframe

2008-04-01 Thread Henrique Dallazuanna
You can try this: x <- data.frame() for(i in LETTERS[1:5]) x[1:10, i] <- rnorm(10) x On 01/04/2008, Georg Ehret <[EMAIL PROTECTED]> wrote: > Dear R community,I am using a dataset and would like to define new > variables using a R variable: > > e.g. > > for (i in 1:10){ >dataset$i<-som

[R] using a variable in a subset of a dataframe

2008-04-01 Thread Georg Ehret
Dear R community,I am using a dataset and would like to define new variables using a R variable: e.g. for (i in 1:10){ dataset$i<-something } But this is not the right way, I get only one variable in "dataset"... How can I change this? Thank you! Georg. Georg Ehr

Re: [R] unexpected GAM result - at least for me!

2008-04-01 Thread Monica Pisica
Hi, I've compared observed and predicted and they match 100%. For 90% probability of occurrence: table(can>0,fitted(can3.gam)>0.9) FALSE TRUE FALSE230 TRUE 0 125 So i guess it is a valid result . but very unexpected for me. Thank you again for all the help,

Re: [R] using a variable in a subset of a dataframe

2008-04-01 Thread Zaihra T
i m not sure what u really want to do but if ur looking for some subsample of dataset then u might wanna try this (say in case u want to resample ur dataset by column "id" in ur dataset then do resample<-sample(dataset$id,n,replace=F) dataset<-dataset[resample, ] note here n

Re: [R] ggplot2 - legend for fill coulours

2008-04-01 Thread hadley wickham
> However, it looks this works only when the data are in the sequence > of the levels in the factor defining the fill colours. When the > sequence is different, the legend gets "scrambled", in that the order > of the colours does not match the labels. You can fix this by explicitly specifying

Re: [R] using a variable in a subset of a dataframe

2008-04-01 Thread K. Elo
Henrique Dallazuanna wrote (1.4.2008): > You can try this: > > x <- data.frame() > for(i in LETTERS[1:5]) x[1:10, i] <- rnorm(10) > x Or this: --- cut here --- df<-data.frame(0) [obsolet, if df already exists] for (i in 1:10) { df<-data.frame(cbind(df,0)); names(df) [ncol(df)]<-as.character(i) }

[R] fortran problems with R >= 2.6.1 on Mac OS X

2008-04-01 Thread data-ploner.com
Hello, I tried to compile the source of a package which uses fortran90 with R 2.6.2 and R 2.6.1 without success. Compiling it with 2.5.1 is successful. The error message for versions >= 2.6.1 is: gfortran: error trying to exec 'f951': execvp r What is the reason for that? Best regards Meinh

Re: [R] ggplot2 - legend for fill coulours

2008-04-01 Thread Pedro de Barros
Hadley, Thanks a lot! BTW, do you have any document explaining the object philosophy of ggplot? I was trying to see how you defined scale_fill_identity, but could not find it... Cheers, Pedro At 19:50 2008/04/01, hadley wickham wrote: > > However, it looks this works only when the data are in

Re: [R] ps or pdf

2008-04-01 Thread Joerg van den Hoff
have not followed the thread completely, but: have you tried `bitmap' with `type = pdfwrite' (or psgrb) for comparison? at least with `pdf' there are some issues which can be avoided by using ghostscript via `bitmap'. joerg On Mon, Mar 31, 2008 at 04:17:50PM -0400, Francois Pepin wrote: > Prof B

Re: [R] download.file error

2008-04-01 Thread CHIB CO
Hi John Seers, thanks for the tip, it works. Kind Regards Chib > Subject: RE: [R] download.file error > Date: Tue, 1 Apr 2008 15:39:01 +0100 > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > CC: r-help@r-project.org > > Hi Chib > > >>whether there is a way of handling

Re: [R] Subset: data frames and factor levels

2008-04-01 Thread Ben Bolker
Weidong Gu uab.edu> writes: > > Try drop.levels in library gdata. > For what it's worth, adding a drop.levels (default FALSE) to subset is a long-standing wish of mine -- I keep meaning to put together a patch to do this. (This question comes up about once a year on the R help list.) I loo

[R] PAMR package question: How to plot Estimated probabilities for the training data and test data

2008-04-01 Thread Waverley
Hi, I have tried some time trying to figure out how to use pamr to plot multiclass Estimated probabilities for the training data and test data? Specifically, how to recreate the PAMR publication on PNAS with Tibshrani et al. The publication is as attached. The plot I want to do is Figure

[R] SEM with a categorical predictor variable

2008-04-01 Thread Lila86
Hi, we are trying to do structural equation modelling on R. However, one of our predictor variables is categorical (smoker/nonsmoker). Now, if we want to run the sem() command (from the sem library), we need to specify a covariance matrix (cov). However, Pearson's correlation does not work on the

[R] interactive rotating graphics

2008-04-01 Thread Lawrence Hanser
Dear Colleagues, Seems I had in the past run across the capability to create a three-dimensional scatterplot where I could use the mouse to "grab" the plot and rotate the axes with the mouse. I have used RSiteSearch and found a few things (e.g., TeachingDemos, iplot) but cannot find the package/f

Re: [R] WinXP exhibits sluggish graphics window movement & mouse tracking (repainting?) over windows graphics devices

2008-04-01 Thread Richard Yeh
Thanks for your message! Yes, the fault was with my configuration --- I changed the video card refresh rate setting from 75 Hz to 60 Hz and the behavior is no longer sluggish. On Mon, Mar 31, 2008 at 4:03 AM, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > I don't see this on a much older and slow

Re: [R] interactive rotating graphics

2008-04-01 Thread jim holtman
Try the 'rgl' package On Tue, Apr 1, 2008 at 8:09 PM, Lawrence Hanser <[EMAIL PROTECTED]> wrote: > Dear Colleagues, > > Seems I had in the past run across the capability to create a > three-dimensional scatterplot where I could use the mouse to "grab" > the plot and rotate the axes with the mouse.

Re: [R] Generating maps in R (Roger Bivand)

2008-04-01 Thread Aleksandr Andreev
Roger Bivand Roger.Bivand at nhh.no writes: >This was exactly why I emphasised care. One way to try to do this is > to extract the FS data slot: > FSd <- as(FS, "data.frame") > and then merge() FSd and agg2, using - untried - something like: > FS1d <- merge(FSd, agg2, by="row.names", all=TRUE) It

Re: [R] strange behavior of my function

2008-04-01 Thread Bill.Venables
There are simpler looking ways of doing this. Here are two convert.to.trinom3 <- function(data, z1, z2) ifelse(data < z1, 0, ifelse(data < z2, 1, 2)) convert.to.trinom3 <- function(data, z1, z2) cut(data, c(-Inf, z1, z2, Inf), labels = FALSE) - 1 The second neatly generalizes to the case