Re: [R] Conditional looping over a set of variables in R

2010-10-25 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 25.10.2010 20:41:55: > Adrienne, there's one glitch when I implement your solution below. When the > loop encounters a case with no data at all (that is, all 140 item responses > are missing), it aborts and prints this error message: " ERROR: argumen

[R] Odp: Panel regression

2010-10-25 Thread Petr PIKAL
Hi did you look at help page of lme? r-help-boun...@r-project.org napsal dne 25.10.2010 22:59:40: > > > Hi, > > I am trying to run a panel regression where I have a matrix of observations > and a matrix of independant variables - examples would trying to predict > countries's GDP with their

[R] problem with arima() function

2010-10-25 Thread benedikt . gehr
Hi I posted this problem yesterday but didn't get a reply so I try again today. I hope someone can help me with this. thank you very much for the help cheers Benedikt I would like to use arima () to find the best arima model for a time series. The default in arima appar

[R] ggplot2: how to label lines?

2010-10-25 Thread Jeffrey Spies
Hi, all, Let's say I have some time series data--10 subjects measured 20 times--that I plot as follows: library(ggplot2) dat <- data.frame(subject=as.factor(rep(1:10, each=20)), time=rep(1:20, 10), measure=as.vector(replicate(10, rnorm(20, mean=runif(1, 0, 15), sd=runif(1, 1, 3) p <- qplot(ti

Re: [R] problem with "make distribution"

2010-10-25 Thread Prof Brian Ripley
On Tue, 26 Oct 2010, Erin Hodgess wrote: Hello again. I downloaded the R_Tcl zip file and extracted it to c:\R\R-2.12.0 I re-ran the entire process and still have the same problem with Windows 7. So you will need to other way I suggested, to correct permissions/ownership. Thanks, Erin

Re: [R] Artifacts in filled.contour+pdf

2010-10-25 Thread baptiste auguie
Hi, As an alternative, maybe you could use lattice::panel.levelplot.raster which I think doesn't have this problem in pdf viewers. HTH, baptiste On 26 October 2010 02:30, David Winsemius wrote: > > On Oct 25, 2010, at 6:50 AM, Mario Valle wrote: > >> Dear all, >> I'm using R 2.12.0 on Windows

Re: [R] problem with "make distribution"

2010-10-25 Thread Erin Hodgess
Hello again. I downloaded the R_Tcl zip file and extracted it to c:\R\R-2.12.0 I re-ran the entire process and still have the same problem with Windows 7. Thanks, Erin On Mon, Oct 25, 2010 at 5:10 AM, Prof Brian Ripley wrote: > On Mon, 25 Oct 2010, Erin Hodgess wrote: > >> Dear R People: >> >

Re: [R] divide column in a dataframe based on a character

2010-10-25 Thread Daisy Englert Duursma
Thanks for the help. Easy as.. On Tue, Oct 26, 2010 at 3:33 PM, David Winsemius wrote: > > On Oct 25, 2010, at 8:56 PM, Daisy Englert Duursma wrote: > >> Hello, >> >> If I have a dataframe: >> >> example(data.frame) >> >> zz<-c("aa_bb","bb_cc","cc_dd","dd_ee","ee_ff","ff_gg","gg_hh","ii_jj","jj_k

Re: [R] Time series data with dropouts/gaps

2010-10-25 Thread Gabor Grothendieck
On Tue, Oct 26, 2010 at 12:28 AM, Bob Cunningham wrote: > I have time-series data from a pair of inexpensive self-logging 3-axis > accelerometers (http://www.gcdataconcepts.com/xlr8r-1.html).  Since I'm not > sure of the vibration/shock spectrum I'm measuring, for my initial sensor > characterizat

Re: [R] divide column in a dataframe based on a character

2010-10-25 Thread David Winsemius
On Oct 25, 2010, at 8:56 PM, Daisy Englert Duursma wrote: Hello, If I have a dataframe: example(data.frame) zz<- c ("aa_bb ","bb_cc ","cc_dd","dd_ee","ee_ff","ff_gg","gg_hh","ii_jj","jj_kk","kk_ll") ddd <- cbind(dd, group = zz) and I want to divide the column named group by the "_", how

[R] using coxme to fit random slope cox PH model

2010-10-25 Thread Ian Vi
Hi all, I was trying to fit random slope cox proportional hazards model on counting process type of data (right censoring data), but the  coxme(Surv(time1, time2, event)~ x + (1+x | cluster)) did not seem to work. I'd appreciate it if anyone can help me with that. [[alternative HTML

[R] Time series data with dropouts/gaps

2010-10-25 Thread Bob Cunningham
I have time-series data from a pair of inexpensive self-logging 3-axis accelerometers (http://www.gcdataconcepts.com/xlr8r-1.html). Since I'm not sure of the vibration/shock spectrum I'm measuring, for my initial sensor characterization run the units were mounted together with the sample rate

Re: [R] divide column in a dataframe based on a character

2010-10-25 Thread Bill.Venables
You are nearly there. example(data.frame) zz <- c("aa_bb","bb_cc","cc_dd","dd_ee","ee_ff", "ff_gg","gg_hh","ii_jj","jj_kk","kk_ll") ddd <- cbind(dd, group = zz) ddd <- within(ddd, { group <- as.character(group) tmp <- do.call(rbind, strsplit(group, "_")) gr

[R] Extract table from a webpage

2010-10-25 Thread Santosh Srinivas
Dear R-group, I've been able to use the XML package for getting relevant tables from webpages for my analysis. I'm stuck with this slightly more interactive problem involving clicking a link Fro this link . http://www.etintelligence.com/etig/et500/et500Ranking.jsp I want to get the data tabl

[R] divide column in a dataframe based on a character

2010-10-25 Thread Daisy Englert Duursma
Hello, If I have a dataframe: example(data.frame) zz<-c("aa_bb","bb_cc","cc_dd","dd_ee","ee_ff","ff_gg","gg_hh","ii_jj","jj_kk","kk_ll") ddd <- cbind(dd, group = zz) and I want to divide the column named group by the "_", how would I do this? so instead of the first row being x y fac char

Re: [R] calculate area between intersecting polygons

2010-10-25 Thread Remko Duursma
Dear Jonas, if you can write the difference in y-values between your polygons as a function, you can use integrate() to get the area between the polygons. It sounds like perhaps your x-values will not match between the polygons because they come from different sources, so you probably have to do

Re: [R] How to simulate from an estimated density

2010-10-25 Thread Duncan Murdoch
wangguojie2006 wrote: Thanks. I got it. Another question, why every time I posted something, it needs approval before it shows up? Any way I can speed up posting? Don't post from gmail.com. Duncan Murdoch (posting from gmail.com ...) __ R-help@r-p

[R] calculate area between intersecting polygons

2010-10-25 Thread jonas garcia
Dear list: I am trying to calculate the intersection area between two irregular polygons (see example data below). set.seed(1234) theta <- seq(0, 2 * pi, length=(100)) poly1<- cbind(c(0 + 1 * cos(theta) + rnorm(100, sd=0.1)), c(0 + 2 * sin(theta))) poly2<- cbind(c(0 + 2 * cos(theta) ), c

[R] rgdal intallation mac ox x

2010-10-25 Thread L. Ignacio Vilchis
Hi all, Could anybody who has successfully installed the rgdal package on r64 on a mac help me out. I have downloaded all o the needed frameworks(gdal, proj, etc), I am just having trouble getting the correct script for install.packages(). Thanks! L. Ignacio Vilchis, Ph.D. SeaDoc Society - W

Re: [R] How to simulate from an estimated density

2010-10-25 Thread wangguojie2006
Thanks. I got it. Another question, why every time I posted something, it needs approval before it shows up? Any way I can speed up posting? -- View this message in context: http://r.789695.n4.nabble.com/How-to-simulate-from-an-estimated-density-tp3009394p3012815.html Sent from the R help mail

Re: [R] Artifacts in filled.contour+pdf

2010-10-25 Thread David Winsemius
On Oct 25, 2010, at 6:50 AM, Mario Valle wrote: Dear all, I'm using R 2.12.0 on Windows 7 (32bits) I created a filled contour from the attached data using the following code: load('bug.RData') pdf('bug.pdf', width=14, height=7) filled.contour(o4$x, o4$y, o4$z, color=rainbow, xlim=c(4,18),

Re: [R] R-Fortran question (multiple subroutines)

2010-10-25 Thread Remko Duursma
Hi Berwin and all others who replied: that did the trick, thanks for your help! remko > Actually, it turns out that this example is simplified enough. :) > > I put this snippet into a file, compiled it via "R CMD SHLIB", loaded > it into R and then was very surprised about the result of ".Fort

Re: [R] help with adding lines to current plot

2010-10-25 Thread Changbin Du
Yes, Joshua, Thanks so much! On Mon, Oct 25, 2010 at 2:47 PM, Joshua Wiley wrote: > Dear Changbin, > > The lines do not show up because they are outside the region of your > graph. If you add the yaxis labels back in you will see this. You > can avoid it by specifying ylim argument in plot() r

Re: [R] help with adding lines to current plot

2010-10-25 Thread Joshua Wiley
Dear Changbin, The lines do not show up because they are outside the region of your graph. If you add the yaxis labels back in you will see this. You can avoid it by specifying ylim argument in plot() rather than letting R decide by itself. Here is revised code: x <- seq(0,10, by=1) y <- c(0.9

[R] help with adding lines to current plot

2010-10-25 Thread Changbin Du
HI, Dear R community, I am using the following codes to plot, however, the lines code works. But the line was not drawn on the previous plot and did not shown up. How comes? # specify the data for missense simulation x <- seq(0,10, by=1) y <- c(0.952, 0.947, 0.943, 0.941, 0.933, 0.932, 0.939, 0

Re: [R] question in using nlme and lme4 for unbalanced data

2010-10-25 Thread Ben Bolker
On 10-10-25 04:59 PM, Bert Gunter wrote: > ...ignore the block variation entirely, " > > If the between block variability is large, this will lose precision; > with imbalance, it could also result in bias (prhaps not in this > study...). The mixed or fixed effects choice is arbitrary; this is not

[R] Panel regression

2010-10-25 Thread vincent.deluard
Hi, I am trying to run a panel regression where I have a matrix of observations and a matrix of independant variables - examples would trying to predict countries's GDP with their data on education, FDI, tax rates, over time. For the purpose of simplicity, my data would be: dep = matrix(rnorm(

Re: [R] Chron object in time series plot

2010-10-25 Thread Manta
Wonderful! Thanks a lot for your help, super appreciated! -- View this message in context: http://r.789695.n4.nabble.com/Chron-object-in-time-series-plot-tp3002285p3012793.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-proj

[R] online course: Spatial Analysis Techniques in R with David Unwin at statistics.com

2010-10-25 Thread Janet Dobbins
statistics.com offers "Spatial Analysis Techniques in R" with David Unwin on Dec. 17 - Jan. 22 This course will teach users how to implement spatial statistical analysis procedures using R software. Topics covered include point pattern analysis, identifying clusters, measures of spatial associatio

[R] online course: SVM in R with Lutz Hamel at statistics.com

2010-10-25 Thread Janet Dobbins
Support vector machines (SVMs) have established themselves as one of the preeminent machine learning models for classification and regression over the past decade or so, frequently outperforming artificial neural networks in task such as text mining and bioinformatics. Dr. Lutz Hamel, author of "K

Re: [R] Chron object in time series plot

2010-10-25 Thread Gabor Grothendieck
On Mon, Oct 25, 2010 at 4:12 PM, Manta wrote: > > I apologize for not being very precise. I meant the tick marks on the x-axis. > > As for the code, the situation is just the one describe above, just that I > would like to be able to specify the tick marks (say every 3 or 6 months). Using z and z

Re: [R] problem with setRepositories

2010-10-25 Thread Carson, John
Thanks Duncan! R version 2.11.1 (2010-05-31) for Windows 32 bit. getOption("repos") CRAN "http://lib.stat.cmu.edu/R/CRAN/"; CRANextra "http://

Re: [R] Mixed-effects model for overdispersed count data?

2010-10-25 Thread Ben Bolker
dave fournier otter-rsch.com> writes: > > According to the documentation for glmmADMB if you fit > your model with a statment like > > fit =glmm.admb(y~Base*trt+Age+Visit, ... data=epil2,family="nbinom") > > and that the parameter estimates are in > > fit$b while their estimated standar

Re: [R] question in using nlme and lme4 for unbalanced data

2010-10-25 Thread Ben Bolker
Bert Gunter gene.com> writes: Thanks for starting this. I don't really disagree, much. > I would say that these are not really R questions, but about > statistical procedures in general. However, there are some important > issues that you touch on, so I cannot resist commenting. Hopefully my

Re: [R] Chron object in time series plot

2010-10-25 Thread Manta
I apologize for not being very precise. I meant the tick marks on the x-axis. As for the code, the situation is just the one describe above, just that I would like to be able to specify the tick marks (say every 3 or 6 months). -- View this message in context: http://r.789695.n4.nabble.com/Chro

Re: [R] Chron object in time series plot

2010-10-25 Thread Gabor Grothendieck
On Mon, Oct 25, 2010 at 3:48 PM, Manta wrote: > > My bad! What I meant is that I want to plot the whole series, but the legend > in the x-axis would only present some specific months depending on the > window I want to choose, say 6 months. At the moment, it only present 2008, > 2009 and 2010. >

Re: [R] Chron object in time series plot

2010-10-25 Thread Manta
My bad! What I meant is that I want to plot the whole series, but the legend in the x-axis would only present some specific months depending on the window I want to choose, say 6 months. At the moment, it only present 2008, 2009 and 2010. Thanks -- View this message in context: http://r.789695.

Re: [R] question in using nlme and lme4 for unbalanced data

2010-10-25 Thread Bert Gunter
Chi: I would say that these are not really R questions, but about statistical procedures in general. However, there are some important issues that you touch on, so I cannot resist commenting. Hopefully my comments might pique others to add theirs -- and perhaps to disagree with me. 1. Unbalanced

Re: [R] Using tapply?

2010-10-25 Thread Alex Savenkov
Hi Amy, I guess U can just use the apply() function for the purpose U described. Alex -- View this message in context: http://r.789695.n4.nabble.com/Using-tapply-tp3009834p3012694.html Sent from the R help mailing list archive at Nabble.com. __ R-

Re: [R] Chron object in time series plot

2010-10-25 Thread Gabor Grothendieck
On Mon, Oct 25, 2010 at 3:01 PM, Manta wrote: > > I would like to thank you all for the help given so far! > > I have the following object of the class 'zoo' > >> temp_mean_plot[31:35] > 2008-02-13 2008-02-14 2008-02-15 2008-02-18 2008-02-19 >  14.86834   14.89609   14.89358   14.87610   14.87652

Re: [R] problem with setRepositories

2010-10-25 Thread Duncan Murdoch
On 25/10/2010 3:09 PM, Carson, John wrote: When I call setRepositories() I get an error Error in aa[aa == ""]<- repos[new][aa == ""] : NAs are not allowed in subscripted assignments Does anyone know how to fix this? What version of R are you using? What does getOp

[R] question in using nlme and lme4 for unbalanced data

2010-10-25 Thread Chi Yuan
Hello: I have an two factorial random block design. It's a ecology experiment. My two factors are, guild removal and enfa removal. Both are two levels, 0 (no removal), 1 (removal). I have 5 blocks. But within each block, it's unbalanced at plot level because I have 5 plots instead of 4 in each blo

[R] problem with setRepositories

2010-10-25 Thread Carson, John
When I call setRepositories() I get an error Error in aa[aa == ""] <- repos[new][aa == ""] : NAs are not allowed in subscripted assignments Does anyone know how to fix this? Thanks, John Internet Email Confidentiality Footer Privileged/Confidential Informat

Re: [R] Chron object in time series plot

2010-10-25 Thread Manta
I would like to thank you all for the help given so far! I have the following object of the class 'zoo' > temp_mean_plot[31:35] 2008-02-13 2008-02-14 2008-02-15 2008-02-18 2008-02-19 14.86834 14.89609 14.89358 14.87610 14.87652 The sample runs from Jan 2008 to July 2010. How can I sp

Re: [R] Conditional looping over a set of variables in R

2010-10-25 Thread David Herzberg
Adrienne, there's one glitch when I implement your solution below. When the loop encounters a case with no data at all (that is, all 140 item responses are missing), it aborts and prints this error message: " ERROR: argument is of length zero". I wonder if there's a logical condition I could a

Re: [R] Mixed-effects model for overdispersed count data?

2010-10-25 Thread dave fournier
According to the documentation for glmmADMB if you fit your model with a statment like fit =glmm.admb(y~Base*trt+Age+Visit, ... data=epil2,family="nbinom") and that the parameter estimates are in fit$b while their estimated standard deviations are in fit$stdbeta so presumably p val

Re: [R] building lme call via call()

2010-10-25 Thread William Dunlap
Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Vito Muggeo (UniPa) > Sent: Monday, October 25, 2010 9:16 AM > To: r-h...@stat.math.ethz.ch > Subject: [R] building lme

Re: [R] finding the year of a date

2010-10-25 Thread Dimitri Liakhovitski
Thank you very much! Dimitri On Mon, Oct 25, 2010 at 12:46 PM, Gabor Grothendieck wrote: > On Mon, Oct 25, 2010 at 12:38 PM, Dimitri Liakhovitski > wrote: >> I know that I can use as.yearmon in the package "zoo" to find the year >> and the month of a date. >> I can use as. yearqtr to find the ye

Re: [R] CRAN vs R-Forge

2010-10-25 Thread Steve Lianoglou
Hi, On Mon, Oct 25, 2010 at 1:29 PM, Jason Kwok wrote: > What's the difference between the packages you get from CRAN and R-Forge? > Are the packages you get from CRAN fully developed and R-Forge > work-in-progress? You pretty much got it right. R-forge provides "an ecosystem" to help develop y

Re: [R] extracting characteristics of datasets from data()

2010-10-25 Thread Henrique Dallazuanna
Try this: data(list = DS$results[,'Item'], package = 'vcdExtra', envir = ne <- new.env()) cbind(do.call(rbind, eapply(ne, function(x)data.frame(class = class(x), dim = paste(dim(x), collapse = 'x', Title = DS$results[,'Title']) On Mon, Oct 25, 2010 at 1:45 PM, Michael Friendly wrote: > I ca

Re: [R] dataframe, transform, strsplit

2010-10-25 Thread Gabor Grothendieck
On Mon, Oct 25, 2010 at 1:20 PM, Matthew Pettis wrote: > Thanks Gabor and Jim, > Both solutions worked equally well for me (now I have an embarrassment of > riches for a solution :-) ). > Now that my main problem is solved, I am happy, but I was wondering if > anyone would care to comment as to wh

[R] CRAN vs R-Forge

2010-10-25 Thread Jason Kwok
What's the difference between the packages you get from CRAN and R-Forge? Are the packages you get from CRAN fully developed and R-Forge work-in-progress? Regards, Jason [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] dataframe, transform, strsplit

2010-10-25 Thread Matthew Pettis
Thanks Gabor and Jim, Both solutions worked equally well for me (now I have an embarrassment of riches for a solution :-) ). Now that my main problem is solved, I am happy, but I was wondering if anyone would care to comment as to why my 'strsplit' solution doesn't behave the way I think it shoul

Re: [R] dataframe, transform, strsplit

2010-10-25 Thread Gabor Grothendieck
On Mon, Oct 25, 2010 at 12:53 PM, Matthew Pettis wrote: > Hi, > > I have a dataframe that has a column of vectors that I need to extract off > the character string before the first '.' character and put it into a > separate column.  I thought I could use 'strsplit' for it within > 'transform', but

Re: [R] dataframe, transform, strsplit

2010-10-25 Thread jim holtman
try this: > df have want 1 a.b.ca 2 d.e.fd 3 g.h.ig > df$get <- gsub("^([^.]+).*", "\\1", df$have) > df have want get 1 a.b.ca a 2 d.e.fd d 3 g.h.ig g On Mon, Oct 25, 2010 at 12:53 PM, Matthew Pettis wrote: > Hi, > > I have a dataframe that has a column of ve

[R] Hausman Test

2010-10-25 Thread Amrita Ghosh Dastidar
Hi, I'm trying to conduct a Hausman test to choose between FE estimators and RE estimators. When I run the code, I get an error: Error in solve.default(dvcov) : system is computationally singular: reciprocal condition number = 3.7981e-22 Can someone please help me with this problem? ~ Amrita

[R] dataframe, transform, strsplit

2010-10-25 Thread Matthew Pettis
Hi, I have a dataframe that has a column of vectors that I need to extract off the character string before the first '.' character and put it into a separate column. I thought I could use 'strsplit' for it within 'transform', but I can't seem to get the right invocation. Here is a sample datafra

Re: [R] Question on passing the subset argument to an lm wrapper

2010-10-25 Thread Henrique Dallazuanna
As workaround you can try this: testlm <- function(formula, ...) { args <- list(formula, data = df1, ...) do.call(lm, args) } testlm(bmi ~ age, subset = df1$age > 50) On Mon, Oct 25, 2010 at 2:16 AM, Erik Iverson wrote: > Hello, > > How would you go about handling the following situation?

Re: [R] Question on passing the subset argument to an lm wrapper

2010-10-25 Thread Charles C. Berry
On Sun, 24 Oct 2010, Erik Iverson wrote: Hello, How would you go about handling the following situation? This is on R 2.12.0 on Ubuntu 32-bit. I have a wrapper function to lm. I want to pass in a subset argument. First, I just thought I'd use "...". The subset arg needs to be unevaluated u

Re: [R] finding the year of a date

2010-10-25 Thread Gabor Grothendieck
On Mon, Oct 25, 2010 at 12:38 PM, Dimitri Liakhovitski wrote: > I know that I can use as.yearmon in the package "zoo" to find the year > and the month of a date. > I can use as. yearqtr to find the year and the quarter. > But how can one find just the year of a date? > > Thanks a lot! Here are th

Re: [R] finding the year of a date

2010-10-25 Thread Henrique Dallazuanna
Try this: format(Sys.Date(), "%Y") On Mon, Oct 25, 2010 at 2:38 PM, Dimitri Liakhovitski < dimitri.liakhovit...@gmail.com> wrote: > I know that I can use as.yearmon in the package "zoo" to find the year > and the month of a date. > I can use as. yearqtr to find the year and the quarter. > But ho

[R] finding the year of a date

2010-10-25 Thread Dimitri Liakhovitski
I know that I can use as.yearmon in the package "zoo" to find the year and the month of a date. I can use as. yearqtr to find the year and the quarter. But how can one find just the year of a date? Thanks a lot! -- Dimitri Liakhovitski Ninah Consulting www.ninah.com

[R] building lme call via call()

2010-10-25 Thread Vito Muggeo (UniPa)
dear all, I would like to get the lme call without fitting the relevant model. library(nlme) data(Orthodont) fm1 <- lme(distance ~ age, random=list(Subject=~age),data = Orthodont) To get fm1$call without fitting the model I use call(): my.cc<-call("lme.formula", fixed= distance ~ age, random =

Re: [R] extracting characteristics of datasets from data()

2010-10-25 Thread Seeliger . Curt
> Michael writes: > I can use data() to find the available datasets in a package, but I'd > like to extract and display some additional > information for each dataset than what is provided by data(), e.g., > class() and dim() for datasets for which > these are available. > ... > for all datasets

Re: [R] zoo.read intraday data

2010-10-25 Thread Gabor Grothendieck
On Mon, Oct 25, 2010 at 11:44 AM, Immanuel wrote: > Thanks, > > by now I ran already into the next problem, while trying to convert > the zoo to an xts object. > Somehow the timestamps get lost, no idea why. > > I did read through the vignettes, but got confused > by all this, chron, as.POSIXct, z

Re: [R] Mixed-effects model for overdispersed count data?

2010-10-25 Thread Ben Bolker
Marie-Hélène Hachey hotmail.com> writes: > > > Hi, > > I have to analyse the number of provisioning trips to nestlings > according to a number of biological and > environmental factors. I was thinking of building a mixed-effects model > with species and nestid as > random effects, using a Poi

Re: [R] zoo.read intraday data

2010-10-25 Thread Immanuel
Thanks, by now I ran already into the next problem, while trying to convert the zoo to an xts object. Somehow the timestamps get lost, no idea why. I did read through the vignettes, but got confused by all this, chron, as.POSIXct, zoo and xts stuff. with your example I got: Error in .subset(x, j

[R] extracting characteristics of datasets from data()

2010-10-25 Thread Michael Friendly
I can use data() to find the available datasets in a package, but I'd like to extract and display some additional information for each dataset than what is provided by data(), e.g., class() and dim() for datasets for which these are available. I'm stuck on using using lapply properly with obje

Re: [R] 140 packages in R Commander!!

2010-10-25 Thread John Fox
Dear Ajay, Each of the Rcmdr plug-ins is an R package with its own dependencies, which you can check on CRAN. Since dependencies can have dependencies, etc., you'd have to be careful in drawing conclusions. I'm not sure what the help system has to do with it. Best, John

Re: [R] 140 packages in R Commander!!

2010-10-25 Thread Ajay Ohri
Hi John Its not the download I mind - it's a one shot thing- Could you think of integrating the help across plugins- that can help. For example I really want to know which plugin would use snow and foreach if at all Ajay Websites- http://decisionstats.com http://dudeofdata.com Linkedin- www.

[R] Mixed-effects model for overdispersed count data?

2010-10-25 Thread Marie-Hélène Hachey
Hi, I have to analyse the number of provisioning trips to nestlings according to a number of biological and environmental factors. I was thinking of building a mixed-effects model with species and nestid as random effects, using a Poisson distribution, but the data are overdispersed (variance/

Re: [R] lowess() won't handle NAs

2010-10-25 Thread Jonathan P Daily
Try using the loess() function instead - it has an "na.action" parameter that should be able to handle your problem. -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 "Is the room still a room

Re: [R] structural equation modeling in sem, error, The model has negative degrees of freedom = -3, and The model is almost surely misspecified...

2010-10-25 Thread John Fox
Dear Alex, Your problem doesn't have much to do with the sem package. The model that you're trying to estimate is grossly underidentified. The model has 9 parameters to estimate and there are only 3*4/2 = 6 covariances among the 3 observed variables, hence the -3 df. There are also no exogenous va

[R] non-stationary ar part in css

2010-10-25 Thread Benedikt Gehr
Hi I would like to use arima () to find the best arima model for y time series. The default in arima apparently is to use conditional sum of squares to find the starting values and then ML (as described on the help page). Now using the default may lead to error messages saying: "non-stationary

[R] Using R with Google Storage/Big Query and Prediction API

2010-10-25 Thread Ajay Ohri
Dear List Google has new beta lists for storage, querying and prediction at http://code.google.com/apis/predict/docs/getting-started.html http://code.google.com/apis/bigquery/docs/getting-started.html#intro

[R] help on lme extraction

2010-10-25 Thread Jin, Jp
Dear R list, I need some help in extracting comparisons in the result of lme. I have a data set similar to the example data, Orthodont, using patient subject as a random effect and did something below: library(nlme) library(gregmisc) data(Orthodont) Orthodont$AgeGroup <- gtools::quantcut(Orthod

[R] lowess() won't handle NAs

2010-10-25 Thread Federico Bonofiglio
Dear Masters, I'm driving crazy with the lowess() function my intent is smoothing confidence intervals for predicted y values in a linear model lm() setting since in the predict() function there exists an option for predicting NA values, I instead encounter problems when I fit a missing valu

Re: [R] R-Fortran question (multiple subroutines)

2010-10-25 Thread Berend Hasselman
Berwin A Turlach wrote: > >> Remko Duursma wrote: > [...] >> > I.e, my code looks something like this: >> > >> > subroutine f(x,y,z) >> > >> > call g(x,y,z) >> > >> > end >> > >> > subroutine g(x,y,z) >> > >> > z = x*y >> > >> > end >> > >> > >> > calling this from R shows that subroutin

[R] Q reg connecting to existing dll

2010-10-25 Thread Gandhi, Puneet - RSCH AMRS
Hi, I am an R newbie and trying to migrate from VB to R. I downloaded data from Haver using an existing dll in VB. For e.g. I declared functions such as Private Declare Function DLXOpenDatabase Lib "DLXAPI32" (ByVal DBName$) As Long And then used them as k = DLXOpenDatabase("W:/DLX/USECON") M

Re: [R] How to save R file into specific type

2010-10-25 Thread David Winsemius
On Oct 25, 2010, at 1:07 AM, zhiji19 wrote: Hello everyone Can you please teach me how to save my homework as .R file? ?savehistory # at least on a Mac (If you wanted the whole console session with output, then it would be select-all, copy, paste into a text editor, save as a text file.

Re: [R] Contour Plot on a non Rectangular Grid

2010-10-25 Thread David Winsemius
On Oct 25, 2010, at 3:41 AM, Lorenzo Isella wrote: On 10/25/2010 01:32 AM, David Winsemius wrote: You were advised to look at rms. Why have you dismissed this suggestion? Using your data setup below and packaging into a dataframe. require(rms) ddf <- datadist(xysf <- as.data.frame(xys)) ol

Re: [R] Optimize parameters of ODE Problem which is solved numeric

2010-10-25 Thread Ravi Varadhan
Hi Michael, You do not need a numerical solver for this. This is a linear system of ODEs and it admits closed form solutions. The solution is given as: Y(t) = c_1 * v_1 * exp(k_1 * t) + ... + c_4 * v_4 * exp(k_4 * t) where k_1, ..., k_4 are the eigenvalues (can be real or complex) and v_1, ...

Re: [R] best predictive model for mixed catagorical/continuous variables

2010-10-25 Thread Robert Baer
I would expect that there will be interactions between variables eg. if the vegetation is grassland then the vegetation height variable will mediate the interaction, if the vegetation is arable then crop type will be more significant. Would it be possible to use GLM or GAM models for this type

Re: [R] zoo.read intraday data

2010-10-25 Thread Gabor Grothendieck
On Mon, Oct 25, 2010 at 9:02 AM, Immanuel wrote: > Hello all, > > I'm trying to use zoo.read but can't figure out > how to deal with the time format. (example below) > > would be nice if someone could help. > > best regards, > Immanuel > > --- > L <- "Date,Time,Open,High,Lo

Re: [R] zoo.read intraday data

2010-10-25 Thread Immanuel
Hey, work's like a charm. thanks __ 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, self-contained, reproducible

Re: [R] zoo.read intraday data

2010-10-25 Thread Achim Zeileis
On Mon, 25 Oct 2010, Immanuel wrote: Hello all, I'm trying to use zoo.read Just for the record: read.zoo(). but can't figure out how to deal with the time format. (example below) Yes, the problem is only the chron conversion (and not read.zoo). would be nice if someone could help. best

Re: [R] .R file

2010-10-25 Thread Jakson A. Aquino
On Mon, Oct 25, 2010 at 9:11 AM, Mike Marchywka wrote: > You mention Notepad++, I'm still using vi under cygwin and an ancient copy of > ultra edit. People who uses vi or vim may be interested in looking at the plugin to Vim that I'm developing. The plugin works in Windows, Linux and OS X: http

[R] zoo.read intraday data

2010-10-25 Thread Immanuel
Hello all, I'm trying to use zoo.read but can't figure out how to deal with the time format. (example below) would be nice if someone could help. best regards, Immanuel --- L <- "Date,Time,Open,High,Low,Close,Up,Down 05.02.2001,00:30,421.20,421.20,421.20,421.20,1

Re: [R] font.lab and font.axis

2010-10-25 Thread Łukasz Ręcławowicz
W dniu 25 pa¼dziernika 2010 13:14 u¿ytkownik Jim Lemon napisa³: > On 10/25/2010 08:02 PM, £ukasz Rêc³awowicz wrote: > >> >> >> 2010/10/25 Jim Lemon mailto:j...@bitwrit.com.au>> >> >> >> Would someone like to suggest a better way to get "axis" to look >>at the font it's supposed to be usin

Re: [R] Find index of a string inside a string?

2010-10-25 Thread yoav baranan
Indeed, thank you. The exact equivalent of index in SAS seems to me: > regexpr("bcd", "aabcd", fixed=T)[1] [1] 3 > Date: Mon, 25 Oct 2010 07:53:22 -0400 > Subject: Re: [R] Find index of a string inside a string? > From: jholt...@gmail.com > To: ybara...@hotmail.com > CC: r-help@r-project.org >

Re: [R] .R file

2010-10-25 Thread Mike Marchywka
> All three of these editors are external to R but have the capability of > sending code from the editor to the console. All of them are good and have > loyal user bases. Notepad++ is another option; but you have to copy/paste > code to R - I mention it because it has syntax highlighting and is c

Re: [R] Controlling number of numbers before R rewrites to "+e18" etc

2010-10-25 Thread jim holtman
You can always read a portion of the file and then write it out. For large files, I will read in 10,000 line, fix them up and then write them out and go back and process the next batch of lines. You haven't shown us what a sample of your input/output is, or how you are processing them. Depending

Re: [R] R-Fortran question (multiple subroutines)

2010-10-25 Thread Berwin A Turlach
G'day all, On Mon, 25 Oct 2010 06:52:15 -0400 Duncan Murdoch wrote: > Remko Duursma wrote: [...] > > I.e, my code looks something like this: > > > > subroutine f(x,y,z) > > > > call g(x,y,z) > > > > end > > > > subroutine g(x,y,z) > > > > z = x*y > > > > end > > > > > > calling this from

Re: [R] plot does not work

2010-10-25 Thread jim holtman
try 'graphics.off()' to close any device that might be open and see if you see any output. On Mon, Oct 25, 2010 at 5:44 AM, Alaios wrote: > Hello everyone > > The following two commands > plot.default(seq(1,5),seq(2,6)) > plot(seq(1,5),seq(2,6)) > > plot nothing. One day ago this would create a s

Re: [R] Find index of a string inside a string?

2010-10-25 Thread Hadley Wickham
Or str_locate: library(stringr) str_locate("aabcd", "bcd") Hadley On Mon, Oct 25, 2010 at 5:53 AM, jim holtman wrote: > I think what you want is 'regexpr': > >> regexpr("bcd", "aabcd") > [1] 3 > attr(,"match.length") > [1] 3 >> > > > On Mon, Oct 25, 2010 at 7:27 AM, yoav baranan wrote: >> >> H

Re: [R] Find index of a string inside a string?

2010-10-25 Thread jim holtman
I think what you want is 'regexpr': > regexpr("bcd", "aabcd") [1] 3 attr(,"match.length") [1] 3 > On Mon, Oct 25, 2010 at 7:27 AM, yoav baranan wrote: > > Hi, > I am searching for the equivalent of the function Index from SAS. > > In SAS: index("abcd", "bcd") will return 2 because bcd is locate

Re: [R] difftime error

2010-10-25 Thread dpender
That's it exactly. Do you know how to specify the timezone for Sydney, Australia? -- View this message in context: http://r.789695.n4.nabble.com/difftime-error-tp3010105p3010175.html Sent from the R help mailing list archive at Nabble.com. __ R-help@

Re: [R] Find index of a string inside a string?

2010-10-25 Thread yoav baranan
Thank you. I know grep, but I don't know how to use it for what I need to do. for instance: > grep("bcd", "abcd") returns: [1] 1 > grep("bcd", "aabcd") returns: [1] 1 I need the first one to return 2 ("b" is in the 2nd cell), and the second one return 3 ("b" is in the 3rd cell). thanks > Fro

Re: [R] Find index of a string inside a string?

2010-10-25 Thread Nick Sabbe
For simple searches, use grep with fixed=TRUE. Check ?grep. Nick Sabbe -- ping: nick.sa...@ugent.be link: http://biomath.ugent.be wink: A1.056, Coupure Links 653, 9000 Gent ring: 09/264.59.36 -- Do Not Disapprove -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bo

[R] Find index of a string inside a string?

2010-10-25 Thread yoav baranan
Hi, I am searching for the equivalent of the function Index from SAS. In SAS: index("abcd", "bcd") will return 2 because bcd is located in the 2nd cell of the abcd string. The equivalent in R should do this: > myIndex <- foo("abcd", "bcd") #return 2. What is the function that I am looking fo

  1   2   >