Re: [R] Help with dudi.pca

2009-01-23 Thread Mark Difford
Hi Michael, >> > coinertia(op.dudi, em3.dudi) >> Error in paste("COCA", 1:n.axes, sep = " ") : element 2 is empty; Something makes me think that this is not the full error message, or the correct error message, or that you have something else in your call to coinertia? Why? Because you al

Re: [R] Problem with colormodel in pdf driver

2009-01-23 Thread Prof Brian Ripley
'gray' is what is in the code: 'grey' uses rgb -- just look at the pdf produced. The issue is that the wrong ('stroke' not 'fill') colour is set in ht 'gray' colormodel. On Fri, 23 Jan 2009, David Winsemius wrote: Try changing the color to "grey". Despite the help pages saying this: colorm

Re: [R] R startup and shutdown question

2009-01-23 Thread Dr. S. B. Nguah
Hi, ?.First ?.Last Sammy Philip James Smith wrote: > > Hi R-Community: > > > Here is what I want to do: > > > Every time I start R I want R to: > > > 1. remove(list=ls()), and > > 2. "source" another file automatically. > > > Then, when I shutdown R, I want R to: > > > 1. remov

Re: [R] how to prevent duplications of data within a loop

2009-01-23 Thread Jorge Ivan Velez
Dear Juliet, Why don't you use *apply() instead a for() loop? Here is a starting point: > apply(myData[,-1],2,function(x) coefficients(lm(response~x))) var1 var2 var3 (Intercept) 0.10438369 0.10415221 0.1176728 x -0.03354243 0.02429041 -0.2240759 Note

[R] how to prevent duplications of data within a loop

2009-01-23 Thread Juliet Hannah
Hi All, I had posted a question on a similar topic, but I think it was not focused. I am posting a modification that I think better accomplishes this. I hope this is ok, and I apologize if it is not. :) I am looping through variables and running several regressions. I have reason to believe that

Re: [R] Problem with colormodel in pdf driver

2009-01-23 Thread Jorge Ivan Velez
Hi Luis, Following David's suggestion, it worked for me: pdf('exp.pdf',colormodel='grey') # Note the change here :) barplot(table(subset(iris,Petal.Width>1)$Species)) dev.off() Here is my session info: > sessionInfo() R version 2.8.1 Patched (2009-01-01 r47434) i386-pc-mingw32 locale: LC_COLLA

[R] Help with dudi.pca

2009-01-23 Thread Michael Kubovy
Dear R-helpers, I have two data frames, op and em4: > str(op) 'data.frame': 37 obs. of 5 variables: $ m: num 0.202 0.336 0.122 0.139 0.14 ... $ lln : num 0.798 0.643 0.863 0.835 0.823 ... $ rrn : num 0.789 0.702 0.894 0.895 0.923 ... $ asym2: num 0.177 0.304 0.108 0.187 0.274

Re: [R] Problem with colormodel in pdf driver

2009-01-23 Thread David Winsemius
Try changing the color to "grey". Despite the help pages saying this: colormodel a character string describing the color model: currently allowed values are "rgb", "gray" and "cmyk". Defaults to "rgb". I got the expected behavior by making the "gray" -> "grey" change on my Mac OS 10.5.6/R2.

Re: [R] Environment change?

2009-01-23 Thread David Winsemius
Those are not screen output from objects of the same type. The first one is being displayed as a character type and the second series of values appears to be a numeric vector. You called it a "lsit". In R a list is a specific data structure and neither of these appear to be displayed in a m

Re: [R] dimnames in pkg "ipred"

2009-01-23 Thread David Winsemius
I can well imagine that having all those variable names with "=" in them could create a problem. > str(traindat.bin) 'data.frame': 5414 obs. of 98 variables: $ SOIL_UNIT : Factor w/ 82 levels "17b","19a","19b",..: 1 1 1 1 1 1 1 1 1 1 ... $ GEOL_UNI

[R] Build Error on Opensolaris iconvlist

2009-01-23 Thread Karun Gahlawat
Hi! Trying to build R-2.8.1. while configuring, it throws error ./configure checking iconv.h usability... yes checking iconv.h presence... yes checking for iconv.h... yes checking for iconv... yes checking whether iconv accepts "UTF-8", "latin1" and "UCS-*"... no checking for iconvlist... no con

Re: [R] help

2009-01-23 Thread David Winsemius
There is a copula package and a tutorial entitled something along the lines of "The Joy of Copulas". -- David Winsemius On Jan 22, 2009, at 10:30 PM, allen lou wrote: hi everyone, Please help me to calculate copula in R . I already have the data but I don't know how to manipulate i

[R] Environment change?

2009-01-23 Thread PDXRugger
So i have a simple question that doesnt require sample code, not sure if that violates posting rules or not. Is this: [1] "111" "112" "113" "114" "115" "116" "118" "119" "120" "123" "125" "126" [13] "127" "128" "132" "137" "138" "139" "140" "143" "149" "154" "156" "157" [25] "158" "164" "165"

[R] ggplot2 - how to change location / position of wind rose axis labels?

2009-01-23 Thread Darren Norris
Dear R users, First just want to say thank you to all for developing such a wonderful software and packages. I need to produce a wind rose plot. Tried with packages circular and plotrix and couldn't quite get what I want. Moved to package ggplot2 and it's going great. However stuck in how to move

[R] Problem with colormodel in pdf driver

2009-01-23 Thread Luis Torgo
I'm trying to create figures in PDF that use the 'gray' colormodel instead of the default 'RGB' model, by requirements of a publisher. My problem has to do with the fact that I'm not being able to get gray colors with this option on the pdf() driver. Here is a small example for problem replica

Re: [R] Reading nc files

2009-01-23 Thread David Winsemius
You need to use a utility program to unpack the .gz file type and that would be specific to your OS. -- David Winsemius On Jan 23, 2009, at 9:32 AM, Magdalena Lucini wrote: Dear all, I have to open and read several netCDF (.nc) files. I installed the ncdf package and everything works fine.

Re: [R] list.files changed in 2.7.0

2009-01-23 Thread Henrik Bengtsson
And I'm not sure that list.files("C:", full.names=TRUE) returns correct pathnames, because it lists the files in the current directory (of C:), not the root of C:. There is a difference between C: and C:/, and you should get: list.files("C:", full.names=TRUE) [1] "C:aFile.txt" [2] "C:anotherFile.t

Re: [R] lattice: reverse order of panel.lmline, panel.smooth

2009-01-23 Thread Dylan Beaudette
On Fri, Jan 23, 2009 at 4:45 PM, Deepayan Sarkar wrote: > On Fri, Jan 23, 2009 at 3:00 PM, Dylan Beaudette > wrote: >> Hi, >> >> is it possible to reverse the order in which panel.lmline() or panel.smooth() >> operation in xyplot() ? This type of situation might occur when plotting some >> variab

Re: [R] XML package help

2009-01-23 Thread Duncan Temple Lang
Skewes,Aaron wrote: Please consider this: http://www.w3.org/2001/XMLSchema-instance"; > ./XYZ 10 ./XYZ/ I am attemp

Re: [R] lattice: reverse order of panel.lmline, panel.smooth

2009-01-23 Thread Deepayan Sarkar
On Fri, Jan 23, 2009 at 3:00 PM, Dylan Beaudette wrote: > Hi, > > is it possible to reverse the order in which panel.lmline() or panel.smooth() > operation in xyplot() ? This type of situation might occur when plotting some > variable with depth, but the relation we want to describe is variable ~

Re: [R] lattice question: independent per-row or per-column scaling?

2009-01-23 Thread Deepayan Sarkar
On Mon, Jan 19, 2009 at 7:24 AM, René J.V. Bertin wrote: > Thanks for all the answers. I'll have a look at ggplot2. I'd seen the > possibility to set panel-specific limits via ylim, but I was in fact > looking for a switch to achieve non-global automatic scaling. > > Given the fact that there is n

Re: [R] plotting curve in xYplot -- using panel.curve

2009-01-23 Thread Deepayan Sarkar
On Fri, Jan 23, 2009 at 12:46 PM, Dieter Menne wrote: > > > > John Poulsen wrote: >> >> I am trying to plot a curve over points plotted with se's in xYplot (see >> example below). I can get Figure 1 below to plot the data with error. >> However, I keep getting a the error message >> >> "Error usi

Re: [R] last result

2009-01-23 Thread Nick Matzke
Thanks!!! Best R list ever... Cheers, Nick Barry Rowlingson wrote: 2009/1/23 Jorge Ivan Velez : See ?.Last.value But don't do that right after you've done the calculation! You get *one* chance with .Last.value: # here comes my important numbers... > runif(10) [1] 0.7685472 0.2301233

[R] fonction PLATEAU???

2009-01-23 Thread Thibault Grava
Hello, I am working on extracting data from sound recording (fee bee song of the black-capped chickadee). I obtained a two column matrix with x=time(s) and y=frequency(khz). The part of the recording that is interesting me is when the frequency is stable. Does somebody ever used a fonction tha

Re: [R] can't load rJava in R 2.8.1 on Windows XP

2009-01-23 Thread Duncan Murdoch
Dieter Menne wrote: Duncan Murdoch stats.uwo.ca> writes: Slightly different for me, but failure: jvm.dll is on path (checked successfully with "where jvm.dll") From within R? Remember that the PATH is process-specific. Maybe your shell added something that put jvm.dll on its pa

[R] R package

2009-01-23 Thread Sheryl Hoy
Who could help me find the package for the TS-LARS method in R Software? Enjoy more chat on blogs and websites. Experience it with the Online Pingbox Creation Wizard. http://ph.messenger.yahoo.com/pingbox/ [[alternative HTML version deleted]] __

Re: [R] Stat textbook recommendations?

2009-01-23 Thread William Asquith
Monte, Here is an entire book released to public domain from earlier publication by Elsevier http://pubs.usgs.gov/twri/twri4a3/ William On Jan 23, 2009, at 10:57 AM, Monte Milanuk wrote: Hello, I'm looking for a textbook that can explain some of the math behind the intro-to-intermediate

Re: [R] Stat textbook recommendations?

2009-01-23 Thread Monte Milanuk
On Jan 23, 2009, at 11:23 AM, Peter Dalgaard wrote: Re. ISwR, you might want to take notice that it was originally written for a course that used Altman's "Practical Statistics for Medical Research". It is, however, a bit wordy for some and glosses rather too quickly over the math. Another pop

[R] (no subject)

2009-01-23 Thread Sheryl Hoy
I am a BS STAT. student and currently working on my thesis. I am interested on the TS-LARS method (an extension of LARS method by Efron et al.). As I visit the R website, I found only the LARS package. Is there a package for TS-LARS available? I have seen one of the paper about TS-LARS, it was w

[R] RMySQL Fail to connect on update to R 2.8.1

2009-01-23 Thread Zev Ross
Hi, I had my R to MySQL 5.0 connection working fine under 2.5.1 on Windows XP. My MySQL installation is local, not on a server and I could connect with: con <- dbConnect(MySQL(), dbname = "mydatabase", user="root", password="XX") I have updated to R 2.8.1 (RMySQL 0.7-2) but that same line of

[R] Letter for request

2009-01-23 Thread Sheryl Hoy
--- On Fri, 1/23/09, Sheryl Hoy wrote: From: Sheryl Hoy Subject: To: r-help@R-project.org Date: Friday, 23 January, 2009, 1:16 PM I am a BS STAT. student and currently working on my thesis. I am interested on the TS-LARS method (an extension of LARS method by Efron et al.). As I visit

Re: [R] Is it possible for R to import a SigmaPlot file?

2009-01-23 Thread Jason Rupert
Thank you vey much for your suggestion.  Unfortunately, it doesn't appear that 'foreign' will import or work with a *.jnb file from Sigmaplot.  However, maybe I can get the customer to put the data in a format that is supported by 'foreign'.   Thank you again for your suggestion. --- On Fri,

Re: [R] Stat textbook recommendations?

2009-01-23 Thread Monte Milanuk
Hello Chris, Thanks for the info... because of my work schedule making it functionally very difficult to attend traditional classes, the courses I have taken to date have been online. Definitely interesting to balance with a full-time job, family and other activities, but sometimes the o

Re: [R] Plot, lines and disordered x and y

2009-01-23 Thread Todor Kondic
Wow! More than I expected. I didn't try it, but seems convincing! TK 2009/1/23 Jorge Ivan Velez : > > Dear Todor, > How about this? > x<-c(1,-1,2,-2,3,-3,4,-4,5,-5) > y<-c(1,0,2,0,3,0,4,0,5,0) > DF<-data.frame(x,y) > plot(with(DF,DF[order(x),]),type='o') > HTH, > > Jorge > > > On Fri, Jan 23, 200

[R] high values of my response variable get chopped off of lattice dotplots

2009-01-23 Thread Christopher W. Ryan
I am trying the following lattice graphics code: > library(lattice) > attach(junk) > summary(junk) mean.barrvariable value Min. : 3.50 item15 :15 Min. :0. 1st Qu.: 9.50 item14 :14 1st Qu.:0. Median :11.00 item16 :14 Median :0. Mean :11.64 item1

[R] lattice: reverse order of panel.lmline, panel.smooth

2009-01-23 Thread Dylan Beaudette
Hi, is it possible to reverse the order in which panel.lmline() or panel.smooth() operation in xyplot() ? This type of situation might occur when plotting some variable with depth, but the relation we want to describe is variable ~ depth, and not depth ~ variable, as the plotting formula would

[R] Interpreting model matrix columns when using contr.sum

2009-01-23 Thread Gang Chen
With the following example using contr.sum for both factors, > dd <- data.frame(a = gl(3,4), b = gl(4,1,12)) # balanced 2-way > model.matrix(~ a * b, dd, contrasts = list(a="contr.sum", b="contr.sum")) (Intercept) a1 a2 b1 b2 b3 a1:b1 a2:b1 a1:b2 a2:b2 a1:b3 a2:b3 11 1 0 1

Re: [R] last result

2009-01-23 Thread Barry Rowlingson
2009/1/23 Jorge Ivan Velez : > See ?.Last.value But don't do that right after you've done the calculation! You get *one* chance with .Last.value: # here comes my important numbers... > runif(10) [1] 0.7685472 0.2301233 0.3053993 0.5185696 0.3345997 0.1544350 0.2663696 [8] 0.3507546 0.5784

[R] list.files changed in 2.7.0

2009-01-23 Thread davidr
I just noticed a change in the behavior of list.files from 2.6.1pat to 2.7.0 (I noticed it in 2.8.1 and traced back.) Previously, if the directory ended with a slash, and full.names=TRUE, the names returned had a single slash at the end of the directory, but now there are two. I noticed since I

Re: [R] Anova and unbalanced designs

2009-01-23 Thread John Fox
Dear Nils, This is a pretty simple design, and I wouldn't have thought that there was much room for getting different results. More generally, but not here (since there's only one between-subject factor), one shouldn't use contr.treatment() with "type-III" tests, as you did. Is it possible that yo

Re: [R] last result

2009-01-23 Thread Sarah Goslee
Yikes! Try .Last.value Sarah On Fri, Jan 23, 2009 at 5:02 PM, Nick Matzke wrote: > Hi, > > Let's say one has just run a command line command that took an hour and > produced a huge matrix as an output. However, one forgot to store the > output in a variable. > > Is there a hidden variable some

Re: [R] last result

2009-01-23 Thread Jorge Ivan Velez
Dear Nick, See ?.Last.value HTH, Jorge On Fri, Jan 23, 2009 at 5:02 PM, Nick Matzke wrote: > Hi, > > Let's say one has just run a command line command that took an hour and > produced a huge matrix as an output. However, one forgot to store the > output in a variable. > > Is there a hidden

[R] last result

2009-01-23 Thread Nick Matzke
Hi, Let's say one has just run a command line command that took an hour and produced a huge matrix as an output. However, one forgot to store the output in a variable. Is there a hidden variable somewhere that stores the result, so that one doesn't have to re-run the analysis for an hour?

[R] XML package help

2009-01-23 Thread Skewes,Aaron
Please consider this: http://www.w3.org/2001/XMLSchema-instance"; > ./XYZ 10 ./XYZ/ I am attempting to use XML package

[R] fGarch Max Likelihood

2009-01-23 Thread John Kerpel
Is the likelihood returned by fGarch the negative of the likelihood - so we're minimizing the negative of the max likelihood function? Thx, John [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mai

Re: [R] URGENT Requested info for application: R for Windows 1.3.1 (ref: 59282)

2009-01-23 Thread Uwe Ligges
Garza, Hortencia [BEELINE] wrote: Good afternoon, I work in export compliance and would like to know if you would please answer the questions below in regards to your application, R for Windows 1.3.1. The information I'm requesting is for export compliance. Before answering such questions

Re: [R] Plot, lines and disordered x and y

2009-01-23 Thread Carl Witthoft
Todor Kondic gmail.com> writes: > This is of course minor (actually asymptotically, no annoyance at > all). I am just mentioning it for 'completness' sake and because a > divinely ideal plotting function should cope with data given in any > order. > It's not just a question of 'how many divine

[R] URGENT Requested info for application: R for Windows 1.3.1 (ref: 59282)

2009-01-23 Thread Garza, Hortencia [BEELINE]
Good afternoon, I work in export compliance and would like to know if you would please answer the questions below in regards to your application, R for Windows 1.3.1. The information I'm requesting is for export compliance. RE: Application: R for Windows 1.3.1 Application Description: sta

[R] Creating clustered data with a random effect for a MC analysis

2009-01-23 Thread jjh21
I am trying to create a data set in R with a random cluster effect. I would like to do it so I can set the intraclass correlation coefficient (ICC) in the data generating process. I have tried a few methods, but cannot seem to get enough control over the ICC. I have been estimating the ICC using t

Re: [R] plotting curve in xYplot -- using panel.curve

2009-01-23 Thread Dieter Menne
John Poulsen wrote: > > I am trying to plot a curve over points plotted with se's in xYplot (see > example below). I can get Figure 1 below to plot the data with error. > However, I keep getting a the error message > > "Error using packet 1 object "y" not found" > > Can anyone see what I

Re: [R] can't load rJava in R 2.8.1 on Windows XP

2009-01-23 Thread Dieter Menne
Duncan Murdoch stats.uwo.ca> writes: > > Slightly different for me, but failure: > > > > jvm.dll is on path (checked successfully with "where jvm.dll") > > From within R? Remember that the PATH is process-specific. Maybe your > shell added something that put jvm.dll on its path, but you di

Re: [R] how to get a primitive function object

2009-01-23 Thread Yi Zhang
On Fri, Jan 23, 2009 at 2:50 PM, Duncan Murdoch wrote: > External pointers are the standard way to do that. You don't need to worry > about reference counting, R's garbage collector will call a finalizer when > it doesn't need the object any more. > > I think the usual example of this is the ROD

Re: [R] text vector clustering

2009-01-23 Thread Ed Merkle
Srinivas, I don't know of a clustering algorithm, but you might check out agrep() from the base package and stringMatch() from the MiscPsycho package. These can help to identify similar text sequences, and it may be possible to group similar names by using these commands over and over again.

Re: [R] can't load rJava in R 2.8.1 on Windows XP

2009-01-23 Thread Duncan Murdoch
On 1/23/2009 12:06 PM, Dieter Menne wrote: Duncan Murdoch stats.uwo.ca> writes: If you look at rJava:::.onLoad now that you can load the package, you'll see that it goes through a number of tests to try to find the right path. Slightly different for me, but failure: jvm.dll is on path

Re: [R] how to get a primitive function object

2009-01-23 Thread Duncan Murdoch
On 1/23/2009 1:47 PM, Yi Zhang wrote: On Fri, Jan 23, 2009 at 5:15 AM, Patrick Burns wrote: If I understand properly, you want '<-' to be a generic function, which it currently isn't. There may be a way to fake that (I can't think of any). But I'm wondering if you should rethink what you want.

[R] Box Cox parameter for time series

2009-01-23 Thread diego Diego
Hello R-experts, I want to ask I anyone knows a way to obtain a suitable value for the parameter of the box-cox transformation for time series (aiming to an Arima fit). Adittionally, I need to implement this to a list with a lot of series (about 5300), so if the method is suitable for an FOR-ruti

Re: [R] Plot, lines and disordered x and y

2009-01-23 Thread hadley wickham
>> >> This is of course minor (actually asymptotically, no annoyance at >> all). I am just mentioning it for 'completness' sake and because a >> divinely ideal plotting function should cope with data given in any >> order. >> > > The problem here is that a divinely ideal plotting function > for o

Re: [R] Is there any function can be used to compare t wo probit models made from same data?

2009-01-23 Thread Dylan Beaudette
On Friday 23 January 2009, David Freedman wrote: > library(MASS); library(boot) > #create intercorrelated data > Sigma <- matrix(c(1,.5,.4,  .5,1,.8,  .4,.8,1),3,3) > Sigma > dframe<-as.data.frame(mvrnorm(n<-200, rep(0, 3), Sigma)) > names(dframe)<-c('disease','age','ht') #age and ht are predictors

Re: [R] Stat textbook recommendations?

2009-01-23 Thread Peter Dalgaard
(resending to include r-help) Monte Milanuk wrote: Hello, I'm looking for a textbook that can explain some of the math behind the intro-to-intermediate stuff like ANOVA, multiple regression, non- parametric tests, etc. A little background: I took an intro stats course last year and woul

Re: [R] Plot, lines and disordered x and y

2009-01-23 Thread Ben Bolker
Todor Kondic gmail.com> writes: > > Ok, here is a bit more information: > > R is version 2.7.1 (2008-06-23) > > > So what we should see here is a flat y=0 for x<0 and identity for x>0. > Instead, we have a saw-like shape where e.g y(x=-1) is connected to > y(x=1) . > > This is of course min

Re: [R] how to get a primitive function object

2009-01-23 Thread Yi Zhang
On Fri, Jan 23, 2009 at 9:40 AM, Wacek Kusnierczyk wrote: > you might want to specify what 'completely unrecoverable' means, and > what approaches are allowed. > > for the former, i guess that: > - 'incompletely recoverable' means that there is at least one function > name in the global environme

Re: [R] Plot, lines and disordered x and y

2009-01-23 Thread Jorge Ivan Velez
Dear Todor, How about this? x<-c(1,-1,2,-2,3,-3,4,-4,5,-5) y<-c(1,0,2,0,3,0,4,0,5,0) DF<-data.frame(x,y) plot(with(DF,DF[order(x),]),type='o') HTH, Jorge On Fri, Jan 23, 2009 at 1:41 PM, Todor Kondic wrote: > Ok, here is a bit more information: > > R is version 2.7.1 (2008-06-23) > > A const

[R] compound outcome variables (not specifically R-related)

2009-01-23 Thread Christopher W. Ryan
I would like to try to do a journal club session for my family practice residents on the uses, and especailly the pitfalls, of compound outcome variables, like "stroke or myocardial infarction or coronary bypass surgery." They appear frequently in clinical trial literature. Can anyone recommend an

Re: [R] Write to multiple connections or multiple text files

2009-01-23 Thread Charles C. Berry
On Fri, 23 Jan 2009, Andersson, Jafet wrote: Hi all, I want to modify a large number of text files (ca 4000) by replacing a value found on a particular line in them with a value from an R object. For a single file I would normally use: con<-file ("foo.txt", open="r+") content<-

Re: [R] how to get a primitive function object

2009-01-23 Thread Yi Zhang
On Fri, Jan 23, 2009 at 5:15 AM, Patrick Burns wrote: > If I understand properly, you want '<-' to be > a generic function, which it currently isn't. > There may be a way to fake that (I can't think > of any). > > But I'm wondering if you should rethink what > you want. The only reason that I can

Re: [R] Plot, lines and disordered x and y

2009-01-23 Thread Todor Kondic
Ok, here is a bit more information: R is version 2.7.1 (2008-06-23) A constructed example: > x<-c(1,-1,2,-2,3,-3,4,-4,5,-5) > y<-c(1,0,2,0,3,0,4,0,5,0) > plot(x,y,type='l') #bad > plot(x,y) # this is how it should look like So what we should see here is a flat y=0 for x<0 and identit

[R] Appending objects created using filehash package

2009-01-23 Thread Brigid Mooney
Hi, I am working with a very large dataset, and am using the 'filehash' package to manage such a large file. While I have no problem accessing objects that I load into a database, I was hoping there is a better way to append to objects already in the database. The only way I know now to append t

Re: [R] Stat textbook recommendations?

2009-01-23 Thread Christopher W. Ryan
If you don't want to be on your own, and you are looking for more statistics courses than you have available locally, Texas A&M University statistics department offers some single courses, a 4-course certificate, and an entire masters degree, all online, no campus visits required. I am in their ma

Re: [R] Stat textbook recommendations?

2009-01-23 Thread Daniel Viar
You might want to check out the following: http://www.stochas.org/ http://www1.appstate.edu/~arnholta/PASWR/index.htm http://turtle.gis.umn.edu/pmwiki/pmwiki.php/StatisticsandDatawithR/HomePage http://www.janehorgan.com/ I own all of these books and like them. The book by Dr. Jan Horgan: "Probab

Re: [R] R stepping through multiplie interactions

2009-01-23 Thread Greg Snow
Z ~ (A+B+C+D)^3 means give all main effects and interactions up to the 3 way interactions, but not above (change ^3 to ^2 to limit to 2 way interactions). You can do a semi manual stepwise procedure using the add1 and drop1 commands or the addterm and dropterm commands in the MASS package. But

[R] plotting curve in xYplot -- using panel.curve

2009-01-23 Thread John Poulsen
Hello, I am trying to plot a curve over points plotted with se's in xYplot (see example below). I can get Figure 1 below to plot the data with error. However, I keep getting a the error message "Error using packet 1 object "y" not found" Can anyone see what I am doing wrong? Thanks! John

Re: [R] R stepping through multiplie interactions

2009-01-23 Thread Chuck Cleland
On 1/23/2009 12:44 PM, ppeetteerr wrote: > I have a lm in R in the form > model <- lm( Z ~ A*B*C*D,data=mydata) > I want to run the model and include all interactions expect the 4 way > (A:B:C:D) is there an easy way of doing this? I then want to step down the > model eliminating the non-significan

Re: [R] glm binomial loglog (NOT cloglog) link

2009-01-23 Thread Ken Knoblauch
William Simpson gmail.com> writes: > I would like to do an R glm() with > family = binomial(link="loglog") > Right now, the cloglog link exists, which is nice when the data have a > heavy tail to the left. I have the opposite case and the loglog link > is what I need. Can someone suggest how to ad

Re: [R] Stat textbook recommendations?

2009-01-23 Thread Greg Snow
I like: Applied Linear Statistical Models by Neter, Kutner, Nachtsheim, and Wasserman (McGraw Hill) It is not specific to any stats package, but it gives a good mix of theory behind the routines and how to apply them and covers a good breadth of material. A must have for statistics and R is:

Re: [R] ggplot seq

2009-01-23 Thread Felipe Carrillo
Actually 'levels' works OK by ordering the x axis labels but since I have 52 weeks it gets too crowded. Here's part of my dataset with a reproducible example. sampDat <- "Week FryPassage 27 665 28 2232 29 9241 30 28464 31 41049 32 82216 33 230411 34 358541 35 747839 36 459682 37 609567 38 979475

[R] R stepping through multiplie interactions

2009-01-23 Thread ppeetteerr
I have a lm in R in the form model <- lm( Z ~ A*B*C*D,data=mydata) I want to run the model and include all interactions expect the 4 way (A:B:C:D) is there an easy way of doing this? I then want to step down the model eliminating the non-significant terms I understand step() does this but how woul

Re: [R] Categorical Variables and glm()

2009-01-23 Thread Marc Schwartz
on 01/23/2009 11:10 AM Stephen Collins wrote: > When including categorical variables in a regression, the default in R is > to set the first level as the base. Is there an option to specify a > different level as the base? See ?relevel and the See Also's listed therein. HTH, Marc Schwartz _

Re: [R] Categorical Variables and glm()

2009-01-23 Thread Daniel Malter
Hi, contrasts(yourvariablename)=contr.treatment(levels(yourvariablename),base=3) 3 is the number of the category that you want to be your baseline. Replace accordingly. Cheers, Daniel - cuncta stricte discussurus - -Ursprüngliche Nachricht-

[R] Anova and unbalanced designs

2009-01-23 Thread Skotara
Dear R-list! My question is related to an Anova including within and between subject factors and unequal group sizes. Here is a minimal example of what I did: library(car) within1 <- c(1,2,3,4,5,6,4,5,3,2); within2 <- c(3,4,3,4,3,4,3,4,5,4) values <- data.frame(w1 = within1, w2 = within2) valu

[R] "latex" in Hmisc: cell formating

2009-01-23 Thread Tao Shi
Hi Dieter, Thank you for pointing out the website. From the website it seems the bug has been fixed early 2008 (see http://biostat.mc.vanderbilt.edu/trac/Hmisc/changeset/582 ). So I upgraded my Hmisc package to 3.4-4, which was published on 11/3/2008 and hoped it would work. However, the pr

Re: [R] Returning NA from lm

2009-01-23 Thread Neil Beddoe
If anyone's interested, I got round it by doing: tryCatch(lm(data~model,na.action=na.fail),error=function(err){NA}) -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Neil Beddoe Sent: 23 January 2009 15:40 To: 'Prof Brian Ripley' C

[R] New international competition for the Digital Humanities

2009-01-23 Thread Paul Gilbert
(Slightly off topic and outside my area - but this may be of interest to the R community) WASHINGTON (January 16, 2009) -- Today, a new international competition called the "Digging into Data Challenge" was announced by four leading research agencies: the Joint Information Systems Committee (J

[R] Categorical Variables and glm()

2009-01-23 Thread Stephen Collins
When including categorical variables in a regression, the default in R is to set the first level as the base. Is there an option to specify a different level as the base? Regards, Stephen Collins, MPP | Analyst Health & Benefits | Aon Consulting [[alternative HTML version deleted]]

Re: [R] can't load rJava in R 2.8.1 on Windows XP

2009-01-23 Thread Dieter Menne
Duncan Murdoch stats.uwo.ca> writes: > > If you look at rJava:::.onLoad now that you can load the package, > you'll see that it goes through a number of tests to try to find the > right path. Slightly different for me, but failure: jvm.dll is on path (checked successfully with "where jvm.d

Re: [R] Table Modification

2009-01-23 Thread jim holtman
?strwrap On Fri, Jan 23, 2009 at 10:47 AM, Derek Ogle wrote: > Yes, that was exactly what I was looking for. Very concise. Thank you. > > My "real" example has many more items in each cell. I will now have to > figure out how to put a "carriage return" after, say, every fourth item. > > Nevert

[R] Stat textbook recommendations?

2009-01-23 Thread Monte Milanuk
Hello, I'm looking for a textbook that can explain some of the math behind the intro-to-intermediate stuff like ANOVA, multiple regression, non- parametric tests, etc. A little background: I took an intro stats course last year and would like to further my education. Being as that was the

[R] Plot, lines and disordered x and y

2009-01-23 Thread Todor Kondic
Hello, I have 2d data where x coordinate is not given in usual ascending order (x1,...,x1+l; l>0), and instead in another, regular, but not ascending or descending order (for illustration: x1,-x1,x1+dx1,-x1-dx1,).y is an array which corresponds to the way x is ordered. I have noticed that givi

Re: [R] forward slash vs double backslash R and Tinn-R

2009-01-23 Thread Keith Jewell
I'm on Windows XP and it works fine for me, so the "only apparent reason for the failure" may not be the real reason. "BUT IT FAILS" isn't very explicit. If your .trPaths definition works for you, why not use it? As Duncan Murdoch said, you're really asking in the wrong place. There's a forum s

[R] glm binomial loglog (NOT cloglog) link

2009-01-23 Thread William Simpson
I would like to do an R glm() with family = binomial(link="loglog") Right now, the cloglog link exists, which is nice when the data have a heavy tail to the left. I have the opposite case and the loglog link is what I need. Can someone suggest how to add the loglog link onto glm()? It would be lov

Re: [R] text vector clustering

2009-01-23 Thread Stefan Th. Gries
On Fri, Jan 23, 2009 at 08:28, Stefan Th. Gries wrote: > Hans-Joerg Bibiko's function Levenshtein would help; cf. below for an > example (very clumsy with two loops, but you can tweak that with apply > stuff). Like this maybe (sorry, should've thought about that earlier): [...] x<-rep(all.names,

Re: [R] text vector clustering

2009-01-23 Thread Stefan Th. Gries
Hans-Joerg Bibiko's function Levenshtein would help; cf. below for an example (very clumsy with two loops, but you can tweak that with apply stuff). HTH, STG levenshtein <- function(string1, string2, case=TRUE, map=NULL) { # levenshtein algorithm in R # #

Re: [R] forward slash vs double backslash R and Tinn-R

2009-01-23 Thread Duncan Murdoch
On 1/23/2009 11:10 AM, Farrel Buchinsky wrote: I installed the newest version of R and once again ran into problem with Tinn-R failing when trying to use the R explorer. I had this problem once before and solved it when I added the following .trPaths = c( 'C:/Documents and Settings/fbuchins/Appl

Re: [R] forward slash vs double backslash R and Tinn-R

2009-01-23 Thread Farrel Buchinsky
The only apparent reason for the failure is that the elegant line using Sys.getenv denerates filenames with double backslashes instead of forward slashes. I am working in Windows XP and I thought that R could use double backslashes or a single forward slash. So what am I not understanding about th

[R] forward slash vs double backslash R and Tinn-R

2009-01-23 Thread Farrel Buchinsky
I installed the newest version of R and once again ran into problem with Tinn-R failing when trying to use the R explorer. I had this problem once before and solved it when I added the following .trPaths = c( 'C:/Documents and Settings/fbuchins/Application Data/Tinn-R/tmp/', 'C:/Documents and Sett

Re: [R] extract certain months toyears (zoo)

2009-01-23 Thread Gabor Grothendieck
Please read the last line to every post on r-help particularly noting the reproducible part. Assuming you have a series such as z below and want June, July and August of each year: > library(zoo) > set.seed(1) > z <- zoo(rnorm(25), as.yearmon("2000-01") + 0:24/12) > z[format(time(z), "%m") %in% c

Re: [R] 3d scatter plot with both error bars and a flexibly fitted surface

2009-01-23 Thread Dieter Menne
Sean Zhang gmail.com> writes: > I, an entry level R user, wonder how make a 3d scatter plot with both error > bars and a flexibly fitted surface. For regular grid data, I found interp.loess in package tpg easiest to use to compute the fine grid required for the plot. For irregular data, check

Re: [R] Table Modification

2009-01-23 Thread Derek Ogle
Yes, that was exactly what I was looking for. Very concise. Thank you. My "real" example has many more items in each cell. I will now have to figure out how to put a "carriage return" after, say, every fourth item. Nevertheless, thank you very much for the quick and accurate answer. -Orig

Re: [R] Returning NA from lm

2009-01-23 Thread Neil Beddoe
I tried that I'm afraid. I still get values for groups with missing data. I think na.exclude just ignores the NAs but I want it to return NA. Where one of the values is NA. -Original Message- From: Prof Brian Ripley [mailto:rip...@stats.ox.ac.uk] Sent: 23 January 2009 13:04 To: Neil

Re: [R] Is it possible for R to import a SigmaPlot file?

2009-01-23 Thread Felipe Carrillo
Check the package 'foreign'. It can read data from SPSS,Minitab,SAS,Systat (sigmaplot is part of Systat) etc. I also use Sigmaplot and an easy workaround is to convert the sigmaplot file to csv or xls file and then read it into R. Felipe D. Carrillo Supervisory Fishery Biologist Department o

Re: [R] Histogram for grouped data in R

2009-01-23 Thread Jorge Ivan Velez
Hi, Try this: x<-c(15,25,10,5) names(x)<-c('0-10','10-20','20-50','50-100') barplot(x,space=0,xlab='Size',ylab='Count',col=1:4) See ?barplot for more information. HTH, Jorge On Fri, Jan 23, 2009 at 8:55 AM, darthgervais wrote: > > I have grouped data in this format > > Size -- Count > 0-1

  1   2   >