Re: [R] Undefined columns selected

2011-04-28 Thread Andrew Robinson
Jennifer, it looks like some of the columns that you are selecting don't exist. What is the output of str(arc) before you run the code below? Andrew On Thu, Apr 28, 2011 at 04:49:41PM -0700, Jennifer Wessel wrote: This is part of my program. I am getting an error, that I cannot figure out

Re: [R] why doesn't ifelse work ?

2011-04-28 Thread Andrew Robinson
Hi Eric, tough to say. Please try to provide commented, minimal, self-contained, reproducible code. Cheers Andrew On Thu, Apr 28, 2011 at 06:46:16PM -0700, eric wrote: I have the following lines of code: ind - rollapply(GSPC, 200, mean) signal - ifelse(diff(ind, 5) 0 , 1 , -1) signal

[R] likelihood for new data from fitted nlme object

2011-04-12 Thread Andrew Bateman
components of the fitted model objects (e.g. using equation 4.2 from Lindstrom and Bates1990 Nonlinear Mixed Effects Models for Repeated Measures Data)? Many thanks (and apologies if I have failed to conform to any of the list guidelines), Andrew Bateman PhD Candidate Department of Zoology

Re: [R] how to handle no lines in input with pipe()

2011-04-12 Thread Andrew Yee
Thank you very much for your suggestion...that works perfectly. Thanks, Andrew On Mon, Apr 4, 2011 at 5:46 PM, Prof Brian Ripley rip...@stats.ox.ac.uk wrote: On Mon, 4 Apr 2011, Andrew Yee wrote: This has to do with using pipe() and grep and read.csv() I have a .csv file that I grep using

[R] comparing ARIMA model to data

2011-04-07 Thread Andrew Collier
that predict can be used to extrapolate beyond the end of the data series, but i want to evaluate the model within (not beyond) the original data. best regards, andrew. -- Andrew B. Collier Physicist Waves and Space Plasmas Group Hermanus Magnetic Observatory Honorary Senior Lecturer

Re: [R] gap.barplot doesn't support data arrays?

2011-04-05 Thread Andrew D. Steen
Jim, That works great. Thanks much for the quick help. Cheers, Drew -Original Message- From: Jim Lemon [mailto:j...@bitwrit.com.au] Sent: Tuesday, April 05, 2011 2:12 PM To: Andrew D. Steen Cc: r-help@r-project.org Subject: Re: [R] gap.barplot doesn't support data arrays? On 04

[R] gap.barplot doesn't support data arrays?

2011-04-04 Thread Andrew D. Steen
I am trying to make a barplot with a broken axis using gap.barplot (in the indispensable plotrix package). This works well when the data is a vector: twogrp-c(rnorm(10)+4,rnorm(10)+20) gap.barplot(twogrp,gap=c(8,16),xlab=Index,ytics=c(3,6,17,20),ylab=Group values,main=Barplot with gap) But

Re: [R] gap.barplot doesn't support data arrays?

2011-04-04 Thread Andrew D. Steen
spend enough time with the axis.break() function. But is there an easier way? --Drew -Original Message- From: Peter Ehlers [mailto:ehl...@ucalgary.ca] Sent: Monday, April 04, 2011 4:33 PM To: Andrew D. Steen Cc: r-help@r-project.org Subject: Re: [R] gap.barplot doesn't support data

[R] how to handle no lines in input with pipe()

2011-04-04 Thread Andrew Yee
(appropriately): Error in read.table(file = file, header = header, sep = sep, quote = quote, : no lines available in input Is there a way to inspect the output of pipe before passing it on to read.csv()? Thanks, Andrew __ R-help@r-project.org

[R] Incorrect degrees of freedom in SEM model using lavaan

2011-03-17 Thread Andrew Miles
) Andrew Miles [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal

[R] combining two columns into one column despite NAs

2011-02-24 Thread Andrew Anglemyer
I am trying to combine two columns in a data frame into one column. Some values in either column are missing, but not in the same row for the two different columns. Additionally, when both columns in a row contain data, the data are identical. I want a new column with the identical data or the

Re: [R] combining two columns into one column despite NAs

2011-02-24 Thread Andrew Anglemyer
! On Thu, Feb 24, 2011 at 4:27 PM, Ista Zahn iz...@psych.rochester.eduwrote: I think the easiest way is probably data$z - rowMeans(data[, c(x, y)], na.rm=TRUE) Best, Ista On Fri, Feb 25, 2011 at 12:12 AM, Andrew Anglemyer andrew.anglem...@gmail.com wrote: I am trying to combine two

Re: [R] combining two columns into one column despite NAs

2011-02-24 Thread Andrew Anglemyer
Thanks for all the solutions! On Thu, Feb 24, 2011 at 5:37 PM, Sarah Goslee sarah.gos...@gmail.comwrote: What about: ifelse(is.na(x), y, x) as long as x and y are always the same where one is not NA. Sarah On Thu, Feb 24, 2011 at 7:53 PM, Andrew Anglemyer andrew.anglem...@gmail.com

[R] Bonnet-Price CI for difference between two medians

2011-02-23 Thread Wilson, Andrew
thanks, Andrew Wilson __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] ROC from R-SVM?

2011-02-22 Thread Andrew Ziem
In addition's to Max's suggestion about caret, look at ROCR which visualizes ROC charts for any binary classifier. I have an example of e1071::SVN and ROCR here https://heuristically.wordpress.com/2009/12/23/compare-performance-machine-learning-classifiers-r/ -Original Message-

Re: [R] Categorical Variables and Machine Learning

2011-02-17 Thread Andrew Ziem
to binary features. However, you may find 120 variables is not much data. Andrew -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Lorenzo Isella Sent: Thursday, February 17, 2011 7:14 AM To: r-help Subject: [R] Categorical Variables

[R] missing values in party::ctree

2011-02-17 Thread Andrew Ziem
$Bare.nuclei %in% c(1,2,NA)) [1] 448 sum(BreastCancer$Bare.nuclei %in% c(1,2)) [1] 432 sum(BreastCancer$Bare.nuclei %in% c(3:10)) [1] 251 Andrew __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] problem with rbind when data frame contains an date-time variable POSIXt POSIXlt

2011-02-17 Thread Andrew Anglemyer
I'm trying to rbind two data frames, both with the same columns names. One of the columns is a variable with date-time and this variable is causing the rbind to fail--giving the error Error in names(value[[jj]])[ri] - nm : 'names' attribute [7568] must be the same length as the vector [9] Is

Re: [R] problem with rbind when data frame contains an date-time variable POSIXt POSIXlt

2011-02-17 Thread Andrew Anglemyer
1 1 2009-07-23 00:20:00 2 2 2009-08-18 16:25:00 3 3 2009-08-13 08:30:00 4 4 2009-08-25 10:25:00 5 5 2009-08-10 06:20:00 6 6 2009-10-09 08:20:00 No problems. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Andrew

[R] caret::train() and ctree()

2011-02-16 Thread Andrew Ziem
=0.99 mincriterion Accuracy Kappa maxdepth Accuracy SD Kappa SD maxdepth SD 0.95 0.939 0.867 3 0.0156 0.03371.01 0.99 0.94 0.868 3 0.0157 0.03371.01 I use R 2.12.1 and caret 4.78. Andrew require(party

[R] Modeling a wind driven boat journey

2011-02-10 Thread Andrew Craven
Hi I am trying to model path of a wind powered boat. I have some wind data, model as the frequency of the wind with its strength and direction. What I like to be able to calculate is for some random period in time for points a b c what was the wind strength and what was its direction.

[R] which multivariate regression?

2011-02-07 Thread Andrew Halford
for variation in one of the EVs affecting others. I appreciate any help I can get, -- Andrew Halford Ph.D Associate Research Scientist Marine Laboratory University of Guam Ph: +1 671 734 2948 [[alternative HTML version deleted]] __ R-help@r-project.org

[R] asterisk in subscript

2011-01-28 Thread Andrew Collier
it looks more like a superscript than a subscript. does anyone have an idea of how to get the * to the right subscript position (ie. somewhere near the baseline of the n)? thanks! best regards, andrew. -- Andrew B. Collier Physicist Waves and Space Plasmas Group Hermanus Magnetic Observatory

Re: [R] asterisk in subscript

2011-01-28 Thread Andrew Collier
) under ubuntu. my locale is LC_CTYPE=en_ZA.utf8;LC_NUMERIC=C;LC_TIME=en_ZA.utf8;LC_COLLATE=en_ZA.utf8;LC_MONETARY=C;LC_MESSAGES=en_ZA.utf8;LC_PAPER=en_ZA.utf8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_ZA.utf8;LC_IDENTIFICATION=C -- Andrew B. Collier Physicist Waves and Space Plasmas

Re: [R] asterisk in subscript

2011-01-28 Thread Andrew Collier
magic! this does the trick: expression(paste(italic(n)[symbol(\052)])) thanks for the hint, ted! -- Andrew B. Collier Physicist Waves and Space Plasmas Group Hermanus Magnetic Observatory Honorary Senior Lecturer tel: +27 31 2601157 Space Physics Research

Re: [R] Regression Testing

2011-01-20 Thread Andrew Miles
Perhaps the easiest way to incorporate the heteroskedasticity consistent SE's and output them in a familiar and easy to interpret format is to use coeftest() in the lmtest package. coeftest(myModel, vcov=vcovHC(myModel)) Andrew Miles On Jan 20, 2011, at 4:42 PM, Achim Zeileis wrote

[R] write.dta and export of variable labels

2011-01-15 Thread Andrew Owen
When I import a data file in stata format using read.dta, the full variable labels (e.g. variable= inc2000; variable label= Total household income in year 2000). When I then export the same data file using write.dta, the variable labels are not included in the new .dta file. Is there any way to

Re: [R] survreg vs. aftreg (eha) - the relationship between fitted coefficients?

2011-01-15 Thread Andrew Jackson
with X2Q and X1B:X2Q I look forward to hearing from you on this. best wishes Andrew Jackson -- Dr Andrew Jackson Lecturer School of Natural Sciences Zoology Building, Trinity College Dublin, Dublin 2, Ireland Tel. + 353 1 896 2728, Fax. + 353 1 677 8094, Email. a.jack...@tcd.ie http://www.tcd.ie

[R] Write.dta and export of variable labels

2011-01-14 Thread Andrew Owen
When I import a data file in stata format using read.dta, the full variable labels (e.g. variable= inc2000; variable label= Total household income in year 2000). When I then export the same data file using write.dta, the variable labels are not included in the new .dta file. Is there any way to

[R] Confidence interval on quantile regression predictions

2011-01-11 Thread Davey, Andrew
arguments but without success. (I am running R v 2.10.1). Thank you for your help. Regards, Andrew Davey Senior Consultant Tel:+ 44 (0) 1793 865023 Mob:+44 (0) 7747 863190 Fax:+ 44 (0) 1793 865001 E-mail: andrew.da...@wrcplc.co.uk Website:www.wrcplc.co.uk P Before

Re: [R] OT: Reducing pdf file size

2011-01-05 Thread Andrew Miles
I assume you mean PDFs generated by R. This topic has been addressed here: http://tolstoy.newcastle.edu.au/R/e2/help/07/05/17475.html I have always just output the graphics then used an external PDF program (like Preview on the Mac) to do changes in file type, size reductions, etc. Andrew

Re: [R] memisc-Tables with robost standard errors

2011-01-05 Thread Andrew Miles
I always use apsrtable in the apsrtable package, which allows you to specify a vcov matrix using the se option. The only trick is that you have to append it to your model object, something like this: fit=lm(y ~ x) fit$se=vcovHC(fit) apsrtable(fit, se=robust) Andrew Miles On Jan 5, 2011

Re: [R] robust standard error of an estimator

2011-01-01 Thread Andrew Miles
SEs library(sandwich) library(lmtest) reg=lm(fsn~lctot) coeftest(reg, vcov=vcovHC(reg)) Or to get cluster robust SEs, check out this: people.su.se/~ma/ clustering.pdf Hope that helps. Andrew Miles On Jan 1, 2011, at 10:09 AM, Charlène Cosandier wrote: Hi, I have ove the robust standard

Re: [R] After heteroskedasticity correction, how can I get new confidential interval?

2010-12-20 Thread Andrew Miles
It is hard to say without knowing more about the type of model you are running. A good place to look would be at the coeftest() function in the package lmtest. Andrew Miles On Dec 20, 2010, at 10:04 AM, JoonGi wrote: I just corrected std.error of my 'model'(Multi Regression

Re: [R] Title for y-axis on right side

2010-12-17 Thread Andrew Miles
Take a look at mtext() which offers options for writing text in any margin of the table. Andrew Miles On Dec 17, 2010, at 6:41 AM, phils_mu...@arcor.de wrote: Hi, I want to have a title for the y-axis on the right side of the plot. I know how to do it on the left side: title(ylab=Title

Re: [R] xyplot

2010-12-16 Thread Andrew Miles
Try sample() which will allow you to randomly select 10 ID's from your ID variable, which you can then plot. Andrew Miles On Dec 16, 2010, at 10:49 AM, Rasanga Ruwanthi wrote: Hi I am using following code to produce a xyplot for some longitudinal data. There are 2 panels. It produced

[R] lines and points without margin

2010-12-14 Thread Andrew Collier
anything there. any suggestions would be appreciated. thanks! best regards, andrew. -- Andrew B. Collier Physicist Waves and Space Plasmas Group Hermanus Magnetic Observatory Honorary Senior Lecturer tel: +27 31 2601157 Space Physics Research Institute

[R] scale caption on levelplot

2010-12-04 Thread Andrew Collier
, andrew. -- Andrew B. Collier Physicist Waves and Space Plasmas Group Hermanus Magnetic Observatory Honorary Senior Lecturer tel: +27 31 2601157 Space Physics Research Institute fax: +27 31 2607795 University of KwaZulu-Natal, Durban, South Africa

Re: [R] scale caption on levelplot

2010-12-04 Thread Andrew Collier
- x + y plot.new() p = levelplot(z ~ x*y, d, par.settings=list( layout.widths=list(right.padding=4)), colorkey = TRUE) print(p) mtext(CAPTION, 4, 1) your help really appreciated! best regards, andrew. -- Andrew B. Collier Physicist Waves and Space

Re: [R] kmeans() compared to PROC FASTCLUS

2010-12-03 Thread Andrew Agrimson
-up during the iterations. At least that's my take on it, does anyone see anything wrong with line of reasoning? Andy On Fri, Dec 3, 2010 at 10:15 AM, Georg Ruß resea...@georgruss.de wrote: On 02/12/10 17:49:37, Andrew Agrimson wrote: I've been comparing results from kmeans() in R to PROC

[R] kmeans() compared to PROC FASTCLUS

2010-12-02 Thread Andrew Agrimson
Hello all, I've been comparing results from kmeans() in R to PROC FASTCLUS in SAS and I'm getting drastically different results with a real life data set. Even with a simulated data set starting with the same seeds with very well seperated clusters the resulting cluster means are still different.

Re: [R] draw categorical histogram

2010-12-01 Thread Andrew Miles
Try: plot (myCatVariable) Andrew Miles Department of Sociology Duke University On Dec 1, 2010, at 2:51 PM, phoebe kong wrote: Hi, Can someone tell me how to draw a histogram for the following summary? Richard Minnie Albert Helen Joe Kingston 1233 56 67

Re: [R] draw categorical histogram

2010-12-01 Thread Andrew Miles
=as.factor(x) plot(x) See also ?plot.factor Andrew Miles On Dec 1, 2010, at 4:06 PM, Jorge Ivan Velez wrote: Hi Phoebe, Try x - c(12, 33, 56, 67, 15, 66) names(x) - c('Richard','Minnie','Albert','Helen','Joe','Kingston') barplot(x, las = 1, space = 0) HTH, Jorge On Wed, Dec 1, 2010 at 2:51 PM

[R] Bayes factor for a Welch or Yuen t-test

2010-11-29 Thread Wilson, Andrew
Although I have located a number of solutions for the Student t-test (equal variances), I have been unable to find any code for calculating a Bayes Factor for a Welch (unequal variances) or Yuen (trimmed mean) t-test. I wonder if anyone could help me with this? Many thanks, Andrew Wilson

Re: [R] Counting

2010-11-16 Thread Andrew Miles
the number of samples without the outlier N.nooutlier = Total - count Andrew Miles On Nov 16, 2010, at 4:55 PM, ufuk beyaztas wrote: Hi dear all, i have a data (data.frame) which contain y and x coloumn(i.e. y x 1 0.58545723 0.15113102 2 0.02769361 -0.02172165 3

Re: [R] plot linear model problem

2010-11-16 Thread Andrew Miles
There may be an easier way to do this, but you could always just do it the long way. Ex. plot(residuals(test.lm)~fitted.values(test.lm)) Andrew Miles On Nov 16, 2010, at 5:01 PM, casperyc wrote: Hi all, Say I fit a linear model, and saved it as 'test.lm' Then if I use plot(test.lm

Re: [R] sum in vector

2010-11-14 Thread Andrew Dolman
tapply(price, market, sum) andydol...@gmail.com On 14 November 2010 13:02, lgpeco pavic.o...@gmail.com wrote: hy guys i have one question :) i have two vectors markets and price market - c(1, 5, 7, 9, 9, 6, 5, 4, 4, 3, 1, 2, 1) price - c(100, 20, 30, 10, 50, 23, 23, 33, 96, 6, 4, 38,

[R] goodness-of-fit test

2010-11-11 Thread Andrew Halford
(gf) : Chi-squared approximation may be incorrect Am I getting caught out because of zero counts or frequencies in my data? Andy -- Andrew Halford Ph.D Associate Research Scientist Marine Laboratory University of Guam Ph: +1 671 734 2948 [[alternative HTML version deleted

[R] save() with 64 bit and 32 bit R

2010-11-03 Thread Andrew Collier
. sorry, in retrospect this all seems rather idiotic, but i assumed that the data stored by save() would be compatible between 64 bit and 32 bit (there is no warning in the manual). thanks, andrew. __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] Multiple imputation for nominal data

2010-11-02 Thread Andrew Miles
at the bottom of the help page that appears by typing ?mi OR for mice ?mice mi is the newer package and has some useful control features, but as it is newer it still is under development. Andrew Miles On Nov 2, 2010, at 3:38 PM, John Sorkin wrote: I am looking for an R function

[R] penalized regression analysis

2010-10-25 Thread Andrew Halford
at lambda1 = 356.0856 L2 penalty = 234.7781 at lambda2 = 3.458605 coefficients (fitfinal) (Intercept)BC POC EXPFI 4.685739e+01 2.074521e-01 1.079459e-01 -1.373058e-05 -2.295339e+00 cheers Andy -- Andrew Halford Ph.D Associate

Re: [R] Dragging an .RData file into R on win-7 doesn't work?

2010-10-22 Thread Andrew Redd
to control it, but there is no reason to except to install the R auto completion files. My Suggestion, create a local library to keep your packages in. Save the location in your Rprofile file. Then there is no reason to ever run R as admin. -Andrew On Fri, Oct 22, 2010 at 3:16 AM, Tal Galili

[R] Problem exporting data using write.foreign

2010-10-20 Thread Andrew Miles
for variables so that they can be exported using write.foreign()? Thanks! Andrew Miles __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

Re: [R] Problem exporting data using write.foreign

2010-10-20 Thread Andrew Miles
what is happening, and how to isolate the offending variables. Andrew Miles On Oct 20, 2010, at 1:18 PM, Nordlund, Dan (DSHS/RDA) wrote: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Andrew Miles Sent: Wednesday, October 20

Re: [R] repeating an analysis

2010-10-18 Thread Andrew Halford
appropriate tree size. many thanks to all who answered Andy On Wed, Oct 13, 2010 at 10:30 AM, Phil Spector spec...@stat.berkeley.eduwrote: Andrew - I think answer = replicate(50,{fit1 - rpart(CHAB~.,data=chabun, method=anova, control=rpart.control

Re: [R] trouble installing R-patched (R-2.12.0) when TMPDIR is specified

2010-10-18 Thread Andrew Yee
I'm mortified to report that the location I set in TMPDIR was not a valid directory in the system I was using (I copied it from another system), so this is a mea culpa on my part! Andrew On Mon, Oct 18, 2010 at 7:46 AM, Prof Brian Ripley rip...@stats.ox.ac.uk wrote: On Sun, 17 Oct 2010, Andrew

[R] trouble installing R-patched (R-2.12.0) when TMPDIR is specified

2010-10-17 Thread Andrew Yee
]$ However, when I don't specify TMPDIR, it installs fine. Any suggestions/comments? Thanks, Andrew [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] Many Thanks

2010-10-15 Thread Andrew Miles
And thank YOU for taking the time to express your gratitude. I'm sure all those who regularly take the time to contribute to the list appreciate the appreciation. Andrew Miles On Oct 15, 2010, at 9:49 AM, Jumlong Vongprasert wrote: Dear R-help mailing list and software development team

Re: [R] R on a ma c

2010-10-14 Thread Andrew Miles
R works great on my Mac. In fact, the user interface in some ways seems to be more friendly (ex. you type an open parenthesis, it automatically includes a close parenthesis; color coding for coding files, etc.) Andrew Miles On Oct 14, 2010, at 2:49 PM, David Cross wrote: I have had

Re: [R] repeating an analysis

2010-10-13 Thread Andrew Halford
thanks Phil, I have your solution and another which I will attempt in the next day or so and will post results to the list then. cheers andy On Wed, Oct 13, 2010 at 10:30 AM, Phil Spector spec...@stat.berkeley.eduwrote: Andrew - I think answer = replicate(50,{fit1 - rpart(CHAB~.,data

[R] repeating an analysis

2010-10-12 Thread Andrew Halford
-- Andrew Halford Associate Researcher Marine Laboratory University of Guam Ph: +1 671 734 2948 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] how can i do anova

2010-10-11 Thread Andrew Miles
Type ?anova on your R command line for the basic function, and links to related functions. Also, try a google search of something like doing anova in R and you should find multiple tutorials or examples. Andrew Miles On Oct 11, 2010, at 11:33 AM, Mauluda Akhtar wrote: Hi, I've a table

Re: [R] using a package function inside another function

2010-10-07 Thread Andrew Miles
Try adding a statement at the beginning of your function: require(micEcon) See if that helps. Andrew Miles Department of Sociology Duke University On Oct 7, 2010, at 11:47 AM, Alison Callahan wrote: Hello all, I am trying to use the micEcon 'insertRow' function inside a function I have

[R] Assigning value to a vector from within a function

2010-10-06 Thread Andrew Barr
. Andrew Barr [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self

Re: [R] Sample size estimation for non-inferiority log-rank and Wilcoxon rank-sum tests

2010-09-27 Thread Andrew Miles
I haven't done much with the type of data you're working with, but here is a post that lists a few packages for doing sample size calculations in R. Perhaps one of them will be helpful. https://stat.ethz.ch/pipermail/r-help/2008-February/154223.html Andrew Miles On Sep 27, 2010, at 2:09 PM

Re: [R] statistic test plot

2010-09-27 Thread Andrew Miles
it probably doesn't know how to handle the type of data you are putting into it. Andrew Miles Department of Sociology Duke University On Sep 27, 2010, at 11:03 PM, Kie Kyon Huang wrote: Hi, I am a beginner in R and is trying to plot some dot plot from t test result. I was following

Re: [R] bptest

2010-09-25 Thread Andrew Miles
First load the package lmtest. Then run the bptest. library(lmtest) bptest(modelCH) You don't need to tell the function which variables are explanatory or dependent. Just give it the fitted model object, and it will sort all of that out and return the statistic. Andrew Miles Department

Re: [R] Multiple graph in one graph window

2010-09-25 Thread Andrew Miles
Another option is to use the par() command before executing a plot command, like so: par(mfrow=c(2,2)) plot(...) This will put the next four plots all in the same window. Andrew Miles Department of Sociology Duke University On Sep 24, 2010, at 10:28 PM, Dennis Murphy wrote: Which one do

[R] formatting data for predict()

2010-09-25 Thread Andrew Miles
! Andrew Miles Department of Sociology Duke University __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self

[R] Standard Error for difference in predicted probabilities

2010-09-24 Thread Andrew Miles
generate a SE for the difference in those predicted values? Thanks in advance! Andrew Miles [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

[R] as.Date() add a day to a date

2010-09-13 Thread Andrew Yee
have expected August 22. Thanks, Andrew sessionInfo() R version 2.11.1 Patched (2010-09-11 r52901) Platform: x86_64-unknown-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=C LC_MESSAGES

Re: [R] as.Date() add a day to a date

2010-09-13 Thread Andrew Yee
Thanks David, now I wonder how you can have as.Date() render the date using local time rather than UTC. Andrew On Mon, Sep 13, 2010 at 12:08 PM, David Winsemius dwinsem...@comcast.netwrote: On Sep 13, 2010, at 11:56 AM, Andrew Yee wrote: I'm trying to understand why as.Date() is converting

Re: [R] as.Date() add a day to a date

2010-09-13 Thread Andrew Yee
Henrique, thanks for your suggestion. For my applications, character would have been sufficient, so your suggestion of using format() works fine too. Perhaps I should submit a feature request for as.Date() to let you specify local time. Thanks, Andrew On Mon, Sep 13, 2010 at 2:06 PM, Henrique

Re: [R] Help request: highlighting R code on WordPress.com blogs

2010-09-09 Thread Andrew Redd
and underscores that is immediately followed by an open parentheses, or optionally by any number of spaces then an open parentheses /[\w._]+[ \t]*(?=\()/ -Andrew On Thu, Sep 9, 2010 at 1:01 PM, Yihui Xie x...@yihui.name wrote: Thanks, Tal. It does not look too difficult to write such a brush, which

[R] R CMD build --binary without option --use-zip-data

2010-08-20 Thread Andrew Liu
sample.txt and I want users to be able to get the filename by typing filename - system.file(data, sample.txt, package = pkgname) which they cannot do if it gets zipped. Is there a workaround? Thanks, Andrew __ R-help@r-project.org mailing list https

[R] Help with Lattice--panel.axis() and a conditioning variable

2010-08-03 Thread Andrew Liu
, limits = x.limits, axs = i, rot = 45), y = list(alternating = 3)), axis = axis.ob ) Thanks, Andrew __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

[R] Formatting datetime data for gantt.chart.

2010-07-30 Thread Andrew Noyes
Overall goal: I'd like to have a visual representation of when certain computer applications are running over the course of a day (data will come from a SQL query later, but I'm using a csv for now). My idea is to use a gantt chart, but I'm running into issues with the start and end time. I'm

[R] Multiple binomial tests on a large table

2010-07-29 Thread Wilson, Andrew
It is a two-tailed test, and P in all cases is 0.5. My question is: Is there a quicker way of running these tests without having to type an individual command for each test - and ideally also to store the resulting p-values in a single data vector? Many thanks for any pointers, Andrew Wilson

[R] repeating rows in R

2010-07-27 Thread Andrew Anglemyer
I'm somewhat a new user and have been trying to figure out how to repeat rows a certain number of time based on a variable. Currently, the number of rows is not reflective of the number of observations. To get the number of observations (n=22 in this case), I have to multiply by the variable

Re: [R] repeating rows in R

2010-07-27 Thread Andrew Anglemyer
2 23 2.1 23 2.2 23 3 34 3.1 34 3.2 34 3.3 34 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Andrew Anglemyer Sent: Wednesday, 28 July 2010 9:22 AM To: r-help@r-project.org Subject: [R

[R] Loading Rdata files in a Package

2010-07-25 Thread Andrew Leeser
, Andrew [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal

[R] Error using the mi package

2010-07-15 Thread Andrew Miles
, preprocess = FALSE) 1: mi(imp.data, info = info2, n.iter = 6, preprocess = FALSE) Andrew Miles __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

[R] Entropy of a Markov chain

2010-07-14 Thread Wilson, Andrew
, Andrew Wilson __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

[R] Changing model parameters in the mi package

2010-07-14 Thread Andrew Miles
, mask = mask, size = 0, skip = TRUE, softmax = TRUE, : too many (2608) weights System is Mac OS X 10.5.8, R version 2.9.2 Andrew Miles __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Changing model parameters in the mi package

2010-07-14 Thread Andrew Miles
that you want like so: info[[min.func]]$params$MaxNWts=3000 This will add the parameter MaxNWts to the min.func model. This seems to have solved the problem I outlined below. Andrew Miles On Jul 14, 2010, at 10:33 AM, Andrew Miles wrote: I am trying to use the mi package to impute data

[R] Subsetting Lists

2010-07-12 Thread Andrew Leeser
)) lst [[1]] [1] a b [[2]] [1] c [[3]] [1] d e [[4]] [1] f g I would like the output to be the following: output [1] b   NA e   g I know I can accomplish this using a for loop, but I am wondering if there's a simple and neat way of getting this done in one step? Thanks in advance. - Andrew

[R] Correct function name for text display of S4 object

2010-07-12 Thread Andrew Liu
The package already has show, summary, and plot methods. Is there a more conventional name than display for the above output, or is display as good as any other name? Thanks, Andrew __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] how to plot two histograms overlapped in the same plane coordinate

2010-07-09 Thread Andrew Miles
the axes of the histogram to give the histograms for males and females the same break points (i.e. where one bar stops and another begins). See ?hist for more information about that. Andrew Miles Department of Sociology Duke University On Jul 9, 2010, at 9:29 AM, Mao Jianfeng wrote: Dear R

[R] Loading text file from data folder of package

2010-07-07 Thread Andrew Liu
Hello, I am creating a package and in my vignette I would like to load a text file from the data folder of the package. Currently, I am doing the following: filepath - paste(.libPaths(), pkgname, data, sample.txt, sep = /) file(filepath) Is there a better way of doing this? Thanks, Andrew

[R] Trimming in R

2010-07-07 Thread Andrew Leeser
- sub( +$, , str) } While this function does seem to work, I am curious if there's anything built into R that I can use instead, as that would be preferable. Thanks in advance, Andrew [[alternative HTML version deleted]] __ R-help@r

[R] Error message using mi() in mi package

2010-07-06 Thread Andrew Miles
is happening, and can't see why I can sometimes impute a variable labeled as ordered- categorical and sometimes cannot. Thanks! Andrew Miles __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Error message using mi() in mi package

2010-07-06 Thread Andrew Miles
On Jul 6, 2010, at 1:30 PM, Peter Ehlers wrote: On 2010-07-06 10:37, Andrew Miles wrote: Hello! I get the following message when I run the mi() function from the mi package. Error while imputing variable: c3 , model: mi.polr Error in eval(expr, envir, enclos) : could not find function

Re: [R] Error message using mi() in mi package

2010-07-06 Thread Andrew Miles
On Jul 6, 2010, at 2:15 PM, Erik Iverson wrote: This looks suspiciously like a syntax problem. I would get my text editor to search for 'c14ordered' in the code. You might have missed some punctuation. -Peter Ehlers A good thought. I checked my own code (the stuff coding the data and

Re: [R] how to calculate summary statistics for each factor

2010-07-06 Thread Andrew Miles
You could try Summarize in the NCStats package, or aggregate in the epicalc package. Andrew Miles Department of Sociology Duke University On Jul 6, 2010, at 11:53 AM, karena wrote: I have a dataset like the following: subject class value 123110 1241

[R] Command Line Arguments

2010-07-01 Thread Bierbryer, Andrew
in. Thanks, Andrew Bierbryer [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

[R] Coloring axis labels on lattice xyplot

2010-07-01 Thread Andrew Liu
Hello, First let me apologize for replying/changing subject when I initially asked this question. Its my first time using a mailing list of any sort! I am trying to color particular labels on my lattice xyplot. For example: library(lattice) z = data.frame(x = 1:5) xyplot(x~x, z) Is there

[R] Coloring axis labels on Lattice xyplot.

2010-06-30 Thread Andrew Liu
Hello, I am trying to color particular labels on my lattice xyplot. For example: library(lattice) z = data.frame(x = 1:5) xyplot(x~x, z) Is there any way for me to make the 4 on the y-axis blue? Thanks, Andy __ R-help@r-project.org mailing list

[R] Getting started

2010-06-08 Thread Andrew Kelly
searched for it in case it put it somewhere other than 'temp' but I cannot find it. Can anybody tell me how to do this? Many thanks Andrew Kelly [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch

[R] Mid-P value for a chi-squared test

2010-06-01 Thread Wilson, Andrew
Can anyone tell me how to calculate a mid-p value for a chi-squared test in R? Many thanks, Andrew Wilson __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org

[R] predict.lda breaks when priors are specified

2010-05-16 Thread Andrew Redd
in model.frame.default(formula = Y ~ X, priors = c(0.95, 0.05),  :   variable lengths differ (found for '(priors)') --- Thanks, Andrew __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

<    1   2   3   4   5   6   7   8   >