Re: [R] capturing errors in Sweave

2010-03-01 Thread Sundar Dorai-Raj
Thanks for the input, but I don't want "try" in the Sweave output. I want the output to look just like it does in the console, as if an uncaptured error really did occur. --sundar On Mon, Mar 1, 2010 at 11:42 PM, Sharpie wrote: > > > Sundar Dorai-Raj-2 wrote: > > > > Hi, > > > > I'm writing a m

[R] sem package and growth curves

2010-03-01 Thread Daniel Nordlund
I have been working through the book "Applied longitudinal data analysis: modeling change and event occurrence" by Judith D. Singer and John B. Willett. I have been working examples using SAS and also using it as an opportunity for learning to use R for statistical analysis. I ran into some di

Re: [R] capturing errors in Sweave

2010-03-01 Thread Sharpie
Sundar Dorai-Raj-2 wrote: > > Hi, > > I'm writing a manual using Sweave and I want to be able to print errors > from > bad code. Here's an example: > > >= > MySqrt <- function(x) { > if (missing(x)) { > stop("'x' is missing with no default") > } > if (!is.numeric(x)) { > stop("'x

Re: [R] Keeping the order of data set when plotting

2010-03-01 Thread Jim Lemon
On 03/02/2010 01:53 PM, cosinenonqua wrote: I have a data frame with 3 columns and I want to order the entire list by one column and then plot. I used order() and it does order the data set but when I plot it is as if the set is as it was originally. I also can't figure out how to plot two sets

[R] plotting a subset of a time series

2010-03-01 Thread Erin Hodgess
Dear R People: I have the following time series and plot: > x <- ts(rnorm(50),start=2005,freq=12) > plot(x) > which works fine. I would like to plot a subset of that time series, which I did with: > plot(window(x,2005,2006.83)) Is there a better way to do this, please? Thanks, Erin -- Erin

[R] ANOVA "Types" and Regression models: the same?

2010-03-01 Thread Ravi Kulkarni
Hello, I think I am beginning to understand what is involved in the so-called "Type-I, II, ..." ANOVAS (thanks to all the replies I got for yesterday's post). I have a question that will help me (and others?) understand it better (or remove a misunderstanding): I know that ANOVA is really a sp

[R] capturing errors in Sweave

2010-03-01 Thread Sundar Dorai-Raj
Hi, I'm writing a manual using Sweave and I want to be able to print errors from bad code. Here's an example: >= MySqrt <- function(x) { if (missing(x)) { stop("'x' is missing with no default") } if (!is.numeric(x)) { stop("'x' should only be numeric") } if (x < 0) { stop("'

Re: [R] Keeping the order of data set when plotting

2010-03-01 Thread Dennis Murphy
Hi: order() simply returns the index vector that corresponds to the ordering, not the ordering per se. Besides, when you read in the data, Occupation is read in as a factor that will by default order the levels alphabetically. If you want a different ordering, you can redefine the factor; e.g., d

[R] Forced variable retention in regsubsets in 'leaps' package

2010-03-01 Thread James C. McGrath
Hi, In working with model selection algorithms in other stats packages, there are often the following type of selection procedures: 1) Forward selection: Variables are added one at a time, starting with the most significant [according to your selection criterion.] Variables are not removed.

Re: [R] Mainland "Equatorial Guinea" missing?

2010-03-01 Thread Moore, Louis
"Rio Muni" is recognized while "Equatorial Guinea:Rio Muni" is not. Thanks. Classification:  UNCLASSIFIED - Louis R. Moore, III Ph.D.    Senior Operations Researcher Phone: 310/393-0411 x7578 RAND,

Re: [R] rollapply - odd behaviour of NAs

2010-03-01 Thread Gabor Grothendieck
See the align= argument to rollapply. On Mon, Mar 1, 2010 at 4:37 PM, herr dittmann wrote: > Dear expeRts, > > The rollapply(tseries) function puzzles me. When applying a function over a > rolling window, I am getting NAs at odd places: > > dow <- get.hist.quote(instrument="^DJI", start="2010-02

Re: [R] Keeping the order of data set when plotting

2010-03-01 Thread jim holtman
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Can you provide the data and the commands that you were using. When providing the data, please use 'dput'. Most likely it might be because one of the th

Re: [R] two questions for R beginners

2010-03-01 Thread RICHARD M. HEIBERGER
>I would love to see a text oriented towards someone who has never used anything but Excel, but realizes >that to do science today you have to go beyond the "Data analysis" toolbar from Excel. >(Plese tell me if you know of any) >Best to all, >Keo. Please look at *R through Excel, *the book that E

[R] Keeping the order of data set when plotting

2010-03-01 Thread cosinenonqua
I have a data frame with 3 columns and I want to order the entire list by one column and then plot. I used order() and it does order the data set but when I plot it is as if the set is as it was originally. I also can't figure out how to plot two sets of data on the same graph. I have, Occupation

Re: [R] Smoothing Spline Basis Matrix

2010-03-01 Thread pinkdd
Thanks, Derek. I used your code, but H still has a lot of columns being 0. I'm not sure why. I'm dealing the data http://www-stat.stanford.edu/~tibs/ElemStatLearn/ with X=age, Y=spnbmd I think X has too many duplicated data??? I'll check the book you recommended in the library tomorrow. Thanks

[R] a question about Joint Model(JM)

2010-03-01 Thread 孟欣
Hell sir: I'm a user of JM and have a quesion. As to "JM: An R Package for the Joint Modelling of Longitudinal and Time-to-Event Data", on page14: fitSURV <- coxph(Surv(Time, death) ~ drug, data = aids.id, x = TRUE) I don't understand why use the dataset "aids.id", but not"aids" as follow: fitSU

Re: [R] identical() mystery

2010-03-01 Thread DarioAustralia
Thanks for your suggestions. A couple of useful functions in there I haven't heard of before. -- View this message in context: http://n4.nabble.com/identical-mystery-tp1573269p1574379.html Sent from the R help mailing list archive at Nabble.com. __ R-

[R] Simple Linear Autoregressive Model with R Language

2010-03-01 Thread Emil Davtyan
Hello - I need to do simple linear autoregressive model with R software for my thesis. I looked into all your documentation and I am not able to find anything too helpful. Can someone help me with the codes? Thanks Emil [[alternative HTML version deleted]] __

Re: [R] Smoothing Spline Basis Matrix

2010-03-01 Thread pinkdd
Thank you. D Sonderegger. Did you mean use bs <- bs(X, knots = spl$fit$knot) H <- predict(bs, X) Then H should be the matrix for the original data under the smoothing spline basis? However, another problem arises, since I need to use H to estimate the coefficient beta, which involves (H'H)^{-

[R] the predict.lda function

2010-03-01 Thread Diana Connett
Hello. I just downloaded R onto a new computer, and after entering library(MASS), I still get the message "Error: could not find function "predict.lda"" when I try to use the predict.lda function (even just "predict.lda()") Can anyone help me out? Thank you! Diana Connett ___

Re: [R] two questions for R beginners

2010-03-01 Thread Tony B
Background: During my uni days, I was taught to use MAPLE, MATLAB, SPSS, SAS, C++ and Java. Then after uni, several years went by without me ever using any of them again and was told to just use Excel. Then I started my PhD and was told I should start using R instead (something I'd never even heard

[R] rollapply - odd behaviour of NAs

2010-03-01 Thread herr dittmann
Dear expeRts, The rollapply(tseries) function puzzles me. When applying a function over a rolling window, I am getting NAs at odd places: dow <- get.hist.quote(instrument="^DJI", start="2010-02-01", quote="Close") dow.2 <- rollapply(dow, width=2, FUN=mean) dow.3 <- rollapply(dow, width=3, FUN=me

[R] bigglm Memory Issues

2010-03-01 Thread Ian Renner
Hi all, I'm somewhat of a novice in terms of programming, so I thought I'd come here to seek some help with an issue I'm having. I'm trying to model a glm using bigglm, but in spite of my best efforts, I cannot get it to work! Here is the particular line of code that is giving me trouble: >mo

Re: [R] Mainland "Equatorial Guinea" missing?

2010-03-01 Thread Ray Brownrigg
On Tue, 02 Mar 2010, Duncan Murdoch wrote: > On 01/03/2010 10:31 AM, more wrote: > > In the World map, mainland "Equatorial Guinea" seems to be missing > > although two offshore parts, "Equatorial Guinea:Annobon" and "Equatorial > > Guinea:Fernando Po", are present. I'd like to be able to fill

Re: [R] Emacs for R

2010-03-01 Thread David Cross
There exist a number of resources on the web for ESS, which one can find easily with a Google search on "Emacs Speaks Statistics." Three articles that did not turn up in my search just now are: A. J. Rossini et al. Emacs Speaks Statistics ..., Unpublished, 2001, University of Washington (r

Re: [R] repeated measures anova, car package

2010-03-01 Thread John Fox
Dear Kay, > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Kay Cichini > Sent: March-01-10 10:45 AM > To: r-help@r-project.org > Subject: [R] repeated measures anova, car package > > > Hello list, > > I' d very much appreciat

Re: [R] two questions for R beginners

2010-03-01 Thread Keo Ormsby
Liviu Andronic escribió: On 3/1/10, Keo Ormsby wrote: Perhaps my biggest problem was that I couldn't (and still haven't) seen *absolute beginners* documents. Perhaps http://www.r-tutor.com/? Also recently a webinar on R [2] was held and it hosts complete course notes and recordings. O

Re: [R] Type-I v/s Type-III Sum-Of-Squares in ANOVA

2010-03-01 Thread John Fox
Dear Ravi, I always hesitate to address this question because it seems to generate much more heat than light. I know that you've been told that the question has been asked and answered on the list before, but simply to point to unilluminating answers isn't helpful, I believe. It's also hard to ans

Re: [R] Reading sas7bdat files directly

2010-03-01 Thread Roger DeAngelis(xlr82sas)
Hi, It looks like we may need to swap bytes(little endian to big endian). I will look into it tonight. As a side note, SAS reserves 28 floats for missing values. It should be easy to convert these to NaN on input to R. You can test this in SAS by converting the 16 char floats to ieee8. in S

Re: [R] Reading sas7bdat files directly

2010-03-01 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Roger DeAngelis(xlr82sas) > Sent: Monday, March 01, 2010 4:38 PM > To: r-help@r-project.org > Subject: Re: [R] Reading sas7bdat files directly > > > Hi All, > > The hack below

Re: [R] Stack type

2010-03-01 Thread Duncan Murdoch
On 01/03/2010 7:56 PM, Worik R wrote: How can I implement a stack in R? I want to push and pop. Every thing I push and pop will be the same type, but not necessarily an atomic type. Use lexical scoping: stack <- function() { store <- list() push <- function(item) { store <<- c(list(i

[R] Stack type

2010-03-01 Thread Worik R
How can I implement a stack in R? I want to push and pop. Every thing I push and pop will be the same type, but not necessarily an atomic type. cheers Worik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do re

Re: [R] Reading sas7bdat files directly

2010-03-01 Thread Roger DeAngelis(xlr82sas)
Hi All, The hack below might help R users get going with Chris's DSREAD. I have not had a chance to look at Monday's version of DSREAD, can't wait. Note Duncan Murdoch was most gracious to supply me with a R function to translate floats in 16 char hex to R floats. Your utility solves the 200

Re: [R] Saving multiple plots named with part of the original file name

2010-03-01 Thread jim holtman
You need to differentiate between the file names. Try concatentating on the source file: using 'paste' filenames<-dir("C:/Documents and Settings/tfish/Desktop/R/Untilted Data") for(i in filenames){data<- read.csv(i, header = TRUE, skip = 13, sep = ",") hist(data$X.mm.[data$SPP=="RBT"],breaks=seq(

Re: [R] Calling SAS from R

2010-03-01 Thread Yen Lee
Thanks for all insightful replies. I've solved the problem by using the code as following, system('"C:\\Program Files\\SAS\\SAS 9.1\\sas.exe" C:/entropy/output7/scale/syntax.sas') Thanks for you all. Yen Lee -Original Message- From: Uwe Ligges [mailto:lig...@statistik.tu

Re: [R] Method dispatch

2010-03-01 Thread Martin Morgan
On 03/01/2010 03:35 PM, Zhang,Yanwei wrote: > Dear Martin, > > Thanks a lot for your reply. I do have a namespace and it does seem > to be a namespace problem. But this time, it's getting even stranger: > > My package name is ChainLadder: > >> library(ChainLadder) > >> sessionInfo() > R versio

[R] Saving multiple plots named with part of the original file name

2010-03-01 Thread Teresa Fish
Hello All, I am trying to open all files within a folder and create multiple histograms from each file, *and* have it save with the original file name plus some new information. The way I have it set up right now, I keep saving over each new graph. I can turn the history on and see them all, but I

Re: [R] two questions for R beginners

2010-03-01 Thread Liviu Andronic
On 3/1/10, Keo Ormsby wrote: > Perhaps my biggest problem was that I couldn't (and still haven't) seen > *absolute beginners* documents. > Perhaps http://www.r-tutor.com/? Also recently a webinar on R [2] was held and it hosts complete course notes and recordings. Otherwise, there was once a link

Re: [R] Method dispatch

2010-03-01 Thread Zhang,Yanwei
Dear Martin, Thanks a lot for your reply. I do have a namespace and it does seem to be a namespace problem. But this time, it's getting even stranger: My package name is ChainLadder: > library(ChainLadder) > sessionInfo() R version 2.10.1 (2009-12-14) i386-pc-mingw32 locale: [1] LC_COLLATE=

Re: [R] two questions for R beginners

2010-03-01 Thread Keo Ormsby
Patrick Burns escribió: * What were your biggest misconceptions or stumbling blocks to getting up and running with R? * What documents helped you the most in this initial phase? I especially want to hear from people who are lazy and impatient. Feel free to write to me off-list. Definitely wri

Re: [R] GPC file

2010-03-01 Thread Jim Lemon
On 03/02/2010 04:00 AM, ogbos okike wrote: Hi, I have a tar.gz file. Using $tar -xzvf 'filename', I untarred the file. However, I found that the content is .PGC files (e.g. ISCCP.D2.0.GLOBAL.1983.07.99..GPC ). I have tried to search for analysis of gpc data file in R. I have not been success

Re: [R] two questions for R beginners

2010-03-01 Thread Ted Harding
On 01-Mar-10 22:44:22, Jim Lemon wrote: > On 03/02/2010 02:02 AM, Karl Ove Hufthammer wrote: >>... >> Of course I agree that 'the idea of a list is so fundamental to R that >> it needs to be something learned pretty early', but is there any harm >> in >> slightly 'blur[ing] the distinction between

Re: [R] Method dispatch

2010-03-01 Thread Martin Morgan
On 03/01/2010 01:31 PM, Zhang,Yanwei wrote: > Dear all, > > In a package, I defined a method for "summary" using setMethod(summary, signature="abc") for my class "abc", but when the package is loaded, the function "summary(x)" where x is of class "abc" seems to have called the default summary func

Re: [R] R help question: How can we enable useRs to contribute corrections to help files faster ?

2010-03-01 Thread Charlie Sharpsteen
On Mon, Mar 1, 2010 at 2:46 PM, Duncan Murdoch wrote: > > That's a good point.  Okay, I'll add it (with some sort of addition to the > man page to say how it's intended to be used), and perhaps with some special > casing for base packages. > > Duncan Murdoch If it is being added, could you chan

Re: [R] two questions for R beginners

2010-03-01 Thread Jim Lemon
On 03/02/2010 02:02 AM, Karl Ove Hufthammer wrote: ... Of course I agree that 'the idea of a list is so fundamental to R that it needs to be something learned pretty early', but is there any harm in slightly 'blur[ing] the distinction between dataframes and matrices', as a convenience to the user

Re: [R] Generating variable from 2 others in dataframe

2010-03-01 Thread Bert Gunter
You have to nest the ifelse's: test$hhtype <- with(test, ifelse(eif==1,1,ifelse(year<2000,2,3))) Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of o.mann...@auckland.ac.nz Sent: Mon

Re: [R] Reading sas7bdat files directly

2010-03-01 Thread Chris Long
dsread (http://www.oview.co.uk/dsread) was updated yesterday, to include various new features as suggested here and elsewhere. Of particular interest might be: - you can now use the /c and /v options together to get dataset contents in CSV format for easier importing; - there is now a /l option

[R] Generating variable from 2 others in dataframe

2010-03-01 Thread o.mann...@auckland.ac.nz
Suppose I have the following dataframe called test: test<-data.frame(year=rep(1990:2003,5),id=gl(5,length(1990:2003)),eif=as.vector(sapply(1:5,function(z){a<-rep(0,length(1990:2003));a[sample(1:length(1990:2003),sample(1:2,1))]<-1;a}))) year id eif 1990 1 0 1991 1 0 1992 1 0 2000 1 1

[R] Simulation conference -- possible R opportunity

2010-03-01 Thread Prof. John C Nash
I have been talking with Gabriel Wainer about the possibility of some community building with R and simulation workers. The conference announced below is just before UseR (but in that capital to the north of Washington). If anyone on this list is participating or thinking of participating, perh

Re: [R] Changepoints estimation in a data series

2010-03-01 Thread Bert Gunter
RSiteSearch("segmented regression") Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of FMH Sent: Monday, March 01, 2010 1:17 PM To: r-help@r-project.org Subject: [R] Changepoints esti

[R] Method dispatch

2010-03-01 Thread Zhang,Yanwei
Dear all, In a package, I defined a method for "summary" using setMethod(summary, signature="abc") for my class "abc", but when the package is loaded, the function "summary(x)" where x is of class "abc" seems to have called the default summary function for "ANY" class. Shouldn't it call the met

[R] Changepoints estimation in a data series

2010-03-01 Thread FMH
Dear All, I'm trying to find changepoints in a data series  which only consist of  11 measurements of altitude(x) and temperature(y), respectively, in which the data are as followed: y = 16.3, 16.2, 16.1, 15.6, 14.2, 10, 8.2,  8.0, 7.5, 7.3, 7.2 x = 1,  2,  5, 10, 15, 20, 25, 30, 40, 50, 60 >F

Re: [R] Smoothing Spline Basis Matrix

2010-03-01 Thread D Sonderegger
Close, but not quite. Your design matrix is: H <- bs(X, knots=spl$fit$knot, intercept=TRUE) So long as you have data in all of the inter-knot regions, you should be ok. A good book to check out about this sort of thing is Ruppert, Wand and Carroll's Semiparametric Regression book. I can't reco

[R] Short Course: Predictive Modeling with R

2010-03-01 Thread Max Kuhn
I will be teaching a short course at the Midwest Biopharmaceutical Statistics Workshop called "Predictive Modeling in R". The four hour course is on Monday, May 24th. The course covers modeling strategies where prediction is the main goal (e.g. machine learning, pattern recognition, etc). R will b

Re: [R] Advice wanted on using optim with both continuous and discrete par arguments...

2010-03-01 Thread Jeffrey Racine
Hi Ravi. Many thanks. My problem is a mixed integer quadratic programming one (the objective function is a sum of squared jackknife residuals), so not fully DTOP. However, the only package I see that can handle this is Rcplex that would not be to my tastes as it is commercial. Pointers to R co

Re: [R] two questions for R beginners

2010-03-01 Thread Peter Alspach
> On 01/03/2010 9:19 AM, John Sorkin wrote: > If it looks like a duck and quacks like a duck, it ought to > behave like a duck. > This brings up another confusion for new users. Simply typing the object name at the command line gives just one view of the object (that provided by print()). Rea

Re: [R] Error in sink("output.txt") : sink stack is full

2010-03-01 Thread Amy Hessen
Hi Phil, Thank you so much for your reply.I’m writing to one file only and this is the code: sink(“output.txt”).Do you suggest adding this line:Sink()?could you please tell me what is the function of :outputrdata<-“output.rdata”Cheers,Amy> Date: Sun, 28 Feb 2010 11:22:29 -0800 > From: spec...@s

Re: [R] wrap long lines in table using "latex" in Hmisc

2010-03-01 Thread Sharpie
Tao Shi wrote: > > > Thank you guys for the wonderful suggestions! > > Charlie, > > You obviously foresaw my problem!   It took me a while to figure out that > the \raggedright and other justification commands should be applied to > each cell.  It didn't work for me when applied to the headin

[R] S4 issues

2010-03-01 Thread Zhang,Yanwei
Dear all, I ran into some issues that I've been trying to figure out for weeks but with no success. So I'm looking for some advice here. I've the following questions: 1. I want to write some S4 classes and methods and add them into a current package that was written in S3. Is this possible? Ca

Re: [R] wrap long lines in table using "latex" in Hmisc

2010-03-01 Thread Tao Shi
Thank you guys for the wonderful suggestions! Charlie, You obviously foresaw my problem!   It took me a while to figure out that the \raggedright and other justification commands should be applied to each cell.  It didn't work for me when applied to the headings.  See this nice document here:

Re: [R] Advice wanted on using optim with both continuous and discrete par arguments...

2010-03-01 Thread Ravi Varadhan
I know that Matlab can solve this problem, but I didn't mention it in my previous email since OP had asked for "native to R" solutions. Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Geronto

Re: [R] Estimate ARMA model with MLE

2010-03-01 Thread Yi Du
I have been looking at arima package. And I also find that package fracdiff and package fArma could also do the same thing. But when I looked at the result, it always include the intercept. I don't know how I can exclude the intercept based on the package above. Or is there any more package to do t

Re: [R] Thougt I understood factors but??

2010-03-01 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Nicholas Lewin-Koh > Sent: Monday, March 01, 2010 9:08 AM > To: r-help@r-project.org > Subject: [R] Thougt I understood factors but?? > > Hi, > consider the following > > a<-gl(

Re: [R] Emacs for R

2010-03-01 Thread Steve Lianoglou
Hi all, Thanks for the info ... I think I had emacs 21 + ess originally, and didn't know about ctrl-g trick. I'll try those next time I looking into ESS. Thanks again, -steve On Mon, Mar 1, 2010 at 1:37 PM, RICHARD M. HEIBERGER wrote: >> so if I ran an R command that took a >> long while to co

Re: [R] Thougt I understood factors but??

2010-03-01 Thread Liaw, Andy
From: David Winsemius > > On Mar 1, 2010, at 12:07 PM, Nicholas Lewin-Koh wrote: > > > Hi, > > consider the following > >> a<-gl(3,3,9) > >> a > > [1] 1 1 1 2 2 2 3 3 3 > > Levels: 1 2 3 > >> levels(a)<-3:1 > > That may look like the same re-ordered factor but you instead merely > re-labeled e

Re: [R] Advice wanted on using optim with both continuous and discrete par arguments...

2010-03-01 Thread Ravi Varadhan
Hi Uwe & Jeff, It seems to me that Jeff's problem falls under the class of "mixed-integer nonlinear programming" (MINLP) problem. I would classify this as a "damn tough optimization problem" (DTOP!). I am not sure if there is any R package that can handle this or there is any R link to a comm

Re: [R] Thougt I understood factors but??

2010-03-01 Thread David Winsemius
On Mar 1, 2010, at 12:07 PM, Nicholas Lewin-Koh wrote: Hi, consider the following a<-gl(3,3,9) a [1] 1 1 1 2 2 2 3 3 3 Levels: 1 2 3 levels(a)<-3:1 That may look like the same re-ordered factor but you instead merely re-labeled each level where the internal numbers that represent the f

Re: [R] Mainland "Equatorial Guinea" missing?

2010-03-01 Thread Duncan Murdoch
On 01/03/2010 10:31 AM, more wrote: In the World map, mainland "Equatorial Guinea" seems to be missing although two offshore parts, "Equatorial Guinea:Annobon" and "Equatorial Guinea:Fernando Po", are present. I'd like to be able to fill the mainland piece. How can I correct this? Thanks.

Re: [R] need help to resolve RODBC error

2010-03-01 Thread Marc Schwartz
Hi, The error that you first posted indicates a segfault (memory segmentation fault), which is the result of C (or other compiled) code that has gone awry. Typically it involves compiled code using pointers to a location in memory that the application should not be trying to access. Ideally, on

Re: [R] two questions for R beginners

2010-03-01 Thread Duncan Murdoch
On 01/03/2010 11:33 AM, hadley wickham wrote: > Suppose X is a dataframe or a matrix. What would you expect to get from > X[1]? What about as.vector(X), or as.numeric(X)? > > The point is that a dataframe is a list, and a matrix isn't. If users don't > understand that, then they'll be confused

Re: [R] Estimate ARMA model with MLE

2010-03-01 Thread Owe Jessen
Did you have a look at the package arima? HTH Owe Hi there, I want to fit a ARMA model with the method of MLE. Is there any package that could implement this method? Thanks, Yi [[alternative HTML version deleted]] __ R-help@r-project.org

[R] Thougt I understood factors but??

2010-03-01 Thread Nicholas Lewin-Koh
Hi, consider the following > a<-gl(3,3,9) > a [1] 1 1 1 2 2 2 3 3 3 Levels: 1 2 3 > levels(a)<-3:1 > a [1] 3 3 3 2 2 2 1 1 1 Levels: 3 2 1 > a<-gl(3,3,9) > factor(a,levels=3:1) [1] 1 1 1 2 2 2 3 3 3 Levels: 3 2 1 It is probably something obvious I missed, but reading the documentation of factor, an

Re: [R] need help to resolve RODBC error

2010-03-01 Thread Yan Zhang
One more addition: The Linux server I'm working on already has 10.2.0.4 oracle Enterprise version installed and an oracle database is running on the machine. So there shouldn't be need for oracle instance client. -Original Message- From: Yan Zhang Sent: Monday, March 01, 2010 10:06 AM

Re: [R] Emacs for R

2010-03-01 Thread RICHARD M. HEIBERGER
> > so if I ran an R command that took a > long while to complete, I couldn't switch back to my source buffer and > keep messing around with my code while the R process was doing > whatever it was doing. > Normally Ctrl-G gives control back to you while the R process is still running. [[al

Re: [R] How to Find Version of Installed Library?

2010-03-01 Thread David Winsemius
On Mar 1, 2010, at 12:58 PM, Lorenzo Isella wrote: Dear All, Sorry for the trivial question, but if you are using Linux and want to know the version of your installed libraries, what are you supposed to do? library() just tells you what R libraries you have installed on your system, but n

Re: [R] Emacs for R

2010-03-01 Thread Ista Zahn
Hi Steve, I don't have that issue with emacs 23.1, ess 5.6.1, and R 2.10 on OpenSuse 11.1. eldoc doesn't work until the current evaluation is complete, but I'm able to edit my scripts files. So there is a way to avoid the problem you describe (seems to work be default with my setup). -Ista On Mo

Re: [R] How to Find Version of Installed Library?

2010-03-01 Thread Liviu Andronic
On 3/1/10, Lorenzo Isella wrote: > Sorry for the trivial question, but if you are using Linux and want to know > the version of your installed libraries, what are you supposed to do? > Load the package and then sessionInfo(). Liviu __ R-help@r-project.

Re: [R] How to Find Version of Installed Library?

2010-03-01 Thread Uwe Ligges
On 01.03.2010 18:58, Lorenzo Isella wrote: Dear All, Sorry for the trivial question, but if you are using Linux and want to know the version of your installed libraries, I think you mean the version of your installed *packages*, since R libraries do not have version numbers. what are yo

[R] How to Find Version of Installed Library?

2010-03-01 Thread Lorenzo Isella
Dear All, Sorry for the trivial question, but if you are using Linux and want to know the version of your installed libraries, what are you supposed to do? library() just tells you what R libraries you have installed on your system, but not their version number. Cheers Lorenzo ___

Re: [R] Converting IEEE Float in 16 char hex back to float

2010-03-01 Thread Roger DeAngelis(xlr82sas)
Hi, DSREAD utility solves the 200 byte, 8 char name and potential precision errors with other methods of transfering SAS datasets to perl and R. Importing SAS datasets(sas7bdat) into R (32 bit windows 2000, 32 bit SAS 9.2 and 32 bit R version 2.9.0 (2009-04-17) Here is what I want to

Re: [R] Advice wanted on using optim with both continuous and discrete par arguments...

2010-03-01 Thread Uwe Ligges
On 01.03.2010 18:34, Jeffrey Racine wrote: Thanks Uwe. I appreciate your feedback.. in the paragraph in my email beginning "The problem..." Whoops, apologies, I was too quickly reading your message, apparently. CCing R-help to add: There is the Optimization Task View on CRAN: http://cran.r

Re: [R] Emacs for R

2010-03-01 Thread Steve Lianoglou
Hi, Sorry to semi-hijack this thread, but this is a question that's been burning for a while and, well, I think it's still relevant to this discussion :-) I tried using Emacs/ESS when I first started playing with R (and bioconductor). My problem with it was that I believe R is started in the same

Re: [R] Naming output of a for loop

2010-03-01 Thread Steve Lianoglou
Hi Kevin, On Mon, Mar 1, 2010 at 12:30 PM, Kevin Long wrote: > Hello R users, > > I am new to R and am having difficulty with the output of my "for" loops. I > have written a function to perform a linear regression on multiple files, > but when I use the "print()" function to look at my results,

[R] Naming output of a for loop

2010-03-01 Thread Kevin Long
Hello R users, I am new to R and am having difficulty with the output of my "for" loops. I have written a function to perform a linear regression on multiple files, but when I use the "print()" function to look at my results, it is not specified from which data set the regression was done on. I wo

Re: [R] Advice wanted on using optim with both continuous and discrete par arguments...

2010-03-01 Thread Uwe Ligges
On 01.03.2010 16:34, Jeffrey Racine wrote: Dear R users, I have a problem for which my objective function depends on both discrete and continuous arguments. The problem is that the number of combinations for the (multivariate) discrete arguments can become overwhelming (when it is univariat

Re: [R] help with lattice boxplots...

2010-03-01 Thread Walmes Zeviani
In complement to Dallazuanna's solution, use box.umbrella=list() inside par.settings() to change the default color and line type specification: bwplot(y~x, data=ex, pch="|", par.settings=list(box.rectangle=list(col="black"), box.umbrella=list(lty=1, col="black")) ) Sincer

Re: [R] integration function

2010-03-01 Thread Uwe Ligges
On 01.03.2010 17:09, li li wrote: Hi all, I have some problem regarding the integration function. Can any one take a look at the following and give me some help? Thank you in advance! Hannah ## f0 is a function of r,x, and y f0<- function(r, x, y){ pnorm((x-sqrt(r

Re: [R] setting the steps for x axis labels on plot

2010-03-01 Thread Gonzalo Garcia-Perate
Thank you both for your help, axis did the trick very nicely. On 1 March 2010 11:34, Chuck Cleland wrote: > On 3/1/2010 6:16 AM, Gonzalo Garcia-Perate wrote: >> Hello, I'm new to R, I've been working with it for the last 2 weeks. I >> am plotting some data and not getting the labels on the x axis

Re: [R] Bartlett Test

2010-03-01 Thread David Winsemius
On Mar 1, 2010, at 12:12 PM, Amit Patel wrote: Apparently the vectors that I have are lists Then unlist them. and when I try to conduct the Bartlett test I am getting errors. I may be using it wrong. I am not an R expert> xbartlett2 <- c(Samp1,Samp2) #Samp1 & 2 are lists gbartlett24 <- c

Re: [R] variable substitution in for loops

2010-03-01 Thread Uwe Ligges
On 01.03.2010 14:27, Jon Erik Ween wrote: Friends First, thanks to all for great feed-back. Open-source rocks! I have a workable solution to my question, attached below in case it might be of any use to anyone. I'm sure there are more elegant ways of doing this, so any further feedback is w

[R] Estimate ARMA model with MLE

2010-03-01 Thread Yi Du
Hi there, I want to fit a ARMA model with the method of MLE. Is there any package that could implement this method? Thanks, Yi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] help with zoo

2010-03-01 Thread Gabor Grothendieck
I am not sure if you are looking for a method to relabel your time points or a method to insert NAs. If you are looking for relabeling of time points that gives an even number of weeks per year which is the same every year then time distortion is inevitable. For example, we can assume 53 weeks a

Re: [R] Bartlett Test

2010-03-01 Thread Amit Patel
Apparently the vectors that I have are lists and when I try to conduct the Bartlett test I am getting errors. I may be using it wrong. I am not an R expert> xbartlett2 <- c(Samp1,Samp2) #Samp1 & 2 are lists gbartlett24 <- c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2,

Re: [R] Emacs for R

2010-03-01 Thread Uwe Ligges
For a quick low level introduction, I found John Fox' web page for his book "An R and S-PLUS Companion to Applied Regression" useful: http://socserv.mcmaster.ca/jfox/Books/Companion/ESS/ Uwe Ligges On 01.03.2010 17:41, Gustave Lefou wrote: Dear all, From the recent discussion, I have wonder

Re: [R] Gradient Boosting Trees with correlated predictors in gbm

2010-03-01 Thread Max Kuhn
In theory, the choice between two perfectly correlated predictors is random. Therefore, the importance should be "diluted" by half. However, this is implementation dependent. For example, run this: set.seed(1) n <- 100 p <- 10 data <- as.data.frame(matrix(rnorm(n*(p-1)), nrow = n)) dat

[R] GPC file

2010-03-01 Thread ogbos okike
Hi, I have a tar.gz file. Using $tar -xzvf 'filename', I untarred the file. However, I found that the content is .PGC files (e.g. ISCCP.D2.0.GLOBAL.1983.07.99..GPC ). I have tried to search for analysis of gpc data file in R. I have not been successful to get a good tip. I would be pleased if

Re: [R] file reading /problems with encoding

2010-03-01 Thread Uwe Ligges
R is not able to re-encode the file to the native encoding. But if you keep it in UTF-8, what is the problem to grep for the specific characters (as grep and friends support the argument useBytes these days)? Best, Uwe Ligges On 01.03.2010 17:15, t.wun...@stud.uni-heidelberg.de wrote: Hello

Re: [R] help with lattice boxplots...

2010-03-01 Thread Henrique Dallazuanna
Try this: bwplot(y~x, data=ex, pch = "|", par.settings = list(box.rectangle = list(col = 'black'))) On Mon, Mar 1, 2010 at 1:09 PM, Kim Jung Hwa wrote: > Hi All, > > I need a small help with following code: I'm trying to convert "dashed > lines" to regular ones; and changing default "bl

Re: [R] Type-I v/s Type-III Sum-Of-Squares in ANOVA

2010-03-01 Thread Liviu Andronic
On 3/1/10, Ravi Kulkarni wrote: > My questions: 1) exactly what is the difference between the two types of > sums-of-squares? > You might also want to read this [1]. [1] http://www.stats.ox.ac.uk/pub/MASS3/Exegeses.pdf Liviu __ R-help@r-project.org

[R] [R-pkgs] NEW: extracat - a package for the visualization of categorical data

2010-03-01 Thread Alexander Pilhöfer
Dear useRs, my new package extracat is now available from CRAN. It provides extensions to mosaicplots and parallel coordinates plots for the visualization of categorical data. The new member of the mosaicplot family is called rmb-plot and it visualizes the factorization of the absolute frequen

  1   2   3   >