[R] Predictions and prediction intervals for model.averaging dRedging::model.avg

2009-10-22 Thread Michelle Ensbey
Hi R all Does anyone know how to get predictions and/or put prediction intervals on model averaged results from dRedging::model.avg for a poisson GLM. Predict doesn't work in this case like it does dirently on a glm? > glm_aab_null<- glm(aabundance~1, family=poisson, data=tenuredata) . > glm

[R] Automatization of non-linear regression

2009-10-22 Thread Joel Fürstenberg-Hägg
Hi everybody, I'm using the method described here to make a linear regression: http://www.apsnet.org/education/advancedplantpath/topics/Rmodules/Doc1/05_Nonlinear_regression.html > ## Input the data that include the variables time, plant ID, and severity > time <- c(seq(0,10),seq(0,10)

Re: [R] re ferring to data of previous rows

2009-10-22 Thread Gabor Grothendieck
Next time if dd is your data frame display dput(dd) so we know exactly what you have. >From your output I guessed it was numeric but the behavior of the 0/1 column that you describe is consistent with it being a factor rather than numeric. Try dd$of <- as.numeric(levels(dd$of)[dd$of]) or equiva

[R] "interactions" feature in RF?

2009-10-22 Thread Chrysanthi A.
Hi all, Is there a possibility of getting the "interactions" feature values for the variables of a dataset by applying the Random Forest algorithm? Thanks, Chrysanthi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list h

Re: [R] Converting a Vector into a 2-level Factor

2009-10-22 Thread Henrique Dallazuanna
Try this; factor(vowels == "aa", labels = c("aa", "~aa")) On Thu, Oct 22, 2009 at 4:36 AM, wrote: > Hello Everyone, > > Let's say I have a vector as follows: > > vowels = c("aa", "aa", "ah", "ao", "eh) > > I want to make a factor consisting of two levels: the things that are "aa" > and those th

Re: [R] "interactions" feature in RF?

2009-10-22 Thread Liaw, Andy
That has not yet been implemented in the R version of the package. Best, Andy > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Chrysanthi A. > Sent: Thursday, October 22, 2009 6:40 AM > To: r-help@r-project.org > Subject: [R]

Re: [R] How to create a legend that automatically reads the values from two vectors?

2009-10-22 Thread jcano
Hi JIm Not exactly what I want, as I can't draw the lines corresponding to the different curves in the plot as I can do in legend, but may be still of help. Thkx, Javier Jim Lemon-2 wrote: > > On 10/21/2009 01:30 AM, jcano wrote: >> betav<-c(0.78,0.94,0.88,0.41,0.59,4.68) >> etav<-c(235.6,59

[R] How to perform an ols estimation with lm ignoring NA values

2009-10-22 Thread Francesca Pancotto
Dear R community, probably my question is obvious but I did not find any solution yet by browsind the mailing list results. I need to perform a simple ols regression in a dataset with cross section data, where no temporal dimension is inserted. In this data set there are missing values. I would li

[R] twoord.plot y lab size

2009-10-22 Thread Jacob Kasper
I am using twoord.plot and my Y axis units on the left y overlap. I tried using cex.axis in my par command but that only adjusted the x units, not the y. cex.axis in twoord.plot did not help. How do I adjust Y units in the twoord.plot? example: twoord.plot (lx=myear, ly=z, rx=myear, ry=sta,xlim=c(1

[R] Code improvement

2009-10-22 Thread Sebastien Bihorel
Dear R-Users, I would like to have the opinion of the list on the following matter. I have this generic function that creates multiple lattice scatterplots per page based upon different subsets of the same dataset. The use of different line/point colors/symbols in each plot is based upon a '

Re: [R] Building an R package on MAC

2009-10-22 Thread Bryan Hanson
Gina, at the terminal, make sure you are in directory Users/apple/Docments/R When you type >R CMD build TEST Sounds like you might be in the TEST directory, not the R directory. The build system looks for a subdirectory with your package name when it starts. Bryan * Bryan Hanson Ac

Re: [R] Temperature Prediction Model

2009-10-22 Thread Thomas Adams
Aneeta, You will have to have a seasonal component built into your model, because the seasonal variation does matter, particularly -where- you are geographically (San Diego, Chicago, Denver, Miami are very different). Generally, there is a sinusoidal daily temperature variation, but frontal p

Re: [R] Use of the command 'replicate'

2009-10-22 Thread Peter Ehlers
See if this gives you a hint: size <- 50 num <- 100 sum(size[1:(num/2)]) -Peter Ehlers Manny Gomez wrote: Dear R users, I'd like to ask u whether you know how to sort out the following: I'm trying to reproduce a dataset of clusters, and for that I need to build up a cluster index (insid

Re: [R] How to perform an ols estimation with lm ignoring NA values

2009-10-22 Thread David Winsemius
On Oct 22, 2009, at 6:56 AM, Francesca Pancotto wrote: Dear R community, probably my question is obvious but I did not find any solution yet by browsind the mailing list results. I need to perform a simple ols regression in a dataset with cross section data, where no temporal dimension is in

Re: [R] Code improvement

2009-10-22 Thread baptiste auguie
Hi, I don't know if it helps, but looking at the output of xyplot you can extract the legend (a grid.frame) as follows, library(grid) library(lattice) p = xyplot(x~y, group=x,data=data.frame(x=1:10,y=1:10), auto.key=list(space="right")) legend = with(p$legend$right, do.call(lattice:::drawSimpleK

Re: [R] melting columns

2009-10-22 Thread Peter Ehlers
You're too vague about what you want. Do you want to convert time freq 1 10 2 20 3 30 to tf "1 10" "2 20" "3 30" (use paste()) or to x 1 2 3 10 20 30 (use c()) or ?? -Peter Ehlers Thibault Grava wrote: Hello, I'm using R to run a acoustic analysis s

[R] Diffusion of particles inside a sphere

2009-10-22 Thread carferper
Hello veryone, I am interested in the diffusion of particles inside a sphere, and its release through a small pore on the sphere surface. Unfortunately, I have not found the way to do this in R. Could you help me? Thank very much in advance for your help ___

[R] how to create a new data type

2009-10-22 Thread Markus Weisner
I am working on a new package to do fire department analysis. I am working with emergency dispatch data from different agencies that all contain the same information but have slightly different formats. Typically the variable names and date-time formats are different. I am getting pretty good at

[R] Help regarding removing Inf from dataframe, creating new dataframe with selected variables, count function

2009-10-22 Thread makhija . sangeeta
Following is my query: 1. Removing Inf from one column of dataframe. 2. out of 10 available dates, count how many times a security is present. (repeat for each security) 3. Out of dates, the security is present, I want to read latest status of market cap. 4. Change in market cap represent by 0/1

[R] Normality test

2009-10-22 Thread rkevinburton
I am having a hard time interpreting the results of the 'shapiro.test' for normality. If I do ?shapiro.test I see two examples using rnorm and runif. When I run the test using rnorm I get a wide variation of results. Most of this may be from variability of rnorm, samll sample size (limited to 50

[R] S4 object??

2009-10-22 Thread Wendy Chen
Hi all,   I have loaded the LIMMA and Biobase package and tried these commands:   library(limma) library("Biobase") data <- read.table("c:/temp/data.txt",header=T,row.names=1) ExpressionData <- as.matrix(data[,c(2,3,4,6,7,8)]) eset <- new("ExpressionSet", exprs = ExpressionData) design <- cbind(WT=

Re: [R] Putting names on a ggplot

2009-10-22 Thread John Kane
--- On Tue, 10/20/09, hadley wickham wrote: > From: hadley wickham > Subject: Re: [R] Putting names on a ggplot > To: "John Kane" > Cc: m...@z107.de, "R R-help" > Received: Tuesday, October 20, 2009, 10:59 AM > On Sun, Oct 18, 2009 at 10:29 AM, > John Kane > wrote: > > Thanks Stefan, the an

Re: [R] Normality test

2009-10-22 Thread Duncan Murdoch
On 10/22/2009 9:48 AM, rkevinbur...@charter.net wrote: I am having a hard time interpreting the results of the 'shapiro.test' for normality. If I do ?shapiro.test I see two examples using rnorm and runif. When I run the test using rnorm I get a wide variation of results. Most of this may be fr

[R] sunflowerplot - digits parameter separate for x and y values?

2009-10-22 Thread Rainer M Krug
Hi I have a sunflowerplot, in which the x and y axis cover different ranges (different orders of magnitude). Is it possible to specify different "digits" for the x and y axis? Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Cen

[R] Replacing multiple elements in a vector !

2009-10-22 Thread Praveen Surendran
Hi, I have a vector with elements rs.id=c('rs100','rs101','rs102','rs103') And a dataframe 'snp.id' 1 SNP_100 rs100 2 SNP_101 rs101 3 SNP_102 rs102 4 SNP_103 rs103 Task is

[R] How to calculate the area under the curve

2009-10-22 Thread olivier.abz
Hi all, I would like to calculate the area under the ROC curve for my predictive model. I have managed to plot points giving me the ROC curve. However, I do not know how to get the value of the area under. Does anybody know of a function that would give the result I want using an array of speci

Re: [R] Diffusion of particles inside a sphere

2009-10-22 Thread Ravi Varadhan
Hi, You need to be a lot more specific about what you want. Are you trying to solve a partial differential equation (PDE) in time and space, in spherical coordinates? Do you have a closed form solution that provides the values of the dependent variable (e.g. concentration or temperature) as a

Re: [R] how to create a new data type

2009-10-22 Thread cls59
Markus Weisner-2 wrote: > > I am working on a new package to do fire department analysis. I am > working > with emergency dispatch data from different agencies that all contain the > same information but have slightly different formats. Typically the > variable names and date-time formats are

Re: [R] glm.fit to use LAPACK instead of LINPACK

2009-10-22 Thread Ted
Hi, I understand that the glm.fit calls LINPACK fortran routines instead of LAPACK because it can handle the 'rank deficiency problem'. If my data matrix is not rank deficient, would a glm.fit function which runs on LAPACK be faster? Would this be worthwhile to convert glm.fit to use LAPACK? H

Re: [R] How to calculate the area under the curve

2009-10-22 Thread Frank E Harrell Jr
olivier.abz wrote: Hi all, I would like to calculate the area under the ROC curve for my predictive model. I have managed to plot points giving me the ROC curve. However, I do not know how to get the value of the area under. Does anybody know of a function that would give the result I want usi

Re: [R] How to calculate the area under the curve

2009-10-22 Thread Sebastien Bihorel
Well, you can use the trapezoidal rule to numerically calculate any area under the curve. I don't know if a specific exists but you could create one. The principle is basically to compute the area between two successive points of your profile with: AREA=0.5*(Response1 + Response2)/(Time2-Time1)

Re: [R] How to calculate the area under the curve

2009-10-22 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of olivier.abz > Sent: Thursday, October 22, 2009 7:23 AM > To: r-help@r-project.org > Subject: [R] How to calculate the area under the curve > > > Hi all, > > I would like to c

Re: [R] How to calculate the area under the curve

2009-10-22 Thread Ravi Varadhan
I assume that you have an ordered pair (x, y) data, where x = sensitivity, and y = 1 - specificity. Your `x' values may or may not be equally spaced. Here is how you could solve your problem. I show this with an example where we can compute the area-under the curve exactly: # Area under the

Re: [R] How to calculate the area under the curve

2009-10-22 Thread Tom Fletcher
See package ROCR. Then see ?performance; in the details, it describes a measure of auc. Tom Fletcher -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of olivier.abz Sent: Thursday, October 22, 2009 9:23 AM To: r-help@r-project.org Sub

Re: [R] glm.fit to use LAPACK instead of LINPACK

2009-10-22 Thread Ravi Varadhan
Ted, LAPACK is newer and is supposed to contain better algorithms than LINPACK. It is not true that LAPACK cannot handle rank-deficient problems. It can. However, I do not know if using LAPACK in glm.fit instead of LINPACK would be faster and/or more memory efficient. Ravi.

Re: [R] Replacing multiple elements in a vector !

2009-10-22 Thread Steve Lianoglou
Hi, On Oct 22, 2009, at 10:12 AM, Praveen Surendran wrote: Hi, I have a vector with elements rs.id=c('rs100','rs101','rs102','rs103') And a dataframe 'snp.id' 1 SNP_100 rs100 2 SNP_101 rs101 3 SNP_102 rs102 4

Re: [R] Replacing multiple elements in a vector !

2009-10-22 Thread Henrique Dallazuanna
Try this: merge(rs.id, snp.id, by.x = 1, by.y = 2)$V2 or: with(snp.id, V2[match(rs.id, V3)]) On Thu, Oct 22, 2009 at 12:12 PM, Praveen Surendran wrote: > Hi, > > > > I have a vector with elements > > > > rs.id=c('rs100','rs101','rs102','rs103') > > > > And a dataframe 'snp.id' > > > > 1      

[R] Boxplot with grouped data

2009-10-22 Thread Paul Smith
Dear All, Is there some way of drawing a boxplot, with R, when one does not have the original continuous data, but only the data grouped in classes? The function boxplot() can only deal with original data. Thanks in advance, Paul __ R-help@r-project.o

Re: [R] Boxplot with grouped data

2009-10-22 Thread Peter Flom
Paul Smith wrote > >Is there some way of drawing a boxplot, with R, when one does not have >the original continuous data, but only the data grouped in classes? >The function boxplot() can only deal with original data. It's not clear how the data are, now. What are the classes? Are they numbers?

[R] What happen for Negative binomial link in Lmer fonction?

2009-10-22 Thread ROBARDET Emmanuelle
Dear R users, I'm performing some GLMMs analysis with a negative binomial link. I already performed such analysis some months ago with the lmer() function but when I tried it today I encountered this problem: Erreur dans famType(glmFit$family) : unknown GLM family: 'Negative Binomial' Does anyone

[R] help regarding creating package for GUI

2009-10-22 Thread SANKET JANEWOO
Hello Brothers/Sister, I am trying to create a GUI for some formulas in R using tcltk and then convert them into R package . Can anyone please tell me how to create a package having GUI capabilities in it. I would be thankful if somebody can help me.May god bless every one

Re: [R] Boxplot with grouped data

2009-10-22 Thread Jakson A. Aquino
On Thu, Oct 22, 2009 at 04:36:22PM +0100, Paul Smith wrote: > Is there some way of drawing a boxplot, with R, when one does not have > the original continuous data, but only the data grouped in classes? > The function boxplot() can only deal with original data. Do you mean a numeric vector grouped

Re: [R] Boxplot with grouped data

2009-10-22 Thread Paul Smith
On Thu, Oct 22, 2009 at 5:31 PM, Jakson A. Aquino wrote: >> Is there some way of drawing a boxplot, with R, when one does not have >> the original continuous data, but only the data grouped in classes? >> The function boxplot() can only deal with original data. > > Do you mean a numeric vector gro

[R] Simple question, I think

2009-10-22 Thread David Kaplan
Greetings, I am recoding a dummy variable (coded 1,0) so that 0 = 2. I am using the line sciach$dummyba[sciach$ba==0] <- 2 I notice that it creates a new column dummyba, with 0 coded as 2 but with 1's now coded as NA. Is there a simple way around this in the line I am using, or do I need

Re: [R] Simple question, I think

2009-10-22 Thread Henrique Dallazuanna
Use ifelse: sciach$dummyba <- ifelse(sciach$ba == 0, 2, 1) On Thu, Oct 22, 2009 at 2:37 PM, David Kaplan wrote: > Greetings, > > I am recoding a dummy variable (coded 1,0) so that 0 = 2.  I am using the > line > > sciach$dummyba[sciach$ba==0] <- 2 > > I notice that it creates a new column dummyb

[R] arma crashing

2009-10-22 Thread Alberto Monteiro
Function arma is crashing in some (pathological, but crashing is never good) cases. For example: library(tseries) arma(c(2.01, 2.22, 2.09, 2.17, 2.42), order=c(1,0)) I came to that pathological series while doing test cases; probably there are crashing cases with longer series. Alberto Montei

Re: [R] Simple question, I think

2009-10-22 Thread Kevin E. Thorpe
David Kaplan wrote: Greetings, I am recoding a dummy variable (coded 1,0) so that 0 = 2. I am using the line sciach$dummyba[sciach$ba==0] <- 2 I notice that it creates a new column dummyba, with 0 coded as 2 but with 1's now coded as NA. Is there a simple way around this in the line I am

Re: [R] Simple question, I think

2009-10-22 Thread Chuck Cleland
On 10/22/2009 12:37 PM, David Kaplan wrote: > Greetings, > > I am recoding a dummy variable (coded 1,0) so that 0 = 2. I am using > the line > > sciach$dummyba[sciach$ba==0] <- 2 > > I notice that it creates a new column dummyba, with 0 coded as 2 but > with 1's now coded as NA. Is there a sim

Re: [R] How to calculate the area under the curve

2009-10-22 Thread Frank E Harrell Jr
I'm not clear on why we are emphasizing the trapezoidal rule when the Wilcoxon approach gives you everything plus a standard error. Frank Ravi Varadhan wrote: I assume that you have an ordered pair (x, y) data, where x = sensitivity, and y = 1 - specificity. Your `x' values may or may not b

[R] arima crashes too

2009-10-22 Thread Alberto Monteiro
Another pathological test. arima does not crash for that series that crashes arma: arima(c(2.01, 2.22, 2.09, 2.17, 2.42), order=c(1,0,0)) However, arima crashes for this: arima(c(1.71, 1.78, 1.95, 1.59, 2.13), order=c(1,0,0)) arima seems pretty consistent in its crashing behaviour, since crash

Re: [R] help regarding creating package for GUI

2009-10-22 Thread Peter Ehlers
Well, I wonder which 'Sister' you're thinking of. I can think of more than a few ... Sarah? Ulrike? Heather? ... And I'm not so sure God would bless an old sinner like me. But as to your query: perhaps you could get some ideas from the Greg Snow's TeachingDemos package. -Peter Ehlers SANKET J

[R] Cairo package, png files within for loop are black?

2009-10-22 Thread Douglas M. Hultstrand
Hello, I am generating .png images using the Cairo package in a for loop (looping on the number of zones, number of zones equals the number of plots to create based on different zone data). When I run the R script the .png files are created but they are all black? If I comment out the for

[R] Bayesian regression stepwise function?

2009-10-22 Thread Allan.Y
Hi everyone, I am wondering if there exists a stepwise regression function for the Bayesian regression model. I tried googling, but I couldn't find anything. I know "step" function exists for regular stepwise regression, but nothing for Bayes. Thanks -- View this message in context: http://

[R] How to find moving averages within each subgroup of a data frame

2009-10-22 Thread clair.crossup...@googlemail.com
Dear all, If I have the following data frame: > set.seed(21) > df1 <- data.frame(col1=c(rep('a',5), rep('b',5), rep('c',5)), > col4=rnorm(1:15)) col1 col4 1 a 0.793013171 2 a 0.522251264 3 a 1.74641 4 a -1.271336123 5 a 2.197389533 6 b 0.433130777 7

Re: [R] loop vs. apply(): strange behavior with data frame?

2009-10-22 Thread Roberto Perdisci
Thanks for the suggestion. I found some documentation on why accessing a data.gram using the matrix notation (e.g., [i,j]) is so expensive, which was the cause of the problem. regards, Roberto On Thu, Oct 22, 2009 at 12:05 AM, Jim Holtman wrote: > try running Rprof on the two examples to see

Re: [R] Cairo package, png files within for loop are black?

2009-10-22 Thread Douglas Bates
On Thu, Oct 22, 2009 at 12:46 PM, Douglas M. Hultstrand wrote: > Hello, > > I am generating .png images using the Cairo package in a for loop (looping > on the number of zones, number of zones equals the number of plots to create > based on different zone data).   When  I run the R script the .png

[R] contour() & contourLines()

2009-10-22 Thread Ted Harding
Hi Folks, I have been using contour() to produce some contour plots (of a spatially-smooted density produced by kde2d()), with very satisfactory results. I now want access to the coordinates of the points on the contours, and it would seem that contour() does not return a value, so there is nothin

Re: [R] arima crashes too

2009-10-22 Thread Barry Rowlingson
On Thu, Oct 22, 2009 at 6:19 PM, Alberto Monteiro wrote: > Another pathological test. > > arima does not crash for that series that crashes arma: > > arima(c(2.01, 2.22, 2.09, 2.17, 2.42), order=c(1,0,0)) > > However, arima crashes for this: > > arima(c(1.71, 1.78, 1.95, 1.59, 2.13), order=c(1,0,0

Re: [R] Bayesian regression stepwise function?

2009-10-22 Thread Ben Bolker
Allan.Y wrote: > > Hi everyone, > > I am wondering if there exists a stepwise regression function for the > Bayesian regression model. I tried googling, but I couldn't find > anything. I know "step" function exists for regular stepwise regression, > but nothing for Bayes. > Why? That seem

Re: [R] What happen for Negative binomial link in Lmer fonction?

2009-10-22 Thread Ben Bolker
ROBARDET Emmanuelle wrote: > > Dear R users, > I'm performing some GLMMs analysis with a negative binomial link. > I already performed such analysis some months ago with the lmer() function > but when I tried it today I encountered this problem: > Erreur dans famType(glmFit$family) : unknown GL

Re: [R] help regarding creating package for GUI

2009-10-22 Thread Liviu Andronic
On 10/22/09, Peter Ehlers wrote: > But as to your query: perhaps you could get some ideas from > the Greg Snow's TeachingDemos package. > Also, check the related Rcmdr plug-in [1]. Liviu [1] http://cran.r-project.org/web/packages/RcmdrPlugin.TeachingDemos/index.html ___

Re: [R] contour() & contourLines()

2009-10-22 Thread Peter Ehlers
Hi Ted, Here's what the last example in ?contour says: "## contourLines produces the same contour lines as contour" So, even without digging into the source, I would guess that your hunch is correct. Cheers, Peter Ehlers (Ted Harding) wrote: Hi Folks, I have been using contour() to produce

[R] Simple extraction of level,x,y from contourLines()

2009-10-22 Thread Ted Harding
A follow-up to my previous query. Say one of the results returned by contourLines() is C.W <- contourLines() Then C.W is a list of (in this case 28) lists, each of which is a list with components $level (a single number), $x (the x coords of the points on a contour at that level) and $y (t

Re: [R] contour() & contourLines()

2009-10-22 Thread Ted Harding
Hi Peter! Many thanks -- I had overlooked that line. Ted. On 22-Oct-09 18:53:25, Peter Ehlers wrote: > Hi Ted, > > Here's what the last example in ?contour says: > > "## contourLines produces the same contour lines as contour" > > So, even without digging into the source, I would guess > that

Re: [R] Simple extraction of level,x,y from contourLines()

2009-10-22 Thread Duncan Murdoch
On 22/10/2009 2:57 PM, (Ted Harding) wrote: A follow-up to my previous query. Say one of the results returned by contourLines() is C.W <- contourLines() Then C.W is a list of (in this case 28) lists, each of which is a list with components $level (a single number), $x (the x coords of th

[R] PDF too large, PNG bad quality

2009-10-22 Thread Lasse Kliemann
I wish to save a scatter plot comprising approx. 2 million points in order to include it in a LaTeX document. Using 'pdf(...)' produces a file of size about 20 MB, which is useless. Using 'cairo_pdf(...)' produces a smaller file, around 3 MB. This is still too large. Not only that the document

Re: [R] Bayesian regression stepwise function?

2009-10-22 Thread Frank E Harrell Jr
Ben Bolker wrote: Allan.Y wrote: Hi everyone, I am wondering if there exists a stepwise regression function for the Bayesian regression model. I tried googling, but I couldn't find anything. I know "step" function exists for regular stepwise regression, but nothing for Bayes. Why? That

Re: [R] Simple extraction of level,x,y from contourLines()

2009-10-22 Thread Ted Harding
On 22-Oct-09 19:03:06, Duncan Murdoch wrote: > On 22/10/2009 2:57 PM, (Ted Harding) wrote: >> A follow-up to my previous query. >> >> Say one of the results returned by contourLines() is >> >> C.W <- contourLines() >> >> Then C.W is a list of (in this case 28) lists, >> each of which is a

Re: [R] What happen for Negative binomial link in Lmer fonction?

2009-10-22 Thread Douglas Bates
On Thu, Oct 22, 2009 at 1:39 PM, Ben Bolker wrote: > ROBARDET Emmanuelle wrote: >> >> Dear R users, >> I'm performing some GLMMs analysis with a negative binomial link. >> I already performed such analysis some months ago with the lmer() function >> but when I tried it today I encountered this pr

Re: [R] Diffusion of particles inside a sphere

2009-10-22 Thread cls59
carferper wrote: > > Hello veryone, > > I am interested in the diffusion of particles inside a sphere, and its > release through a small pore on the sphere surface. Unfortunately, I have > not found the way to do this in R. Could you help me? > > Thank very much in advance for your help > >

Re: [R] PDF too large, PNG bad quality

2009-10-22 Thread Benilton Carvalho
Dear Lasse, This won't answer your specific questions and I apologize for that. AFAIK, pdf() produces uncompressed PDFs only. But you could use tools like pdftk to compress your PDFs. About the PNGs, you can always set the 'res' argument to improve resolution, but it won't beat the PDFs.

Re: [R] Bayesian regression stepwise function?

2009-10-22 Thread Peter Flom
Frank E Harrell Jr wrote >Ben Bolker wrote: >> >> >> Allan.Y wrote: >>> Hi everyone, >>> >>> I am wondering if there exists a stepwise regression function for the >>> Bayesian regression model. I tried googling, but I couldn't find >>> anything. I know "step" function exists for regular stepwi

Re: [R] Simple extraction of level,x,y from contourLines()

2009-10-22 Thread Alberto Monteiro
Ted Harding asked: > > I can of course get these individually with, for the 5th one for > instance, > > C.W[[5]]$level > C.W[[5]]$x > C.W[[5]]$y > > But I can't see how to obtain, in one line and without running > a nasty loop, to get all the levels at once! > > In other words, I'm looking

[R] Intersection an Sum between list and matrix

2009-10-22 Thread Romildo Martins
Hello, I need to do an intersection between the list elements (partitionslist) and the columns and rows of a matrix (mm), so that the result will be the sums of the rows and columns. Thanks a lot, Romildo Martins Example 1.The Intersection and sum betweeen partitionslist[[1]][[2]] and mm is i

Re: [R] PDF too large, PNG bad quality

2009-10-22 Thread Greg Snow
The problem with the pdf files is that they are storing the information for every one of your points, even the ones that are overplotted by other points. The png file is smaller because it only stores information on which color each pixel should be, not how many points contributed to a particul

Re: [R] Intersection an Sum between list and matrix

2009-10-22 Thread Romildo Martins
Sorry... example 2 was error! 2009/10/22 Romildo Martins > Hello, > > I need to do an intersection between the list elements (partitionslist) and > the columns and rows of a matrix (mm), so that the result will be the sums > of the rows and columns. > > > Thanks a lot, > > Romildo Martins > > Ex

Re: [R] Automatization of non-linear regression

2009-10-22 Thread Peter Ehlers
Joel, The following should answer most of your questions: time <- c(seq(0,10),seq(0,10),seq(0,10)) plant <- c(rep(1,11),rep(2,11),rep(3,11)) severity <- c( 42,51,59,64,76,93,106,125,149,171,199, 40,49,58,72,84,103,122,138,162,187,209, 41,49,57,71,89,112,146,174,218,

[R] data frame is killing me! help

2009-10-22 Thread bbslover
Usage data(gasoline) Format A data frame with 60 observations on the following 2 variables. octane a numeric vector. The octane number. NIR a matrix with 401 columns. The NIR spectrum and I see the gasoline data to see below NIR.1686 nm NIR.1688 nm NIR.1690 nm NIR.1692 nm NIR.1694 nm NIR.1

Re: [R] Bayesian regression stepwise function?

2009-10-22 Thread Rolf Turner
On 23/10/2009, at 8:20 AM, Peter Flom wrote: Frank E Harrell Jr wrote Ben Bolker wrote: Allan.Y wrote: Hi everyone, I am wondering if there exists a stepwise regression function for the Bayesian regression model. I tried googling, but I couldn't find anything. I know "step" function

Re: [R] data frame is killing me! help

2009-10-22 Thread Steve Lianoglou
Hi, On Oct 22, 2009, at 2:35 PM, bbslover wrote: Usage data(gasoline) Format A data frame with 60 observations on the following 2 variables. octane a numeric vector. The octane number. NIR a matrix with 401 columns. The NIR spectrum and I see the gasoline data to see below NIR.1686 nm NIR.1688

[R] intervals package dependence on R 2.9.0

2009-10-22 Thread Ross Boylan
I notice that the intervals package indicates a dependence on R >= 2.9.0. Is there some feature of R 2.9 that intervals depends on, or might it work with R 2.7.1, which I am running? Thanks. Ross Boylan __ R-help@r-project.org mailing list https://stat

[R] tapply with multiple arguments that are not part of the same data frame

2009-10-22 Thread Kavitha Venkatesan
Hi all, I would like to invoke a function that takes multiple arguments (some of which are specified columns in the data frame, and others that are independent of the data frame) on split parts of a data frame, how do I do this? For example, let's say I have a data frame >fitness_data name heigh

Re: [R] Temperature Prediction Model

2009-10-22 Thread Clint Bowman
Aneeta, If I understand the figure at this problem deals with sensors in a lab that is probably isolated from outdoor temperature changes. I assume the predictive model must detect when a "rampaging 800 pound gorilla" messes with a sensor. Do w

[R] URGENT helo re-beggining with R

2009-10-22 Thread Jose Narillos de Santos
Hi all, I have re-begging to use R. I need to using a matrix Y and X with the first row been the name to get a ols regression and to plot a two elements graph...on the top the scattergraph and the line representing the regressiónbelow the resids...at the same time I want to plot with small li

Re: [R] PDF too large, PNG bad quality

2009-10-22 Thread Barry Rowlingson
On Thu, Oct 22, 2009 at 8:28 PM, Greg Snow wrote: > The problem with the pdf files is that they are storing the information for > every one of your points, even the ones that are overplotted by other points. >  The png file is smaller because it only stores information on which color > each pix

Re: [R] tapply with multiple arguments that are not part of the same data frame

2009-10-22 Thread Kavitha Venkatesan
I just realized my earlier post of my question below was not in "Plain" Text mode, hence the repeat post...apologies! Kavitha On Thu, Oct 22, 2009 at 4:19 PM, Kavitha Venkatesan wrote: > Hi all, > > I would like to invoke a function that takes multiple arguments (some of > which are specified co

Re: [R] PDF too large, PNG bad quality

2009-10-22 Thread Greg Snow
For getting the details in the outer points, here is what I do. 1. use hexbin to create the big central blob (but with additional info). 2. use the chull function to find the outer points and save their indices in another vector 3. use chull on the rest of the points (excluding those found prev

[R] help sub setting data frame

2009-10-22 Thread Sean MacEachern
Hi, I'm running into a problem subsetting a data frame that I have never encountered before: > dim(chkPd) [1] 32136 > df = head(chkPd) > df PNWB Sire Dam MG SEX 601 1001 715349 61710 61702 67F 969 1001_1 511092 616253 615037 168F 986 1

Re: [R] Automatization of non-linear regression

2009-10-22 Thread Douglas Bates
Alternatively you could install the NRAIA package and collapse the construction of the plot to a call to plotfit as shown in the enclosed. Note that this is a poor fit of a logistic growth model. There are no data values beyond the inflection point so the Asym parameter (the asymptote) is poorly

Re: [R] help sub setting data frame

2009-10-22 Thread Ista Zahn
Hi Sean, Comment in line below. On Thu, Oct 22, 2009 at 5:39 PM, Sean MacEachern wrote: > Hi, > > I'm running into a problem subsetting a data frame that I have never > encountered before: > >> dim(chkPd) > [1] 3213    6 > >> df = head(chkPd) >> df >               PN        WB      Sire     Dam  

Re: [R] help sub setting data frame

2009-10-22 Thread Sean MacEachern
Hi Ista, I think I'm suffering long dayitis myself. You are probably right. I don't use subset that often. I typically use brackets to subset dataframes. Essentially what I am trying to do is take my original dataframe (chkPd) and subset it using a smaller dataframe with some matching PN IDs. They

Re: [R] help sub setting data frame

2009-10-22 Thread Ista Zahn
Is this what you want? df = data.frame('id'=c(1:100),'res'=c(1001:1100)) dfb=df[1:10,] dfc = df[df$id %in% dfb$id,] Still not sure, but that's my best guess. Going back to your original data you can try dfb = chkPd[chkPd$PN %in% df$PN,] Hope it helps, Ista On Thu, Oct 22, 2009 at 6:10 PM, Sea

[R] dgTMatrix --- [, , drop=F] strange behavior, Matrix 0.999375-20

2009-10-22 Thread Jose Quesada
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I have something strange here... I want to subset a large sparse matrix, with the subset being still in sparse form. Easily achievable with mm[i,,drop=F] , right? Well, it doesn't work on the matrix I'm working on. This is a very large wikipedia

Re: [R] help sub setting data frame

2009-10-22 Thread Sean MacEachern
Works perfectly! Thanks to all who responded. Sean On Thu, Oct 22, 2009 at 6:24 PM, Ista Zahn wrote: > Is this what you want? > > df = data.frame('id'=c(1:100),'res'=c(1001:1100)) > dfb=df[1:10,] > dfc = df[df$id %in% dfb$id,] > > Still not sure, but that's my best guess. Going back to your ori

[R] removing random effect from nlme or using varPower() in nls

2009-10-22 Thread Michael A. Gilchrist
Hello, I've been fitting a random effects model using nlme to some data, but I am discovering that the variation in my random effect is very small. As a result, I would like to replace it as a fixed effect (i.e. essentially fit the same model but with no random effect). As I understand it I

[R] Linear Regression Model with GARCH errors

2009-10-22 Thread Ioana D
Hello I was wondering if there is any possibility of estimating a linear regression model with GARCH errors in R? I tried using fGarch library, but I could only find for instance how to estimate arma-garch models or similar combinations. Thank you, Ioana -- View this message in context: http:

[R] Recode issue

2009-10-22 Thread Nikhil Kaza
I am having trouble with the recode function that is provided in the CAR package. I trying to create a new factors based on existing factors. E.g. >x <- as.factor(1:20) >y <- recode(x, " 1:5='A'; 6:10='B'; 11:15='C'; 16:20='D' ") >y [1] A A A A A 6 7 8 9 A A A A A A A A A A A Levels: 6 7 8 9

Re: [R] Recode issue

2009-10-22 Thread Ista Zahn
Hi Nikhil, The problem is that your initial "as.factor(0)" causes x to have values of "1" : "20" instead of 1 : 20. There are two possible solutions: 1) > library(car) > x <- 1:20 > y <- as.factor(recode(x, " 1:5='A'; 6:10='B'; 11:15='C'; 16:20='D' ")) > y [1] A A A A A B B B B B C C C C C D D D

Re: [R] removing random effect from nlme or using varPower() in nls

2009-10-22 Thread Kingsford Jones
help(gnls, pack=nlme) hth, Kingsford Jones On Thu, Oct 22, 2009 at 4:36 PM, Michael A. Gilchrist wrote: > Hello, > > I've been fitting a random effects model using nlme to some data, but I am > discovering that the variation in my random effect is very small.  As a > result, I would like to rep

Re: [R] PDF too large, PNG bad quality

2009-10-22 Thread Lasse Kliemann
* Message by -Greg Snow- from Thu 2009-10-22: > If you want to go the pdf route, then you need to find some way > to reduce redundant information while still getting the main > points of the plot. With so many point, I would suggest > looking at the hexbin package (bioconductor I think) as on

  1   2   >