Re: [R] error using glmmML()

2011-06-22 Thread David Winsemius
On Jun 21, 2011, at 11:13 PM, Tom Kraft wrote: Dear all, This question is basic but I am stumped. After running the below, I receive the message: non-integer #successes in a binomial glm! model1 - glmmML(y~Brood.Size*Density+Date.Placed+Species+Placed.Emerging+Year

Re: [R] Tricky (?) conversion from data.frame to matrix where not all pairs exist

2011-06-22 Thread Martin Maechler
Marius Hofert m_hof...@web.de on Wed, 22 Jun 2011 01:00:21 +0200 writes: Thanks a lot! Works like charm :-))) Cheers, well, I'd still *strongly* vote for Bill Dunlap's version. Martin Marius On 2011-06-22, at 24:51 , Dennis Murphy wrote: Ahhh...you want a matrix.

Re: [R] working with sparse matrix

2011-06-22 Thread Martin Maechler
David Winsemius dwinsem...@comcast.net on Tue, 21 Jun 2011 12:07:47 -0400 writes: On Jun 21, 2011, at 11:44 AM, Patrick Breheny wrote: On 06/21/2011 09:48 AM, davefrederick wrote: Hi, I have a 500x 53380 sparse matrix and I am trying to dichotomize it. Under sna

Re: [R] ipred: possible to use svm in errorest?

2011-06-22 Thread Uwe Ligges
On 21.06.2011 13:56, Daniel Stahl wrote: Dear all, is it possible to run the support vector machine command svm from the package e1071 within the errorest function from the library ipred? It works fine for lda and rda but I get an error message (see below) Thank you for your help. Best

Re: [R] [SOLVED] Italic fontfaces on specific labels.

2011-06-22 Thread Kenneth Roy Cabrera Torres
Thank you for your help... It works very well! El mar, 21-06-2011 a las 20:03 -0700, Bert Gunter escribió: ?strip.default __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Saved EPS/PDF graphics not same as JPG/BMP graphics

2011-06-22 Thread Uwe Ligges
I guess you use the menu to save the plots from your Windows device into files rather than starting separate devices explicitly? If so, please use explicit calls to the devices and everything happens as you define it. Uwe Ligges On 22.06.2011 04:31, John Kruschke wrote: When I save a

[R] distribute variance

2011-06-22 Thread phoebe kong
Hi All, I would like to use R to do some computation. However, before I proceed to write an R script, I have difficulty to find out a solution for the question below. Please note that the question below is not relating to question in R. I have a table below, 2009 2010 2011 2012 2013 2014

Re: [R] Time-series analysis with treatment effects - statistical approach

2011-06-22 Thread Mike Marchywka
Subject: [R] Time-series analysis with treatment effects - statistical approach Hello all R listers, I'm struggling to select an appropriate statistical method for my data set. I have collected soil moisture measurements every hour for 2 years. There are 75 sensors taking these

Re: [R] Saved EPS/PDF graphics not same as JPG/BMP graphics

2011-06-22 Thread John Kruschke
The error happens when using the savePlot() command, like this: savePlot( file=TestSavePlot.eps , type=eps ) savePlot( file=TestSavePlot.jpg , type=jpg ) The images in the two saved files are not the same, with the JPG being correct but the EPS being wrong. When you suggest starting separate

Re: [R] Saved EPS/PDF graphics not same as JPG/BMP graphics

2011-06-22 Thread Uwe Ligges
On 22.06.2011 13:50, John Kruschke wrote: The error happens when using the savePlot() command, like this: savePlot( file=TestSavePlot.eps , type=eps ) savePlot( file=TestSavePlot.jpg , type=jpg ) Well, plot directly into a device, for postscript: postscript(estSavePlot.eps,

Re: [R] Tricky (?) conversion from data.frame to matrix where not all pairs exist

2011-06-22 Thread David Winsemius
On Jun 21, 2011, at 6:51 PM, Dennis Murphy wrote: Ahhh...you want a matrix. xtabs() doesn't easily allow coercion to a matrix object, so try this instead: What am I missing? A contingency table already inherits from matrix- class and if you insisted on coercion it appears simple: xtb -

[R] GLS models and variance explained

2011-06-22 Thread Arnaud Mosnier
Dear list, Inspecting residuals of my linear models, I detected spatial autocorrelation. In order to take this into account, I decided to use the GLS method with the correlation = corGaus ( ~ X + Y). Then, I can sort my GLS models based on their AIC. But ... how to know the proportion of the

Re: [R] Tricky (?) conversion from data.frame to matrix where not all pairs exist

2011-06-22 Thread Dennis Murphy
I saw it as an xtabs object - I didn't think to check whether it was also a matrix object. Thanks for the clarification, David. Dennis On Wed, Jun 22, 2011 at 4:59 AM, David Winsemius dwinsem...@comcast.net wrote: On Jun 21, 2011, at 6:51 PM, Dennis Murphy wrote: Ahhh...you want a matrix.

[R] (no subject)

2011-06-22 Thread Jim Brindle
..I can’t imagine myself without this site! http://www.stadcopolyproducts.com/friends.page.php?utopic=07x1 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Tricky (?) conversion from data.frame to matrix where not all pairs exist

2011-06-22 Thread Marius Hofert
Hi, and what's the simplest way to obtain a *data.frame* with all years? The matching seems more difficult here because the years can/will show up several times... (df - data.frame(year=c(2000, 2001, 2002, 2001, 2000, 2001), block=c(a,a,a,b,c,c), value=1:6)) (df. -

Re: [R] Help interpreting ANCOVA results

2011-06-22 Thread Daniel Malter
I think you should write out your model formula and then go over it term by term to see which term adds what to your understanding of the data. If necessary, pick up a text about the interpretation of coefficients. For example, you will find that Reduction is not just the slope for the condition

Re: [R] Tricky (?) conversion from data.frame to matrix where not all pairs exist

2011-06-22 Thread David Winsemius
On Jun 22, 2011, at 9:19 AM, Marius Hofert wrote: Hi, and what's the simplest way to obtain a *data.frame* with all years? The matching seems more difficult here because the years can/will show up several times... (df - data.frame(year=c(2000, 2001, 2002, 2001, 2000, 2001),

[R] Help Needed on Merging Columns by Summation

2011-06-22 Thread Nabila Binte Zahur
Dear Sirs/Madam, I am a beginner to R, and I am currently working on a data matrix which looks like this: head(oligo) ko:K1 ko:K3 ko:K5 ko:K8 ko:K9 ko:K00010 ko:K00012 AAA 370 631 365 67 164 455

[R] analysing a three level reponse

2011-06-22 Thread Matt Ellis (Research)
Hello, I am struggling to figure out how to analyse a dataset I have inherited (please note this was conducted some time ago, so the data is as it is, and I know it isn't perfect!). A brief description of the experiment follows: Pots of grass were grown in 1l pots of standad potting medium for 1

[R] Help with winbugs code

2011-06-22 Thread nita yalina
Good afternoon sir, i'm a student in Indonesia who study technology management, i need to review the software i'v been develop, i was told to use bayesian SEM because i don't have large sample. i don't know much about statistics but i try to make a code via winbugs.. and a i got a problem. here i

[R] How to plot 4 variable/distribution as tetrahedral

2011-06-22 Thread Rajesh K Kushawaha
Dear all, I am a new user of R. I want use R to plot four momentum vectors(variable) in form of tetrahedral. The data(momentum vector) is in form of distribution(e.g. momentum of particle1 vs intensity). Thanks in advance. Best Regards Rajesh -- View this message in context:

[R] How to add label to lines()

2011-06-22 Thread Nevil Amos
I am plotting a number of lines on a standard plot. I would like to add labels at the end (rhs) of each line. is there a way to do this other than defining the individual xy coordinates and placing each label using text() Thanks Nevil Amos __

Re: [R] Help Needed on Merging Columns by Summation

2011-06-22 Thread Dennis Murphy
Hi: Based on the information you provided, I would suggest looking into the transform() and within() functions in base R, and perhaps the mutate() function in package plyr. HTH, Dennis On Tue, Jun 21, 2011 at 11:35 PM, Nabila Binte Zahur nab...@nus.edu.sg wrote: Dear Sirs/Madam, I am a

Re: [R] Tricky (?) conversion from data.frame to matrix where not all pairs exist

2011-06-22 Thread Marius Hofert
Hi David, thanks for the quick response. That's nice. Is there also a way without loading an additional package? I'd prefer loading less packages if possible. Cheers, Marius On 2011-06-22, at 15:38 , David Winsemius wrote: On Jun 22, 2011, at 9:19 AM, Marius Hofert wrote: Hi, and

Re: [R] How to add label to lines()

2011-06-22 Thread Duncan Murdoch
On 11-06-21 10:31 AM, Nevil Amos wrote: I am plotting a number of lines on a standard plot. I would like to add labels at the end (rhs) of each line. is there a way to do this other than defining the individual xy coordinates and placing each label using text() Probably, but what you

Re: [R] Help Needed on Merging Columns by Summation

2011-06-22 Thread Gabor Grothendieck
On Wed, Jun 22, 2011 at 2:35 AM, Nabila Binte Zahur nab...@nus.edu.sg wrote: Dear Sirs/Madam, I am a beginner to R, and I am currently working on a data matrix which looks like this: head(oligo)        ko:K1 ko:K3 ko:K5 ko:K8 ko:K9 ko:K00010 ko:K00012 AAA       370    

Re: [R] Package warnings

2011-06-22 Thread Duncan Murdoch
On 11-06-21 11:58 PM, steven mosher wrote: Thanks to all your help I've just finished my first package and I have a couple of questions I want to submit to CRAN but I have 1 warning checking for code/documentation mismatches ... WARNING Data sets with usage in documentation object

Re: [R] analysing a three level reponse

2011-06-22 Thread David Cross
You could analyze these data with a multinomial logit model, with an ordinal response. I don't have my copy handy, but I know that Agresti (Categorical Data Analysis, Wiley) covers these models. Cheers David Cross d.cr...@tcu.edu www.davidcross.us On Jun 22, 2011, at 8:19 AM, Matt Ellis

Re: [R] Tricky (?) conversion from data.frame to matrix where not all pairs exist

2011-06-22 Thread David Winsemius
On Jun 22, 2011, at 9:46 AM, Marius Hofert wrote: Hi David, thanks for the quick response. That's nice. Is there also a way without loading an additional package? I'd prefer loading less packages if possible. xtb - xtabs(value ~ year + block, data = df) xtb block year a b c

Re: [R] How to add label to lines()

2011-06-22 Thread David Winsemius
On Jun 21, 2011, at 10:31 AM, Nevil Amos wrote: I am plotting a number of lines on a standard plot. I would like to add labels at the end (rhs) of each line. is there a way to do this other than defining the individual xy coordinates and placing each label using text() Without an

[R] Documenting variables, dataframes and files?

2011-06-22 Thread Robert Lundqvist
Every now and then I realize that my attempts to document what all dataframes consist of are unsufficient. So far, I have been writing notes in an external file. Are there any better ways to do this within R? One possibility could be to set up the data as packages, but I would like to have a

Re: [R] Setting up list of many equations for systemfit

2011-06-22 Thread Rita Carreira
Thanks for the suggestion, Dennis. Unfortunately, I was not able to make it work. Maybe I'm not using as.formula properly. I posted below some new things I tried. What am I doing wrong? Thanks for any feedback! Rita First attempt: eqSystem2 -paste(paste(form, 1:4, sep=), as.formula(paste(EQ,

[R] setting 'layout' locally within functions

2011-06-22 Thread Simon Goodman
Using layout I've created a function that makes a 2 panel plot - comprising a main plot, and a sub-panel with custom legend. I would now like to use layout to create multiple panels with plots created by my function, however the values for layout set in the function act globally, stopping me from

Re: [R] analysing a three level reponse

2011-06-22 Thread Robert A LaBudde
The best method would probably be proportional odds regression using polyr() in 'MASS'. At least it's a starting point. At 09:19 AM 6/22/2011, Matt Ellis \(Research\) wrote: Hello, I am struggling to figure out how to analyse a dataset I have inherited (please note this was conducted some

Re: [R] error using glmmML()

2011-06-22 Thread Göran Broström
Tom, thanks for spotting a bug in glmmML; internally, glmmML sorts data by cluster. The bug is that I missed to sort the weights accordingly. Weights are produced when the response is a two-column matrix, as in your case. So, glmmML calls glm.fit with wrong weights, and the warning comes from

Re: [R] Package warnings

2011-06-22 Thread steven mosher
Thanks Duncan, I'll join Dev and ask the questions over there. Steve On Wed, Jun 22, 2011 at 7:19 AM, Duncan Murdoch murdoch.dun...@gmail.comwrote: On 11-06-21 11:58 PM, steven mosher wrote: Thanks to all your help I've just finished my first package and I have a couple of questions I

Re: [R] Documenting variables, dataframes and files?

2011-06-22 Thread David Winsemius
There is a 'comment' function. It sets an attribute which gets carried along with the dataframe when it is saved or copied: df1 -data.frame(NA) df1 NA. 1 NA comment(df1) - empty dataframe comment(df1) [1] empty dataframe df2 - df1 comment(df2) - c(comment(df1), copy of df1)

Re: [R] Documenting variables, dataframes and files?

2011-06-22 Thread Laurent Gatto
Have a look at the AnnotatedDataFrame class in the Biobase package [1]. Here is the description from the manual: An ‘AnnotatedDataFrame’ consists of two parts. There is a collection of samples and the values of variables measured on those samples. There is also a description of each variable

Re: [R] Hardy Weinberg

2011-06-22 Thread Aaron Mackey
H-W only gives you the expected frequency of AA, AB, and BB genotypes (i.e. a 1x3 table): minor - runif(1, 0.05, 0.25) major - 1-minor AA - minor^2 AB - 2*minor*major BB - major^2 df - cbind(AA, AB, BB) -Aaron On Tue, Jun 21, 2011 at 9:30 PM, Jim Silverton jim.silver...@gmail.comwrote:

[R] VGAM constraints-related puzzle

2011-06-22 Thread Edward Wallace
Hello R users, I have a puzzle with the VGAM package, on my first excursion into generalized additive models, in that this very nice package seems to want to do either more or less than what I want. Precisely, I have a 4-component outcome, y, and am fitting multinomial logistic regression with

[R] VAR with excluded lags

2011-06-22 Thread gizmo
Hi, I would like to fit a Vector Auto Regression with lags that are not consecutive with the vars package (or other if there is one as good). Is it possible? For example, rather than having lags 1, 2, 3, 4, 5 have 1, 2, 5. Thanks. -- View this message in context:

[R] binary in R

2011-06-22 Thread Jürg Altwegg
Does really nobody has a coment to this question? Dear R-help members I would like to use the R package goalprog, weighted and lexicographical goal programming and optimization to optimize a location problem. In my model I need a yes or no decision - in this case, whether to select a site or

[R] strange date problem - May 3, 1992 is NA

2011-06-22 Thread Alexander Shenkin
is.na(strptime(5/2/1992, format=%m/%d/%Y)) [1] FALSE is.na(strptime(5/3/1992, format=%m/%d/%Y)) [1] TRUE Any idea what's going on with this? Running strptime against all dates from around 1946, only 5/3/1992 was converted as NA. Even stranger, it still seems to have a value associated with it

Re: [R] binary in R

2011-06-22 Thread Sarah Goslee
Jürg. It's not that nobody knows the answer, necessarily, it's that your inquiry is so vague we don't know what the *question* is, let alone the answer. We don't know anything about your data, your intended function and model, anything. A toy reproducible example with clear explanation would be

[R] Linking 2 columns in 2 databases and applying a function

2011-06-22 Thread Ryan Utz
Hi all, I have two datasets, one that represents a long-term time series and one that represents summary data for the time series. It looks something like this: x-data.frame(Year=c(2001,2001,2001,2001,2001,2001,2002,2002,2002,2002,2002,2002), Month=c(1,1,1,2,2,2),Q=c(5,5,5,6,6,6,3,3,3,4,4,5))

Re: [R] strange date problem - May 3, 1992 is NA

2011-06-22 Thread Sarah Goslee
Hi, On Wed, Jun 22, 2011 at 11:40 AM, Alexander Shenkin ashen...@ufl.edu wrote: is.na(strptime(5/2/1992, format=%m/%d/%Y)) [1] FALSE is.na(strptime(5/3/1992, format=%m/%d/%Y)) [1] TRUE I can't reproduce your problem on R 2.13.0 on linux: strptime(5/2/1992, format=%m/%d/%Y) [1] 1992-05-02

Re: [R] strange date problem - May 3, 1992 is NA

2011-06-22 Thread Alexander Shenkin
On 6/22/2011 1:03 PM, Sarah Goslee wrote: Hi, On Wed, Jun 22, 2011 at 11:40 AM, Alexander Shenkin ashen...@ufl.edu wrote: is.na(strptime(5/2/1992, format=%m/%d/%Y)) [1] FALSE is.na(strptime(5/3/1992, format=%m/%d/%Y)) [1] TRUE I can't reproduce your problem on R 2.13.0 on linux:

Re: [R] strange date problem - May 3, 1992 is NA

2011-06-22 Thread David Winsemius
On Jun 22, 2011, at 2:03 PM, Sarah Goslee wrote: Hi, On Wed, Jun 22, 2011 at 11:40 AM, Alexander Shenkin ashen...@ufl.edu wrote: is.na(strptime(5/2/1992, format=%m/%d/%Y)) [1] FALSE is.na(strptime(5/3/1992, format=%m/%d/%Y)) [1] TRUE I can't reproduce your problem on R 2.13.0 on

Re: [R] Linking 2 columns in 2 databases and applying a function

2011-06-22 Thread Daniel Malter
For example, you can merge the two data frames and do a direct comparison: df-merge(x,y,all.x=T,all.y=F) df df$Qdf$Threshold_Q HTH, Daniel Ryan Utz-2 wrote: Hi all, I have two datasets, one that represents a long-term time series and one that represents summary data for the time

Re: [R] strange date problem - May 3, 1992 is NA

2011-06-22 Thread Sarah Goslee
On Wed, Jun 22, 2011 at 2:28 PM, David Winsemius dwinsem...@comcast.net wrote: On Jun 22, 2011, at 2:03 PM, Sarah Goslee wrote: Hi, On Wed, Jun 22, 2011 at 11:40 AM, Alexander Shenkin ashen...@ufl.edu wrote: is.na(strptime(5/2/1992, format=%m/%d/%Y)) [1] FALSE is.na(strptime(5/3/1992,

Re: [R] Help Needed on Merging Columns by Summation

2011-06-22 Thread Rita Carreira
I assume that you are working in package MatrixCalc. Let’s say you have a matrix X. You can call the columns of X this way: X[,1] for the first column X[,2] for the second column X[,3] for the third column Etc. So let’s say that you want to add the first and third column, then you would just

Re: [R] strange date problem - May 3, 1992 is NA

2011-06-22 Thread Alexander Shenkin
On 6/22/2011 1:34 PM, Sarah Goslee wrote: On Wed, Jun 22, 2011 at 2:28 PM, David Winsemius dwinsem...@comcast.net wrote: On Jun 22, 2011, at 2:03 PM, Sarah Goslee wrote: Hi, On Wed, Jun 22, 2011 at 11:40 AM, Alexander Shenkin ashen...@ufl.edu wrote: is.na(strptime(5/2/1992,

Re: [R] Documenting variables, dataframes and files?

2011-06-22 Thread Jan van der Laan
The memisc package also offers functionality for documenting data. Jan On 06/22/2011 04:57 PM, Robert Lundqvist wrote: Every now and then I realize that my attempts to document what all dataframes consist of are unsufficient. So far, I have been writing notes in an external file. Are there

Re: [R] Linking 2 columns in 2 databases and applying a function

2011-06-22 Thread B77S
1st of all Dr Utz, thanks for your recent pubs on regional differences between the piedmont and coastal plain streams. and to add to Daniels post (giving your binary yes/no): df-merge(x,y,all.x=T,all.y=F) df[exceed] - ifelse(df$Qdf$Threshold_Q , 1, 0) ## now look at df df Daniel Malter

Re: [R] strange date problem - May 3, 1992 is NA

2011-06-22 Thread Luke Miller
For what it's worth, I cannot reproduce this problem under a nearly identical instance of R (R 2.12.1, Win 7 Pro 64-bit). I also can't reproduce the problem with R 2.13.0. You've got something truly weird going on with your particular instance of R. is.na(strptime(5/3/1992, format=%m/%d/%Y))

Re: [R] Linking 2 columns in 2 databases and applying a function

2011-06-22 Thread Ryan Utz
Daniel, That indeed does work... and I didn't even need to learn a new function. Thanks! -- Ryan Utz, Ph.D. Aquatic Ecologist/STREON Scientist National Ecological Observatory Network Home/Cell: (724) 272-7769 Work: (720) 746-4844 ext. 2488 [[alternative HTML version deleted]]

[R] caret's Kappa for categorical resampling

2011-06-22 Thread Harlan Harris
Hello, When evaluating different learning methods for a categorization problem with the (really useful!) caret package, I'm getting confusing results from the Kappa computation. The data is about 20,000 rows and a few dozen columns, and the categories are quite asymmetrical, 4.1% in one category

[R] mlogit model that contains both individual-specific parameters and universal parameters

2011-06-22 Thread Quang Anh Duong
Hello,  I am pretty new to mlogit, and still trying to figure out what models to use.I have a data set of N individuals, each of which faces I alternatives. The utility function of individual n, for choice i is:  u(i,n) = alpha(i) * x1(i,n) + beta * x2(i,n)  where alpha(i) is the individual

Re: [R] Package warnings

2011-06-22 Thread steven mosher
Thanks all the issue is closed. in this case I had a data element FILE.PARAMETERS = list() the .Rd files created by package.skelton() for data objects had the following for \usage. \usage{data(FILE.PARAMETERS)} I left that as is and CHECK throws a warning. checking for

Re: [R] setting 'layout' locally within functions

2011-06-22 Thread Paul Murrell
Hi On 23/06/2011 2:58 a.m., Simon Goodman wrote: Using layout I've created a function that makes a 2 panel plot - comprising a main plot, and a sub-panel with custom legend. I would now like to use layout to create multiple panels with plots created by my function, however the values for

Re: [R] strange date problem - May 3, 1992 is NA

2011-06-22 Thread William Dunlap
The isdst value -1 doesn't seem right. Shouldn't it be either 0 (not daylight savings time) or 1 (yes dst)? I've only seen isdst==-1 when all the other entries were NA (that happens when the string doesn't match the format). In the parts of the US where daylight savings time is used the

Re: [R] strange date problem - May 3, 1992 is NA

2011-06-22 Thread William Dunlap
I can reproduce your problem when using a time that doesn't exist because it is between 2am and 3am on the Sunday that we switch from winter time to summer time: z - strptime(paste(paste(sep=/, 4, 5, 1992), 2:30), format=%m/%d/%Y %H:%M) z [1] 1992-04-05 02:30:00 is.na(z) [1] TRUE

Re: [R] strange date problem - May 3, 1992 is NA

2011-06-22 Thread Alexander Shenkin
Wow. Setting my timezone to UTC -5 Bogota (where there is no daylight savings time), I get the error: is.na(strptime(5/3/1992, format=%m/%d/%Y)) [1] TRUE But setting it to UTC -5 East Coast Time (whether or not I tell windows to adjust for DST) I get: is.na(strptime(5/3/1992,

Re: [R] strange date problem - May 3, 1992 is NA

2011-06-22 Thread Brian Diggs
On 6/22/2011 12:09 PM, Luke Miller wrote: For what it's worth, I cannot reproduce this problem under a nearly identical instance of R (R 2.12.1, Win 7 Pro 64-bit). I also can't reproduce the problem with R 2.13.0. You've got something truly weird going on with your particular instance of R.

Re: [R] strange date problem - May 3, 1992 is NA

2011-06-22 Thread Alexander Shenkin
On 6/22/2011 3:34 PM, Brian Diggs wrote: On 6/22/2011 12:09 PM, Luke Miller wrote: For what it's worth, I cannot reproduce this problem under a nearly identical instance of R (R 2.12.1, Win 7 Pro 64-bit). I also can't reproduce the problem with R 2.13.0. You've got something truly weird going

Re: [R] strange date problem - May 3, 1992 is NA

2011-06-22 Thread Brian Diggs
On 6/22/2011 1:23 PM, William Dunlap wrote: The isdst value -1 doesn't seem right. Shouldn't it be either 0 (not daylight savings time) or 1 (yes dst)? I've only seen isdst==-1 when all the other entries were NA (that happens when the string doesn't match the format). A isdst of -1 indicates

[R] Appending to list

2011-06-22 Thread LCOG1
So im here now b/c im incredibly frustrated. Please consider the following: #Try 1 Data_-list() Sn-1:12 for(sn in Sn){ for(i in 1:10){ Data.X - rnorm(100,0,10) Data_[[paste(sn,i,sep=-)]]-Data.X } } ##Try 2 Data_-list() Sn-1:12 for(sn in

[R] AIC() vs. mle.aic() vs. step()?

2011-06-22 Thread Alexandra Thorn
I know this a newbie question, but I've only just started using AIC for model comparison and after a bunch of different keyword searches I've failed to find a page laying out what the differences are between the AIC scores assigned by AIC() and mle.aic() using default settings. I started by

Re: [R] strange date problem - May 3, 1992 is NA

2011-06-22 Thread Brian Diggs
On 6/22/2011 1:37 PM, Alexander Shenkin wrote: On 6/22/2011 3:34 PM, Brian Diggs wrote: On 6/22/2011 12:09 PM, Luke Miller wrote: For what it's worth, I cannot reproduce this problem under a nearly identical instance of R (R 2.12.1, Win 7 Pro 64-bit). I also can't reproduce the problem with R

Re: [R] mlogit model that contains both individual-specific parameters and universal parameters

2011-06-22 Thread Achim Zeileis
On Wed, 22 Jun 2011, Quang Anh Duong wrote: Hello,? I am pretty new to mlogit, and still trying to figure out what models to use.I have a data set of N individuals, each of which faces I alternatives. The utility function of individual n, for choice i is:? u(i,n) = alpha(i) * x1(i,n) +

[R] Factor Analysis with orthogonal and oblique rotation

2011-06-22 Thread Rosario Garcia Gil
Hello I seem to find only two types of rotation for the factanal function in R, the Varimax and Promax, but is it possible to run a orthogonal and oblique rotations in R? Thanks in advance Rosario __ R-help@r-project.org mailing list

Re: [R] strange date problem - May 3, 1992 is NA

2011-06-22 Thread Alexander Shenkin
On 6/22/2011 4:09 PM, Brian Diggs wrote: On 6/22/2011 1:37 PM, Alexander Shenkin wrote: On 6/22/2011 3:34 PM, Brian Diggs wrote: On 6/22/2011 12:09 PM, Luke Miller wrote: For what it's worth, I cannot reproduce this problem under a nearly identical instance of R (R 2.12.1, Win 7 Pro 64-bit).

Re: [R] Factor Analysis with orthogonal and oblique rotation

2011-06-22 Thread Jeremy Miles
Varimax is orthogonal, promax is oblique. Varimax is generally not recommended. See: Preacher, K. J., MacCallum, R. C. (2003). Repairing Tom Swift's electric factor analysis machine. Understanding Statistics, 2(1), 13-43. (Google the title and you'll find a PDF). The fa() function in the

Re: [R] Unreasonable syntax error

2011-06-22 Thread Greg Snow
I second the fortune nomination, probably the 1st paragraph is sufficient for a fortune. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-

Re: [R] Appending to list

2011-06-22 Thread Sarah Goslee
You lost me with the TRN and TRN_CLUSTER bits, but are you trying to make a list of lists? Data_ - list() SN - 1:12 for(sn in SN) { + Data_[[sn]] - list() + for(i in 1:10) { + Data.X - rnorm(5, 0, 10) + Data_[[sn]][[i]] - Data.X + }} Data_[[3]][[2]] [1] -5.687070 -2.365589 12.378359

[R] question about read.columns

2011-06-22 Thread Changbin Du
HI, Dear R community, I have a large data set names dd.txt, the columns are: there are 2402 variables. a1, b1, ..z1, a11, b11, ...z11, a111, b111, ..z111.. IF I dont know the relative position of the columns, but I know I need the following variables: var-c(a1, c1,a11,b11,f111) Can I use

Re: [R] question about read.columns

2011-06-22 Thread Gabor Grothendieck
On Wed, Jun 22, 2011 at 5:45 PM, Changbin Du changb...@gmail.com wrote: HI, Dear R community, I have a large data set names dd.txt, the columns are: there are 2402 variables. a1, b1, ..z1, a11, b11, ...z11, a111, b111, ..z111.. IF I dont know the relative position of the columns, but I

Re: [R] Hardy Weinberg

2011-06-22 Thread David Duffy
I am interested in simulating 10,000 2 x 3 tables for SNPs data with the Hardy Weinberg formulation. Is there a quick way to do this? I am assuming that the minor allelle frequency is uniform in (0.05, 0.25). rmultinom() with HWE expectations __

Re: [R] question about read.columns

2011-06-22 Thread Changbin Du
Hi, Gabor, Thanks so much, I will try it and let you know the results. Appreciated! On Wed, Jun 22, 2011 at 2:54 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: On Wed, Jun 22, 2011 at 5:45 PM, Changbin Du changb...@gmail.com wrote: HI, Dear R community, I have a large data set

Re: [R] question about read.columns

2011-06-22 Thread Changbin Du
I found the following errors: library(sqldf) Loading required package: DBI Loading required package: RSQLite Loading required package: RSQLite.extfuns *Error: package 'RSQLite' 0.8-0 is loaded, but = 0.9.1 is required by 'RSQLite.extfuns'*

Re: [R] question about read.columns

2011-06-22 Thread Gabor Grothendieck
On Wed, Jun 22, 2011 at 6:01 PM, Changbin Du changb...@gmail.com wrote: I found the following errors: library(sqldf) Loading required package: DBI Loading required package: RSQLite Loading required package: RSQLite.extfuns Error: package 'RSQLite' 0.8-0 is loaded, but = 0.9.1 is required

Re: [R] question about read.columns

2011-06-22 Thread Changbin Du
My R is 2.12.0. R.version.string [1] R version 2.12.0 (2010-10-15) packageVersion(RSQLite) [1] '0.8.0' packageVersion(sqldf) [1] '0.3.5' So it seems I have to update or install the 2.13.0 version in my linux machine. On Wed, Jun 22, 2011 at 3:04 PM, Gabor Grothendieck

Re: [R] question about read.columns

2011-06-22 Thread Gabor Grothendieck
On Wed, Jun 22, 2011 at 6:10 PM, Changbin Du changb...@gmail.com wrote: My R is 2.12.0. R.version.string [1] R version 2.12.0 (2010-10-15) packageVersion(RSQLite) [1] '0.8.0' packageVersion(sqldf) [1] '0.3.5' So it seems I have to update or install the 2.13.0 version in my linux

Re: [R] question about read.columns

2011-06-22 Thread Changbin Du
I will try this first. Thanks, Gabor! On Wed, Jun 22, 2011 at 3:15 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: On Wed, Jun 22, 2011 at 6:10 PM, Changbin Du changb...@gmail.com wrote: My R is 2.12.0. R.version.string [1] R version 2.12.0 (2010-10-15)

Re: [R] question about read.columns

2011-06-22 Thread Changbin Du
INstalling of RSQLite was successful. in R: packageVersion(RSQLite) [1] '0.9.4' When I try to install sqldf, I found the following errors: install.packages(sqldf) Installing package(s) into '/house/homedirs/c/cdu/library/' (as 'lib' is unspecified) trying URL

Re: [R] question about read.columns

2011-06-22 Thread Gabor Grothendieck
On Wed, Jun 22, 2011 at 7:07 PM, Changbin Du changb...@gmail.com wrote: INstalling of RSQLite was successful. in R: packageVersion(RSQLite) [1] '0.9.4' When I try to install sqldf, I found the following errors: install.packages(sqldf) Installing package(s) into

Re: [R] Fantastic! So many interesting and useful!

2011-06-22 Thread Jim Brindle
http://bakaneko.fr/friends.page.php?igjhotmailID=28aq2 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] plotmath: unexpected SPECIAL

2011-06-22 Thread Bryan Hanson
Hello R Masters and the Rest of Us: The first of these works fine, the 2nd is accepted but too literal (the %-% is shown in the plot label and in the wrong position). The 3rd throws and error due to unexpected SPECIAL. Would someone recommend a way to format this? I want the two phrases

Re: [R] Time-series analysis with treatment effects - statistical approach

2011-06-22 Thread J.Morgenroth
Hi Mike, here's a sample of my data so that you get an idea what I'm working with. http://r.789695.n4.nabble.com/file/n3618615/SampleDataSet.txt SampleDataSet.txt Also, I've uploaded an image showing a sample graph of daily soil moisture by treatment. The legend shows IP, IP+, PP, PP+ which

Re: [R] plotmath: unexpected SPECIAL

2011-06-22 Thread Sarah Goslee
Interesting. I don't know the explanation, but look at this: # works plot(1:10, 1:10, xlab=expression(a %-% b)) # doesn't work plot(1:10, 1:10, xlab=expression(%-%)) # works plot(1:10, 1:10, xlab=expression(paste(something %-% else))) # doesn't work plot(1:10, 1:10,

Re: [R] plotmath: unexpected SPECIAL

2011-06-22 Thread David Winsemius
On Jun 22, 2011, at 8:10 PM, Bryan Hanson wrote: Hello R Masters and the Rest of Us: The first of these works fine, the 2nd is accepted but too literal (the %-% is shown in the plot label and in the wrong position). The 3rd throws and error due to unexpected SPECIAL. Would someone

Re: [R] plotmath: unexpected SPECIAL

2011-06-22 Thread Bryan Hanson
Thanks to both David and Sarah. I'm glad I asked, as I had tried some of the combos Sarah suggested and observed the same behavior, which puzzled me. David, thanks for reminding me about ~ as that is a different way to get a space into the string. I just don't use plotmath often enough

Re: [R] plotmath: unexpected SPECIAL

2011-06-22 Thread Dennis Murphy
Hi: From the plotmath help page: x %-% y x right-arrow y so this is behaving like a binary operator. There happen to be several of these in plotmath On Wed, Jun 22, 2011 at 5:49 PM, Sarah Goslee sarah.gos...@gmail.com wrote: Interesting. I don't know the explanation, but look at this:

Re: [R] plotmath: unexpected SPECIAL

2011-06-22 Thread Sarah Goslee
Dennis, Thanks. That makes sense, but I don't think it's clearly documented. The default assumption that I and at least some others in this discussion made is that everything in the list of plotmath features in the helpfile works the same way, since they're all in the same list. And if for some

Re: [R] several messages

2011-06-22 Thread Mike Miller
On Mon, 20 Jun 2011, Jim Silverton wrote: I a using plink on a large SNP dataset with a .map and .ped file. I want to get some sort of file say a list of all the SNPs that plink is saying that I have. ANyideas on how to do this? All the SNPs you have are listed in the .map file. An easy

Re: [R] Re; Getting SNPS from PLINK to R

2011-06-22 Thread Mike Miller
Resending to correct bad subject line... On Mon, 20 Jun 2011, Jim Silverton wrote: I a using plink on a large SNP dataset with a .map and .ped file. I want to get some sort of file say a list of all the SNPs that plink is saying that I have. ANyideas on how to do this? All the SNPs you

Re: [R] Time-series analysis with treatment effects - statistical approach

2011-06-22 Thread Mike Marchywka
Date: Wed, 22 Jun 2011 17:21:52 -0700 From: jmo...@student.canterbury.ac.nz To: r-help@r-project.org Subject: Re: [R] Time-series analysis with treatment effects - statistical approach Hi Mike, here's a sample of my data so that you get an idea what I'm working with. Thanks, data

[R] numerical integration and 'non-finite function value' error

2011-06-22 Thread Adan_Seb
Dear R users, I have a question about numerical integration in R. I am facing the 'non-finite function value' error while integrating the function xf(x) using 'integrate'. f(x) is a probability density function and assumed to follow the three parameter (min = 0)

[R] Subsetting data systematically

2011-06-22 Thread gibberish
I would like to subset data from a larger dataset and generate a smaller dataset. However, I don't want to use sample() because it does it randomly. I would like to take non-random subsamples, for example, every 2nd number, or every 3rd number. Is there a procedure that does this? Thanks,

[R] lme convergence failure within a loop

2011-06-22 Thread Sam Nicol
Hi R-users, I'm attempting to fit a number of mixed models, all with the same structure, across a spatial grid with data points collected at various time points within each grid cell. I'm trying to use a 'for' loop to try the model fit on each grid cell. In some cells lme does not converge,

  1   2   >