Re: [R] For loop for subset - repeating same over and over?

2011-09-29 Thread Mario Valle
Not reproducible. Could you please attach the dataset QInflAvgbyPlot Otherwise I don't see anything obviously wrong here. Ciao! mario On 30-Sep-11 01:37, kelseyann wrote: SiteSpp<- c("ADHALP","ADLCON","ADLARC","BDALAT","BDPARC","BDLCON","BDLARC","AWCAQU","AWERU

[R] trouble in installing package "matching".

2011-09-29 Thread Jp zhu
I am a new R user. I trying to install a package all Matching but failed. Here is the error msg. > install.packages("Matching", dependencies=TRUE) Installing package(s) into ‘C:/Users/jzhu/Documents/R/win-library/2.13’ (as ‘lib’ is unspecified) --- Please select a CRAN mirror for use in this sessi

[R] need help on forest plot with ggplot

2011-09-29 Thread wirichada
Dear R users, I am trying to do the forest plot follow the function given on web. However, the order of the tests has been sorted alphabetically. I would prefer keeping the order as data frame input so that I can group and compare (from the graph) the target immune NS1, IgG and IgM (where SD, BioR

[R] For loop for subset - repeating same over and over?

2011-09-29 Thread kelseyann
Hello, I am using the following script to run an anova for numerous species in a table that I have: SiteSpp <- c("ADHALP","ADLCON","ADLARC","BDALAT","BDPARC","BDLCON","BDLARC","AWCAQU","AWERUS","AWEANG","AWDPSI","BWCSTA","BWHPAU","BWETRI","BWERUS","BWDFIS","BWPARC","BWLCON","BWLARC","BWJBIG") n.

Re: [R] Interaction plot type=o

2011-09-29 Thread Petr PIKAL
> > David, > thank you for your reply > > I tried this > attach(mtcars) > interaction.plot(cyl, gear, mpg, type="o", pch=5:8, lty=1 ) > > but I got this error: > Error in match.arg(type) : 'arg' should be one of "l", "p", "b" > > and in ?interaction.plot, "o" it is not listed in type arguments.

Re: [R] Interaction plot type=o

2011-09-29 Thread Heverkuhn Heverkuhn
David, thank you for your reply I tried this attach(mtcars) interaction.plot(cyl, gear, mpg, type="o", pch=5:8, lty=1 ) but I got this error: Error in match.arg(type) : 'arg' should be one of "l", "p", "b" and in ?interaction.plot, "o" it is not listed in type arguments. Is there any other way t

Re: [R] simplest pgfSweave example results in error

2011-09-29 Thread Yihui Xie
pgfSweave() tries to compile your tex file to PDF by default; that is where texi2dvi() came from. Are you compiling the same Rnw as you mentioned before? It looks odd because there should not be a makefile unless you turned on externalization (the Rnw file you provided did not use externalization)

Re: [R] For loop for subset - repeating same over and over?

2011-09-29 Thread B77S
The first suggestion would be to use dput() to allow people on here to access your data. see ?dput I think you will want to post the output from: dput(QInflAvgbyPlot) ## or whatever object contains your data kelseyann wrote: > > Hello, I am using the following script to run an anova fo

Re: [R] Interaction plot type=o

2011-09-29 Thread David Winsemius
On Sep 29, 2011, at 7:22 PM, Heverkuhn Heverkuhn wrote: Hello, I was wondering if there is any equivalent of interaction.plot that allow you to set type="o" I tried to use interaction.plot and I have a gap between the symbols of the points and the line. If it's OK to have the lines goi

Re: [R] random effects

2011-09-29 Thread David Winsemius
On Sep 29, 2011, at 5:34 PM, Rosario Garcia Gil wrote: Hello I have a data set with fixed and random effects, therefore I am using the lme function: lm(y ~ xfixed, random=~1|xrandom, data) After this I want to get the F-values for both the fixed and random predictors. I can easily get t

[R] Interaction plot type=o

2011-09-29 Thread Heverkuhn Heverkuhn
Hello, I was wondering if there is any equivalent of interaction.plot that allow you to set type="o" I tried to use interaction.plot and I have a gap between the symbols of the points and the line. Thank you in advance [[alternative HTML version deleted]]

Re: [R] simplest pgfSweave example results in error

2011-09-29 Thread syrvn
Hi Yihui, thank you very much for your answer. Just before I read your reply I deleted my basicTex and installed the full MacTex on my system. When I compile my .Rnw file I finally get a compiled PDF file. Nevertheless, R outputs the following error message: --- Not regenerat

Re: [R] simplest pgfSweave example results in error

2011-09-29 Thread Yihui Xie
Hi, You do not need to use a different Sweave.sty, but I think you have to add this to your Rnw file: \usepackage{tikz} Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Thu, Sep 29, 2011 at

[R] random effects

2011-09-29 Thread Rosario Garcia Gil
Hello I have a data set with fixed and random effects, therefore I am using the lme function: lm(y ~ xfixed, random=~1|xrandom, data) After this I want to get the F-values for both the fixed and random predictors. I can easily get the F-value and df for the xfixed predictors (anova()), but ho

[R] simultaneous confidence intervals for glm quasipoisson

2011-09-29 Thread Hlavka, Eileen
Hi all, Is there a package or function you would recommend for calculating confidence intervals for regression coefficients in quasipoisson models calculated using glm? The intervals need to be simultaneous across several alternative models. I know this is both a statistics and an R question,

Re: [R] F and Wald chi-square tests in mixed-effects models

2011-09-29 Thread Ben Bolker
Helios de Rosario ibv.upv.es> writes: > > I have a doubt about the calculation of tests for fixed effects in > mixed-effects models. > > I have read that, except in well-balanced designs, the F statistic that > is usually calculated for ANOVA tables may be far from being distributed > as an exa

[R] rm.outlier produces a list

2011-09-29 Thread Ben qant
Hello, Why does rm.outlier produce a list for me? I know its something about my data because I can't make a mock up that reproduces the issue. Any ideas? My data goes in as a matrix and comes out as a list: > class(dat) [1] "matrix" > dat = rm.outlier(dat) > class(dat) [1] "list" > Thanks, Ben

Re: [R] How to Store the executed values in a dataframe & rle function

2011-09-29 Thread viritha k
Thanks,It does work for the sample data. When I use it for my actual data it is throwing this error Error in data.frame(Sample = .samp, Chr = .set$Chr[1L], Start = min(.set$Start), : arguments imply differing number of rows: 1, 0 I am not able to understand Why I am getting this? waiting for you

Re: [R] How to Code Random Nested Variables within Two-way Fixed Model in lmer or lme

2011-09-29 Thread Dave Robichaud
Hi again, Thank you very much for taking the time to respond to my question. I am sorry that my explanation was confusing. Please allow me to try to clarify. First, please ignore my attempts to define a lmer model. By putting forward my best first guess, which was clearly wrong, I have onl

[R] efficient coding with foreach and bigmemory

2011-09-29 Thread Jean V Adams
I recently learned about the bigmemory and foreach packages and am trying to use them to help me create a very large matrix. Without those packages, I can create the type of matrix that I want with 10 columns and 5e6 rows. I would like to be able to scale up to 5e9 rows, or more, if possible.

Re: [R] Permutations of configurations on multiple columns

2011-09-29 Thread R. Michael Weylandt
I'm not entirely sure how these two objects are related. Perhaps give a little more information on the transform and we can help with implementation... For now checkout expand.grid() library(gtools) Michael Weylandt On Thu, Sep 29, 2011 at 8:25 AM, Metronome123 wrote: > Hi, > > I have got this

Re: [R] Tcl/Tk Guidelines

2011-09-29 Thread Roebuck,Paul L
On 9/29/11 3:38 AM, "Alexander" wrote: > Hello, I wanted to ask if there are any guidelines for Tcl/Tk programming in > R ? I know that there are no strict rules concerning programing. But perhabs > there are some useful tipps how to organise Tcl/Tk code in your R script. I > want to programm a l

Re: [R] Looking for internal of a function

2011-09-29 Thread Prof Brian Ripley
On Thu, 29 Sep 2011, Bogaso Christofer wrote: Dear all, when I look at the internal of mapply() function, I see a line of code: answer <- .Call("do_mapply", FUN, dots, MoreArgs, environment(), PACKAGE = "base") Can somebody please tell me how to find the source code of 'do_mapply'

[R] Looking for internal of a function

2011-09-29 Thread Bogaso Christofer
Dear all, when I look at the internal of mapply() function, I see a line of code: answer <- .Call("do_mapply", FUN, dots, MoreArgs, environment(), PACKAGE = "base") Can somebody please tell me how to find the source code of 'do_mapply' Thanks, [[alternative HTML vers

Re: [R] julian day form POSIXt object

2011-09-29 Thread Prof Brian Ripley
On Thu, 29 Sep 2011, Jeff Newmiller wrote: On Thu, 29 Sep 2011, maxbre wrote: [With the context excised, something the posting guide expressly asks not be done.] yes, you are perfectly right, sorry for that but for me was not so clear the error message! A phrase involving pots and kettle

[R] simplest pgfSweave example results in error

2011-09-29 Thread syrvn
Hello, since 3 days now I try to get pgfSweave running using Eclipse + StatET. I created a super simple .Rnw file which can be viewed here: http://www.text-upload.com/read.php?id=147992&c=6441045 test.Rnw When I use sweave it works perfectly fine but when I use pgfSweave I get an error. The R

Re: [R] generic argument passing to plot function

2011-09-29 Thread Jean V Adams
statquant2 wrote on 09/28/2011 10:01:30 AM: > > Hello I am trying to write a function that would plot timeseries easily... > I aim at plotting two time-series on 2 different y axis sharing the same > x-axis > > I succeded in doing so: > plotTimeSerie(x,y,y2,[a lot of other args]){ > ... > plot(

Re: [R] julian day form POSIXt object

2011-09-29 Thread Jeff Newmiller
On Thu, 29 Sep 2011, maxbre wrote: yes, you are perfectly right, sorry for that but for me was not so clear the error message! and the third code example I posted (not working either) should be of length one (if I'm not wrong again) but most of all what is not included in my reproducible e

Re: [R] How to Code Random Nested Variables within Two-way Fixed Model in lmer or lme

2011-09-29 Thread Helios de Rosario
Dear Dave, there are some inconsistencies in your explanation of the problem. You said your variables are: > CO is a continuous response variable, > > Week is a fixed categorical factor, > > Habitat is a fixed categorical factor, and > > Location is a random categorical factor nested within Hab

Re: [R] plot.igraph

2011-09-29 Thread Gábor Csárdi
Dear Steven, you have two options, one is to make the multiple edges thicker, see the 'edge.width' argument for that. The other is to make multiple edges curve a bit, see the 'edge.curved' argument. Both of these are documented at ?igraph.plotting. You can use count.multiple() to find the edges t

Re: [R] checking the outliers of the time series data set

2011-09-29 Thread Jean-Christophe BOUËTTÉ
Please refer to this similar thread: https://stat.ethz.ch/pipermail/r-help/2009-February/188445.html JC 2011/9/29 upananda pani : > Dear All, > > Can you please guide me how to check the outliers in the data set in R. It > would be great if you can give some examples of methods. > > With regards,

[R] checking the outliers of the time series data set

2011-09-29 Thread upananda pani
Dear All, Can you please guide me how to check the outliers in the data set in R. It would be great if you can give some examples of methods. With regards, Upananda -- You may delay, but time will not. Research Scholar alternative mail id: up...@iitkgp.ac.in Department of HSS, IIT KGP KGP

Re: [R] julian day form POSIXt object

2011-09-29 Thread maxbre
yes, you are perfectly right, sorry for that but for me was not so clear the error message! and the third code example I posted (not working either) should be of length one (if I'm not wrong again) but most of all what is not included in my reproducible example and get a bit confused my ques

Re: [R] String manipulation with regexpr, got to be a better way

2011-09-29 Thread Jean V Adams
Chris Conner wrote on 09/29/2011 09:23:02 AM: > > Help-Rs, > > I'm doing some string manipulation in a file where I converted a > string date in mm/dd/ format and returned the date . > > I've used regexpr (hat tip to Gabor G for a very nice earlier post > on this function) in steps (

Re: [R] Reading Parts of Excel Files (within a sheet)

2011-09-29 Thread Martin Studer
Hi Peter, the readWorksheet function of the XLConnect package seems to do what you are looking for. It has arguments startRow, startCol, endRow & endCol. Alternatively, you could define a named region in Excel that encompasses the data that you are interested in. Then you can use the readNamedRegi

Re: [R] Multiplying a list of matrices with a vector

2011-09-29 Thread Mendolia, Franco
Thank you! Franco From: David Winsemius [dwinsem...@comcast.net] Sent: Thursday, September 29, 2011 8:09 AM To: R. Michael Weylandt Cc: Mendolia, Franco; r-help@r-project.org Subject: Re: [R] Multiplying a list of matrices with a vector On Sep 28, 2011, a

Re: [R] julian day form POSIXt object

2011-09-29 Thread David Winsemius
On Sep 29, 2011, at 10:10 AM, maxbre wrote: hello all, this is my reproducible example data frame test<-structure(list(date = structure(c(1262300400, 1262304000, 1262304000, 1262307600, 1262307600, 1262311200, 1262311200, 1262314800, 1262314800, 1262318400, 1262318400, 1262322000, 1262322

[R] StarCluster + R

2011-09-29 Thread Alex Bird
Hi there! Does anyone got an experience parallelizing R in conjuction with starcluster infrostructure? I am curious whether there are some ready to use scripts to run a job inside StarCluster. Thanks in advance! Kind regards, Alex __ R-help@r-proj

Re: [R] sqldf syntax, selecting rows, and skipping

2011-09-29 Thread David Winsemius
On Sep 29, 2011, at 10:06 AM, Juliet Hannah wrote: I am using the example in this post: https://stat.ethz.ch/pipermail/r-help/2010-October/257204.html # create a file write.table(iris,"iris.csv",row.names=FALSE,sep=",",quote=FALSE) # this does not work # has the syntax changed or is there

[R] geeglm estimates and standard deviation are too large

2011-09-29 Thread kellyqiqi
Hi, I'm using geeglm function to account for the repeated measure. fit1<- geeglm( binary.outcome ~ age + race + gender + fever.yes.no, data=mydata, id=ID, family=binomial, corstr="exchangeable") summary(fit1)$coef gives too large estimates and standard deviation:

[R] julian day form POSIXt object

2011-09-29 Thread maxbre
hello all, this is my reproducible example data frame test<-structure(list(date = structure(c(1262300400, 1262304000, 1262304000, 1262307600, 1262307600, 1262311200, 1262311200, 1262314800, 1262314800, 1262318400, 1262318400, 1262322000, 1262322000, 1262325600, 1262325600, 1262329200, 12623292

[R] String manipulation with regexpr, got to be a better way

2011-09-29 Thread Chris Conner
Help-Rs,   I'm doing some string manipulation in a file where I converted a string date in mm/dd/ format and returned the date .   I've used regexpr (hat tip to Gabor G for a very nice earlier post on this function) in steps (I've un-nested the code and provided it and an example of what

[R] sqldf syntax, selecting rows, and skipping

2011-09-29 Thread Juliet Hannah
I am using the example in this post: https://stat.ethz.ch/pipermail/r-help/2010-October/257204.html # create a file write.table(iris,"iris.csv",row.names=FALSE,sep=",",quote=FALSE) # this does not work # has the syntax changed or is there a mistake in my usage? # the line from the post above i

Re: [R] create loops in the explanatory variables using lm

2011-09-29 Thread Petr PIKAL
Hi David > > Hey Petr > > thanks for the answer > > I guess I was a bit unclear about the nature of my data > > the species terms are columns in the data frame, and they are coded 0/1, > depending whether the species is present in a plot or not. > > > No I want to repeatedly fit the linea

[R] Permutations of configurations on multiple columns

2011-09-29 Thread Metronome123
Hi, I have got this start situation: structure(list(subject = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L), .Label = c("s1", "s2"), class = "factor"), part = structure(c(1L, 1L, 2L, 3L, 4L, 5L, 1L, 1L, 2L, 6L, 6L), .Label = c("p1", "p2", "p3", "p4", "p5", "p9"), class = "fac

[R] plot.igraph

2011-09-29 Thread Steven Wolf
I am having trouble plotting one of my graphs (think graph theory graph with edges and vertices, not scatterplots or histograms). For some pairs of vertices, I want multiple edges to be visible in my graph. As an example of this, in my script below, I want two edges to be visible from vertex 1 an

Re: [R] Multiplying a list of matrices with a vector

2011-09-29 Thread David Winsemius
On Sep 28, 2011, at 6:26 PM, R. Michael Weylandt wrote: Untested: mapply('*', LL, vec) Those should be backticks but I can't type them on my phone Actually mapply does not require backticks since it is expecting its functions to be quoted anyway, but it didn't seem to work as you (and I

Re: [R] betareg question - keeping the mean fixed?

2011-09-29 Thread betty_d
That is really helpful - and works perfectly! Thank you very much, all responses have been greatly appreciated. -- View this message in context: http://r.789695.n4.nabble.com/betareg-question-keeping-the-mean-fixed-tp3783303p3855134.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] create loops in the explanatory variables using lm

2011-09-29 Thread David Emmerth
Hey Petr thanks for the answer I guess I was a bit unclear about the nature of my data the species terms are columns in the data frame, and they are coded 0/1, depending whether the species is present in a plot or not. No I want to repeatedly fit the linear model with all the species presenc

Re: [R] Tobit Fixed Effects

2011-09-29 Thread Arne Henningsen
Hi Felipe On 25 September 2011 00:16, Felipe Nunes wrote: > Hi Arne, > my problem persists. I am still using censReg [version - 0.5-7] to run a > random effects model in my data (>50,000 cases), but I always get the > message. > tob7 <- censReg(transfers.cap ~ pt.pt + psdb.pt + pt.opp + pt.coa +

[R] Odp: create loops in the explanatory variables using lm

2011-09-29 Thread Petr PIKAL
Hi Well, are those names (Acer_davidii, ...) columns in data frame? If not and you want them as factors of species you shall reformat your input so as you get data frame with columns mortality, richness, species, community. Column species shall have your plant species names in each respective

Re: [R] multiplying list with vector

2011-09-29 Thread Marion Wenty
dimitris, this helps me very much, thank you! marion 2011/9/29 Dimitris Rizopoulos > One option is mapply(), e.g., > > > mylist <- list("v1"=c(1,2,2,1), "v2"=c(2,2,2,1), "v3"=c(1,1,1,1)) > myvector <- c(100, 1, 100) > > mapply("*", mylist, myvector) > mapply("*", mylist, myvector, SIMPLI

Re: [R] multiplying list with vector

2011-09-29 Thread Dimitris Rizopoulos
One option is mapply(), e.g., mylist <- list("v1"=c(1,2,2,1), "v2"=c(2,2,2,1), "v3"=c(1,1,1,1)) myvector <- c(100, 1, 100) mapply("*", mylist, myvector) mapply("*", mylist, myvector, SIMPLIFY = FALSE) I hope it helps. Best, Dimitris On 9/29/2011 11:43 AM, Marion Wenty wrote: hello

[R] multiplying list with vector

2011-09-29 Thread Marion Wenty
hello everybody, i have got a question about lists: i have got the following commands: mylist <- list("v1"=c(1,2,2,1),"v2"=c(2,2,2,1),"v3"=c(1,1,1,1)) myvector <- c(100,1,100) now i would like to multiply each element of the list with the corresponding element of the vector, that is to

Re: [R] GAMs in R : How to put the new data into the model?

2011-09-29 Thread Gavin Simpson
On Wed, 2011-09-28 at 02:10 -0700, pigpigmeow wrote: > For example: > GAMs and after stepwise regression: You probably don't want to be doing stepwise model/feature selection in any regression model. Marra & Wood (2011, Computational Statistics and Data Analysis 55; 2372-2387) show results that s

Re: [R] regression with ordered arguments

2011-09-29 Thread Petr PIKAL
Hi > > That's cool! > > it works :-))) > > for me (as a stata user) these are quite basic things and I didn't find > them anywhere for what concerns R. I can't figure out why. > Really, thank you so much, Your wellcome BTW after reading R intro which shall be in doc directory of your install

[R] Tcl/Tk Guidelines

2011-09-29 Thread Alexander
Hello, I wanted to ask if there are any guidelines for Tcl/Tk programming in R ? I know that there are no strict rules concerning programing. But perhabs there are some useful tipps how to organise Tcl/Tk code in your R script. I want to programm a little GUI and I don't want to reprogram the whole

Re: [R] GAMs in R : How to put the new data into the model?

2011-09-29 Thread Simon Wood
See ?predict.gam You create a data frame (e.g. `dat2011') containing the 2011 values for RH, solar, windspeed and transport, then predict(cod,dat2011,type="response") there are various options for type -- see ?predict.gam On 09/28/2011 10:10 AM, pigpigmeow wrote: For example: GAMs and aft

[R] create loops in the explanatory variables using lm

2011-09-29 Thread David Emmerth
Hi everyone I am new to the list and read all the instructions, hope i get it right. I have the following linear model: model_sqrt<-lm(sqrt(mortality)~richness +Acer_davidii+Ailanthus_altissima+Alniphyllum_fortunei +Betula_luminifera+Castanea_henryi+Castanopsis_car

[R] F and Wald chi-square tests in mixed-effects models

2011-09-29 Thread Helios de Rosario
I have a doubt about the calculation of tests for fixed effects in mixed-effects models. I have read that, except in well-balanced designs, the F statistic that is usually calculated for ANOVA tables may be far from being distributed as an exact F distribution, and that's the reason why the anova

[R] [R-pkgs] package JM -- version 0.9-0

2011-09-29 Thread Dimitris Rizopoulos
Dear R-users, I'd like to announce the release of the new version of package JM (soon available from CRAN) for the joint modeling of longitudinal and time-to-event data using shared parameter models. These models are applicable in mainly two settings. First, when focus is in the survival outc