[R] [R-pkgs] New package RPostgreSQL 0.1.0

2008-10-14 Thread Dirk Eddelbuettel
RPostgreSQL version 0.1.0 We are pround to announce the availability of the RPostgreSQL package on CRAN and its mirrors. This package provides an a DBI-compliant interface between PostgreSQL and R. RPostgreSQL was developed as part of the Google Summer of Code 2008 program by Sameer Kuma

[R] Handling complex sampling designs in R

2008-10-14 Thread David Kaplan
__ 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] Labour Statistics

2008-10-14 Thread Gad Abraham
Max wrote: Hi everyone, This is not so much of an R question as a statistics question. I currently work for the largest pre employment screening company in Canada. Upper management has noticed that noticed that usually a month or so before any big kind of economic shock happens, that our inco

Re: [R] gWidgets install

2008-10-14 Thread john verzani
Tim Smith yahoo.com> writes: > > Thanks Charlie - I just tried it, but still get the same error: > > --- > > install.packages("gWidgets",dependencies=TRUE) ... > > library(gWidgets) > Error in fun(...) : > > *** gWidgets requires a toolkit implementation to be >

Re: [R] list syntax question: which subscript is which

2008-10-14 Thread jim holtman
actually meant to say: max(sapply(foo, function(x) max(x[,1]))) On Tue, Oct 14, 2008 at 5:49 PM, Carl Witthoft <[EMAIL PROTECTED]> wrote: > Hi, > Sorry to bother with something that should be simple, but I can't find it. > > Suppose I have a list, each element of which is a 2xN dataframe, where N

Re: [R] list syntax question: which subscript is which

2008-10-14 Thread jim holtman
try: max(sapply(foo, max)) On Tue, Oct 14, 2008 at 5:49 PM, Carl Witthoft <[EMAIL PROTECTED]> wrote: > Hi, > Sorry to bother with something that should be simple, but I can't find it. > > Suppose I have a list, each element of which is a 2xN dataframe, where N > could be different for each eleme

Re: [R] getAnywhere

2008-10-14 Thread Prof Brian Ripley
eval(substitute(getAnywhere(x), list(x=name))) It's a standard (if advanced) code snippet from the ideas of 'computing on the language'. getAnywhere is written the way it is because it is intended for interactive use, especially for frustrated users who can't find an object that appears in e

[R] legend

2008-10-14 Thread Lavan
Hi R users, I'm trying to have the symbols for sigma[1] in my legend. the code is given below, please have a look. Thanks, lavan legend("bottom",legend=paste("Sigma1=", c(0.01,0.1,0.2,0.5,1,1.5,2,4,6,9.5), sep=""), fill=c("red","green","blue","black","pink","brown","purple","yellow","lightblu

Re: [R] gWidgets install

2008-10-14 Thread Tim Smith
Thanks Charlie - I just tried it, but still get the same error: --- > install.packages("gWidgets",dependencies=TRUE) trying URL 'http://www.ibiblio.org/pub/languages/R/CRAN/bin/windows/contrib/2.7/gWidgets_0.0-30.zip' Content type 'application/zip' length 1354268 bytes

Re: [R] IIA test on multinomial logit

2008-10-14 Thread ronggui
Hi, you should look at hmftest in mlogit package. However, be cautious when you use IIA test, it is not very reliable as Long and Freese (2006:243) have shown. * J. Scott Long and Jeremy Freese. 2006. Regression Models for Categorical Outcomes Using Stata. 2nd. On Wed, Oct 15, 2008 at 3:37 AM, Er

Re: [R] can't R CMD INSTALL on WinXP

2008-10-14 Thread Liaw, Andy
Duncan: My bad: I did install Rtools from the installer, not Rtools.zip. John: Thanks very much for the suggestion! Will give that a try. Best, Andy From: Duncan Murdoch [mailto:[EMAIL PROTECTED] Sent: Tue 10/14/2008 3:42 PM To: Liaw, Andy Cc: r-help@r-pro

Re: [R] A question about Heatmap for data with just 2 columns

2008-10-14 Thread hadley wickham
Why not use a scatterplot? That will be far far better for your purpose than a heatmap. Hadley On Tue, Oct 14, 2008 at 4:45 PM, feishi <[EMAIL PROTECTED]> wrote: > > Hi, I have a question about heatmap. I have a data with row as microRNA and > two columns are two cell expression values for these

[R] Maximizing a function - optim does not always converge

2008-10-14 Thread Mathew Rosales
Hello All,   I¢m  kinda new to R language and any help that I can get is greatly appreciated.   Basically, I want to find the values of the two parameters that will maximize the function and I¢m currently using the optim function to find these values.  My R code works fine but not all the time. 

[R] A question about Heatmap for data with just 2 columns

2008-10-14 Thread feishi
Hi, I have a question about heatmap. I have a data with row as microRNA and two columns are two cell expression values for these microRNA. So, like: cell1cell2 miRNA11.5 3.4 miRNA21.3 2.4 ... miRNA505 2.1 miRNA517.3 0.5 I want to

[R] question about amova (ade4)

2008-10-14 Thread Thomas C Hundley
Has there been an answer to the following question from a couple of years ago about doing amova with factorial data? [R] question about amova (ade4) Alicia Amadoz Alicia.Amadoz at uv.es Tue Nov 14 14:39:21 CET 2006 * Previous message: [R] dividing vectors into bins with equal widths * Ne

[R] question about amova (ade4)

2008-10-14 Thread tom hundley
Was there ever an answer to this question about how to do amova with factorial data? t hundley [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting gui

Re: [R] Getting frustrated with RMySQL

2008-10-14 Thread Gabor Grothendieck
Its been pointed out to me that there is a bug in gsubfn that occurs when a variable named x is used so the example below will not work correctly. It seems it clashes with an internal variable also called x. In the meantime use a different variable name such as X. library(gsubfn) X <- 3 fn$dbGet

Re: [R] getAnywhere

2008-10-14 Thread Gabor Grothendieck
Try this: do.call(getAnywhere, list(name)) On Tue, Oct 14, 2008 at 6:02 PM, Bastian A. <[EMAIL PROTECTED]> wrote: > Hi List, > > I am trying to look up an object using getAnywhere, where the object I > am looking for is given by the _value_ of the variable I am looking > for. Since getAnywhere c

Re: [R] Getting frustrated with RMySQL

2008-10-14 Thread Ted Byers
That is neat Gabor. Thanks, Ted Gabor Grothendieck wrote: > > The gsubfn package can do quasi perl-style interpolation by > prefacing any function call with fn$. > > library(gsubfn) > x <- 3 > fn$dbGetQuery(con, "select * from myTable where myColumnA = $x and > MyColumnB = `2*x` ") > > See ht

Re: [R] Getting frustrated with RMySQL

2008-10-14 Thread Ted Byers
Thanks Jeffrey and Barry, I like the humour. I didn't know about xkcd.com, but the humour on it is familiar. I saw little Bobby Tables what seems like eons ago, when I first started cgi programming. Anyway, I recognized the risk of an injection attack with this use of sprint, but in this case,

[R] getAnywhere

2008-10-14 Thread Bastian A.
Hi List, I am trying to look up an object using getAnywhere, where the object I am looking for is given by the _value_ of the variable I am looking for. Since getAnywhere calls substitue on its argument it is looking for an object with the name of the argument not its value. Is there a way to work

Re: [R] gWidgets install

2008-10-14 Thread cls59
Tim Smith-5 wrote: > > Hi, > > I wanted to install the gWidgets package and ran the following code: > > -- >> install.packages("gWidgets") > > The package you installed might be dependent on other packages that weren't installed, it's good practice

Re: [R] Getting frustrated with RMySQL

2008-10-14 Thread Gabor Grothendieck
The gsubfn package can do quasi perl-style interpolation by prefacing any function call with fn$. library(gsubfn) x <- 3 fn$dbGetQuery(con, "select * from myTable where myColumnA = $x and MyColumnB = `2*x` ") See http://gsubfn.googlecode.com On Tue, Oct 14, 2008 at 5:32 PM, Jeffrey Horner <[EMA

[R] list syntax question: which subscript is which

2008-10-14 Thread Carl Witthoft
Hi, Sorry to bother with something that should be simple, but I can't find it. Suppose I have a list, each element of which is a 2xN dataframe, where N could be different for each element. Is there some simple structure to let me examine all the elements of each element's first column? For exa

Re: [R] ts.data plot

2008-10-14 Thread Gabor Grothendieck
Assuming the first observation associated with each year is Jan 1, the second is Jan 2 and so on we have the following. as.yearmon converts the year into a year/month object and as.Date turns that into Jan 1 of that year. Then the ave calculation adds 0, 1, ... to that so we get sequential dates

Re: [R] Getting frustrated with RMySQL

2008-10-14 Thread Jeffrey Horner
Barry Rowlingson wrote on 10/14/2008 04:40 PM: 2008/10/14 Jeffrey Horner <[EMAIL PROTECTED]>: I've found the best way to parameterize is using R's sprintf function. For instance, the following query not only parameterizes the variable position, but also the table name: fields <- dbGetQuery(co

Re: [R] Getting frustrated with RMySQL

2008-10-14 Thread Barry Rowlingson
2008/10/14 Jeffrey Horner <[EMAIL PROTECTED]>: > I've found the best way to parameterize is using R's sprintf function. For > instance, the following query not only parameterizes the variable position, > but also the table name: > > fields <- dbGetQuery(con,sprintf("select field,elem_label from %

Re: [R] Getting frustrated with RMySQL

2008-10-14 Thread Jeffrey Horner
Ted Byers wrote on 10/14/2008 02:33 PM: Getting the basic stuff to work is trivially simple. I can connect, and, for example, get everything in any given table. What I have yet to find is how to deal with parameterized queries or how to do a simple insert (but not of a value known at the time t

Re: [R] does any r package work with mcfadden type discrete choicemodels?...

2008-10-14 Thread Richard Palmer
thanks. learning r by myself and did not know of this function. On 10/14/08, Bert Gunter <[EMAIL PROTECTED]> wrote: > Please use R's search tools before posting: > > ?RsiteSearch > > RSiteSearch("mcfadden",restr="func") > RSiteSearch("discrete choice model",restr="func") > > -- Bert Gunter > > -

Re: [R] does any r package work with mcfadden type discrete choicemodels?...

2008-10-14 Thread Bert Gunter
Please use R's search tools before posting: ?RsiteSearch RSiteSearch("mcfadden",restr="func") RSiteSearch("discrete choice model",restr="func") -- Bert Gunter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Richard Palmer Sent: Tuesday, October 14, 2008

[R] gWidgets install

2008-10-14 Thread Tim Smith
Hi, I wanted to install the gWidgets package and ran the following code: -- > install.packages("gWidgets") trying URL 'http://www.ibiblio.org/pub/languages/R/CRAN/bin/windows/contrib/2.7/gWidgets_0.0-30.zip' Content type 'application/zip' length 1354268 by

Re: [R] Extended summary

2008-10-14 Thread David Winsemius
My reading of the manual and my use of str(test1) on the simple example suggests that you try using the na.action component of the model object. That should return the index of elements that were excluded. On Oct 14, 2008, at 7:29 AM, Kåre Edvardsen wrote: Is there a function providing mo

[R] does any r package work with mcfadden type discrete choice models?...

2008-10-14 Thread Richard Palmer
... and does any r package work with experimental design for these models. -- Richard Palmer Home 508 877-3862 Cell 508 982-7266 Business: 508 283 3592 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PL

Re: [R] can't R CMD INSTALL on WinXP

2008-10-14 Thread John Fox
Dear Andy, In April, I reported a similar problem to the r-devel list. In my case, I was using Windows Vista. I've just checked, and I observe the same problem as you do with randomForest, but can get around it by installing directly from the .tar.gz archive for the package, that is executing

[R] nlm return wrong function value - garch fitting

2008-10-14 Thread Scotty Nelson
I am using nlm to maximize a likelihood function. When I call the likelihood function (garchLLH) via nlm however, nlm returns the wrong value of the function. When I test the likelihood function manually I get the correct answer. I'm probably doing something really stupid, maybe someone can p

Re: [R] XML_1.98-0 fails to build on Debian Lenny with gcc 4.3.2 and R-beta 2.8.0

2008-10-14 Thread Dirk Eddelbuettel
Dr Kimpel, Please remind me where we promised to deliver all these services to you -- for free, no less -- leading you have such claims on perceived 'service guarantees', at whichever imagined timeliness or whichever imagines set pf packages. Had you bothered to check at e.g. http://changel

Re: [R] can't R CMD INSTALL on WinXP

2008-10-14 Thread Duncan Murdoch
On 10/14/2008 3:04 PM, Liaw, Andy wrote: Dear All, I recently got a laptop upgrade, and had to re-install the tools I used for building R packages on Windows (XP SP2). I'm running into a strange problem that I can't resolve. Can anyone shed on light? This is with R-2.7.2 patched 2008-09-20 r4

Re: [R] IIA test on multinomial logit

2008-10-14 Thread Erika Known
> - Original Message - > From: "Erika Known" <[EMAIL PROTECTED]> > To: > Sent: Tuesday, October 14, 2008 11:43 AM > Subject: [R] IAA test on my multinomial logit > > > Hi all > > > > I'm trying to immigrate from Stata and I want to preform a IIA test > > (Independence of Irrelevant Alter

Re: [R] Maximum number of pasted 'code' lines?

2008-10-14 Thread Duncan Murdoch
On 10/14/2008 2:39 PM, Michael Just wrote: Erik, Roger, others: Why I use excel: the ability to concatenate and 'drag' formulas. I use it because it is what I know. Apparently, excel is frowned upon, what should I be using? I don't know how else to create many very similar lines of R code. I t

[R] Getting frustrated with RMySQL

2008-10-14 Thread Ted Byers
Getting the basic stuff to work is trivially simple. I can connect, and, for example, get everything in any given table. What I have yet to find is how to deal with parameterized queries or how to do a simple insert (but not of a value known at the time the script is written - I ultimately want

Re: [R] XML_1.98-0 fails to build on Debian Lenny with gcc 4.3.2 and R-beta 2.8.0

2008-10-14 Thread Mark Kimpel
Dirk, Please let me know when you will support nightly builds of R-devel with all R and BioConductor packages. I would also need your help syncing my home setup with the one that I use on a remote Linux cluster using RHEL 5. For my needs, the packages on these two setups need to be exactly the sam

Re: [R] ggplot2 plot with symbols and then add line

2008-10-14 Thread stephen sefick
Thanks hadley I tried just shape=NULL, but did not wrap it in the aes argument which makes sense. thanks On Tue, Oct 14, 2008 at 8:11 AM, hadley wickham <[EMAIL PROTECTED]> wrote: > On Tue, Oct 14, 2008 at 6:46 AM, stephen sefick <[EMAIL PROTECTED]> wrote: >> r <-(structure(list(TSS = c(2.8, 8.4,

[R] can't R CMD INSTALL on WinXP

2008-10-14 Thread Liaw, Andy
Dear All, I recently got a laptop upgrade, and had to re-install the tools I used for building R packages on Windows (XP SP2). I'm running into a strange problem that I can't resolve. Can anyone shed on light? This is with R-2.7.2 patched 2008-09-20 r46576, Rtools.zip downloaded a couple of wee

Re: [R] XML_1.98-0 fails to build on Debian Lenny with gcc 4.3.2 and R-beta 2.8.0

2008-10-14 Thread Dirk Eddelbuettel
On Tue, Oct 14, 2008 at 02:34:57PM -0400, Mark Kimpel wrote: > Subject pretty much says it all. Wonder if there is there is some code in > XML that the new gcc doesn't like? See output below: You are wondering wronly. > * Installing *source* package 'XML' ... > checking for gcc... gcc > checking

Re: [R] Maximum number of pasted 'code' lines?

2008-10-14 Thread Darin Brooks
Michael Not sure if it's cool to flog other software here ... But I use Ultra-edit http://www.ultraedit.com/ Cheap ... Easy to use ... And has text editing functions that save A LOT of time. Just my two cents. Darin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Re: [R] Maximum number of pasted 'code' lines?

2008-10-14 Thread Michael Just
Erik, Roger, others: Why I use excel: the ability to concatenate and 'drag' formulas. I use it because it is what I know. Apparently, excel is frowned upon, what should I be using? I don't know how else to create many very similar lines of R code. Thanks again, Michael On Tue, Oct 14, 2008 at 1:

Re: [R] Maximum number of pasted 'code' lines?

2008-10-14 Thread Mike Prager
"Michael Just" <[EMAIL PROTECTED]> wrote: > I write most of my R code in excel and then paste it into R. I am wondering > if there is a limit to how much I can paste? I want to paste about 19,000 > lines of code should this work? I am doing this because when I did it chunks > it took about an hour

[R] XML_1.98-0 fails to build on Debian Lenny with gcc 4.3.2 and R-beta 2.8.0

2008-10-14 Thread Mark Kimpel
Subject pretty much says it all. Wonder if there is there is some code in XML that the new gcc doesn't like? See output below: * Installing *source* package 'XML' ... checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes chec

Re: [R] Maximum number of pasted 'code' lines?

2008-10-14 Thread Erik Iverson
Michael Just wrote: Hello, I write most of my R code in excel and then paste it into R. Do you actually use Excel as a text editor? Is this common? What benefits do you get by writing code in Excel? __ R-help@r-project.org mailing list https://stat

[R] Labour Statistics

2008-10-14 Thread Max
Hi everyone, This is not so much of an R question as a statistics question. I currently work for the largest pre employment screening company in Canada. Upper management has noticed that noticed that usually a month or so before any big kind of economic shock happens, that our incoming files

[R] ts.data plot

2008-10-14 Thread threshold
Hi, my data consists of 2 columns: one with the 'year' when daily observation was recorded, the other one consists these observations 'obs', like the following: year obs [3014,] 86 26.01 [3015,] 86 25.66 [3016,] 86 23.92 [3017,] 86 23.84 . . [3018,] 96 22.65 [3019,] 96 23.22 [3020,

Re: [R] Maximum number of pasted 'code' lines?

2008-10-14 Thread roger koenker
Nothing except: Nothing exceeds like excel. url:www.econ.uiuc.edu/~rogerRoger Koenker email[EMAIL PROTECTED]Department of Economics vox: 217-333-4558University of Illinois fax: 217-244-6678Champaign, IL 61820 On Oct 14,

[R] Maximum number of pasted 'code' lines?

2008-10-14 Thread Michael Just
Hello, I write most of my R code in excel and then paste it into R. I am wondering if there is a limit to how much I can paste? I want to paste about 19,000 lines of code should this work? I am doing this because when I did it chunks it took about an hour and half. I thought if I could insert it al

Re: [R] post to this list

2008-10-14 Thread stephen sefick
http://www.r-project.org/ go to mailing list go to the web interface link and follow the directions 2008/10/14 Αργυρώ Ανταράκη <[EMAIL PROTECTED]>: > I would like to post to this list. > > Thank you > > Agryro > > > > > > ___ > ×ñçóéìïðïéåßôå

Re: [R] library MICE warning message

2008-10-14 Thread Dieter Menne
Αργυρώ Ανταράκη yahoo.gr> writes: > > imp<-mice(mydata, im=c("","pmm","logreg","logreg"),m=5) > for a variable with no missing data, a numeric one and two variables with > binary data. > > I got the following message: > > There were 37 warnings (use warnings() to see them) warnings() > > War

Re: [R] problem using R

2008-10-14 Thread shradha mukherjee
Its fixed. Thank you.:D --- On Tue, 10/14/08, John Kane <[EMAIL PROTECTED]> wrote: From: John Kane <[EMAIL PROTECTED]> Subject: Re: [R] problem using R To: "'shradha mukherjee'" <[EMAIL PROTECTED]>, r-help@r-project.org, "Daniel Malter" <[EMAIL PROTECTED]> Date: Tuesday, October 14, 2008, 6:47

[R] post to this list

2008-10-14 Thread Αργυρώ Ανταράκη
I would like to post to this list. Thank you Agryro ___ ×ñçóéìïðïéåßôå Yahoo!; ÂáñåèÞêáôå ôá åíï÷ëçôéêÜ ìçíýìáôá (spam); Ôï Yahoo! Mail äéáèÝôåé ôçí êáëýôåñç äõíáôÞ ðñïóôáóßá êáôÜ ôùí åíï÷ëçôéêþí ìçíõìÜôùí http://login.yahoo.c

[R] library MICE warning message

2008-10-14 Thread Αργυρώ Ανταράκη
Hello. I have run the command imp<-mice(mydata, im=c("","pmm","logreg","logreg"),m=5)  for a variable with no missing data, a numeric one and two variables with binary data. I got the following message: There were 37 warnings (use warnings() to see them) > warnings() Warning messages: 1: In

[R] post to this list

2008-10-14 Thread Αργυρώ Ανταράκη
I would like to post to this list. ___ ×ñçóéìïðïéåßôå Yahoo!; ÂáñåèÞêáôå ôá åíï÷ëçôéêÜ ìçíýìáôá (spam); Ôï Yahoo! Mail äéáèÝôåé ôçí êáëýôåñç äõíáôÞ ðñïóôáóßá êáôÜ ôùí åíï÷ëçôéêþí ìçíõìÜôùí http://login.yahoo.com/config/mail?.intl=

Re: [R] IAA test on my multinomial logit

2008-10-14 Thread Gilbert Brenes
If I'm not wrong, the test for IIA is the Hausman test. Look for hausman.systemfit in the systemfit package. Gilbert - Original Message - From: "Erika Known" <[EMAIL PROTECTED]> To: Sent: Tuesday, October 14, 2008 11:43 AM Subject: [R] IAA test on my multinomial logit Hi all

Re: [R] lattice panel question

2008-10-14 Thread Deepayan Sarkar
On 10/13/08, Ferry <[EMAIL PROTECTED]> wrote: > Dear R users, > > How to change lattice panel label/text from the automatically generated > label (based on the conditioning) to our own set of label? > > for example: > > someStuff <- data.frame(area = rep(c("SOUTH", "NORTH", "EAST", "WEST"), eac

Re: [R] help about how can R compute AIC?

2008-10-14 Thread Prof Brian Ripley
On Tue, 14 Oct 2008, Arnau Mir Torres wrote: El 14/10/2008, a las 18:05, Martin Maechler escribió: "AMT" == Arnau Mir Torres <[EMAIL PROTECTED]> on Tue, 14 Oct 2008 17:13:01 +0200 writes: "AMT" == Arnau Mir Torres <[EMAIL PROTECTED]> on Tue, 14 Oct 2008 17:13:01 +0200 writes: AMT> Hel

Re: [R] Doing a Task Without Using a For Loop

2008-10-14 Thread Avram Aelony
or perhaps... data1$NinYear <- with(data1, ave(ID, Year, FUN = length)) > unique(data1) ID Year NinYear 1 209 1971 2 3 213 1951 2 5 213 1953 20 20 213 1954 11 31 213 1955 2 33 234 1953 20 38 234 1958 2 40 234 1965 3 43 249 1952 2 A

[R] IAA test on my multinomial logit

2008-10-14 Thread Erika Known
Hi all I'm trying to immigrate from Stata and I want to preform a IIA test (Independence of Irrelevant Alternatives) on my multinomial logit model in R, but I can't seem to find a package that dos the trick. I've been looking at http://bm2.genes.nig.ac.jp/RGM2/R_current/library/systemfit/man/hausm

Re: [R] help about how can R compute AIC?

2008-10-14 Thread Arnau Mir Torres
El 14/10/2008, a las 18:05, Martin Maechler escribió: "AMT" == Arnau Mir Torres <[EMAIL PROTECTED]> on Tue, 14 Oct 2008 17:13:01 +0200 writes: "AMT" == Arnau Mir Torres <[EMAIL PROTECTED]> on Tue, 14 Oct 2008 17:13:01 +0200 writes: AMT> Hello. AMT> I need to know how can R comput

[R] Advice on Computer Specifications

2008-10-14 Thread Steve_Friedman
Hello I'm running into a variety of limitations with my computer complaining that it doesn't have sufficient memory. It is a Dell Latitude D630 Duo Core CPU T7700 @ 2.40 GHz, with 3.50 GB RAM. I'm working with relatively large dataframes > dim(AllYears) returns 4071840 records with 13var

Re: [R] Doing a Task Without Using a For Loop

2008-10-14 Thread Henrique Dallazuanna
Is this what you want? data1$NinYear <- with(data1, ave(ID, Year, FUN = length)) On Tue, Oct 14, 2008 at 12:22 PM, Tom La Bone <[EMAIL PROTECTED]>wrote: > > The table function, which I was unaware of, works great. However, I still > don't see how to assign the values calculated with table to dat

Re: [R] help about how can R compute AIC?

2008-10-14 Thread Martin Maechler
> "AMT" == Arnau Mir Torres <[EMAIL PROTECTED]> > on Tue, 14 Oct 2008 17:13:01 +0200 writes: > "AMT" == Arnau Mir Torres <[EMAIL PROTECTED]> > on Tue, 14 Oct 2008 17:13:01 +0200 writes: AMT> Hello. AMT> I need to know how can R compute AIC when I study a regression

Re: [R] Doing a Task Without Using a For Loop

2008-10-14 Thread Tom La Bone
The table function, which I was unaware of, works great. However, I still don't see how to assign the values calculated with table to data1$NinYear without using a loop. Tom Henrique Dallazuanna wrote: > > Try this: > > with(data1, table(ID, Year)) > > On Tue, Oct 14, 2008 at 10:58 AM, To

Re: [R] Remove warnings.

2008-10-14 Thread Mark Lyman
charter.net> writes: > > The problem is that I am interested in all the warnings but after they have been reported using the > 'warnings()' command I am no longer interested in those warnings but similar warnings (of the same type) > may occur with subsequent invocations and I am interested i

[R] help about how can R compute AIC?

2008-10-14 Thread Arnau Mir Torres
Hello. I need to know how can R compute AIC when I study a regression model? For example, if I use these data: growth tannin 1 12 0 2 10 1 3 8 2 4 11 3 5 6 4 6 7 5 7 2 6 8 3 7 9 3 8 and I do model <- lm (grow

Re: [R] Doing a Task Without Using a For Loop

2008-10-14 Thread Claudia Beleites
> This seems to work but is horribly slow (some files I am working with have > over 500,000 lines). Can anyone suggest a faster way of doing this, perhaps > a way that does not use a for loop? Thanks. If the table solutions don't work or take forever with your real data, have a look into the wiki:

Re: [R] Remove warnings.

2008-10-14 Thread rkevinburton
The problem is that I am interested in all the warnings but after they have been reported using the 'warnings()' command I am no longer interested in those warnings but similar warnings (of the same type) may occur with subsequent invocations and I am interested in these "new" warnings not the o

[R] Question: how to make a sample from my data set

2008-10-14 Thread Alex99
Hi everyone, I have a question about sampling. I have a data set which includes 25 different variables named; symptom1, symptom2,.,symptom25(25 columns).Each variable(symptom) has 9 patients (9 columns). I need to use random sampling to make, 5 different samples from my data. i.e. using all

Re: [R] Re : (a) Credit Scoring models and (b) aceesing earlier emails

2008-10-14 Thread Greg Snow
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > project.org] On Behalf Of saggak > Sent: Tuesday, October 14, 2008 4:20 AM > To: justin bem > Cc: r-help@r-project.org > Subject: Re: [R] Re : (a) Credit Scoring models and (b) aceesing > earlier emails > > Thanks Mr

Re: [R] How to checkpoint-restart R jobs in batch mode?

2008-10-14 Thread Prof Brian Ripley
On Tue, 14 Oct 2008, Mizanur Khondoker wrote: Dear list, Most high performance computing clusters/grid engines have some restrictions on how long a job can be run in batch mode. The cluster I am using has maximum of 48 hours limit, but my job would take far more than that. I know that it is p

Re: [R] Remove warnings.

2008-10-14 Thread hadley wickham
Why don't you just suppress the warning messages you are not interested in? ?suppressWarnings Hadley On Tue, Oct 14, 2008 at 7:59 AM, <[EMAIL PROTECTED]> wrote: > I have a function that could possibly generate warnings in a loop. What I > want is to report the warnings (warnings()) then clear

[R] How to checkpoint-restart R jobs in batch mode?

2008-10-14 Thread Mizanur Khondoker
Dear list, Most high performance computing clusters/grid engines have some restrictions on how long a job can be run in batch mode. The cluster I am using has maximum of 48 hours limit, but my job would take far more than that. I know that it is possible to checkpoint jobs without modifying the

Re: [R] Doing a Task Without Using a For Loop

2008-10-14 Thread Dimitris Rizopoulos
try the following: out <- tapply(data1$ID, list(data1$ID, data1$Year), length) out[is.na(out)] <- 0 out I hope it helps. Best, Dimitris Tom La Bone wrote: Assume that I have the dataframe "data1", which is listed at the end of this message. I want count the number of lines that each person

Re: [R] Doing a Task Without Using a For Loop

2008-10-14 Thread Henrique Dallazuanna
Try this: with(data1, table(ID, Year)) On Tue, Oct 14, 2008 at 10:58 AM, Tom La Bone <[EMAIL PROTECTED]>wrote: > > Assume that I have the dataframe "data1", which is listed at the end of > this > message. I want count the number of lines that each person has for each > year. For example, the per

Re: [R] Doing a Task Without Using a For Loop

2008-10-14 Thread Erik Iverson
table(data1$ID, data1$Year) See ?table and other functions referenced in ?table. Tom La Bone wrote: Assume that I have the dataframe "data1", which is listed at the end of this message. I want count the number of lines that each person has for each year. For example, the person with ID=213 ha

[R] Doing a Task Without Using a For Loop

2008-10-14 Thread Tom La Bone
Assume that I have the dataframe "data1", which is listed at the end of this message. I want count the number of lines that each person has for each year. For example, the person with ID=213 has 15 entries (NinYear) for 1953. The following bit of code calculates NinYear: for (i in 1:length(data1$

Re: [R] Variable shortlisting for the logistic regression

2008-10-14 Thread John Kane
--- On Mon, 10/13/08, David Scott <[EMAIL PROTECTED]> wrote: > From: David Scott <[EMAIL PROTECTED]> > Subject: Re: [R] Variable shortlisting for the logistic regression > To: "Frank E Harrell Jr" <[EMAIL PROTECTED]> > Cc: r-help@r-project.org > Received: Monday, October 13, 2008, 6:32 PM > On Mo

Re: [R] AIC score

2008-10-14 Thread John C Frain
Choosing the model with minimum AIC is just one consideration that might be used. If you look at books such as McQuarrie and Tsai (1998), Regression and Time Series Model Selection, World Scientific, you will find about 450 pages dealing mainly with the use of this and similar criteria to select a

Re: [R] AIC score

2008-10-14 Thread Michael Just
John, Thank you for those references. Cheers, Michael On Tue, Oct 14, 2008 at 8:27 AM, John C Frain <[EMAIL PROTECTED]> wrote: > Choosing the model with minimum AIC is just one consideration that > might be used. If you look at books such as McQuarrie and Tsai > (1998), Regression and Time Seri

Re: [R] fit model

2008-10-14 Thread John C Frain
You might try the fgarch package Best Regards John frain 2008/10/14 Vasileios Ismyrlis <[EMAIL PROTECTED]>: > I want to fit a model of Ar(1) mean equation and Arch(1) variance > equation(the equations are to the attached file) to 1000 observations. > How can I do that? > Vasileios Ismyrlis > > _

Re: [R] problem using R

2008-10-14 Thread John Kane
I would point out that the OP does not say that R is a part of the course, only that they are using it to do some work. R may be a tool of choice not a requirement and it is quite possible that the instructor does not know anything about R. --- On Tue, 10/14/08, Daniel Malter <[EMAIL PROTE

Re: [R] problem using R

2008-10-14 Thread John Kane
--- On Tue, 10/14/08, shradha mukherjee <[EMAIL PROTECTED]> wrote: > From: shradha mukherjee <[EMAIL PROTECTED]> > Subject: [R] problem using R > To: r-help@r-project.org > Received: Tuesday, October 14, 2008, 4:37 AM > Hi , > I am having serious trouble doing this homework. I am using > R for

Re: [R] problem using R

2008-10-14 Thread Daniel Malter
Hi, get any of the manuals that are an introduction to R, e.g. from CRAN, which describe the steps of how to start in R. You can google-search them too. You will find what it takes to do that in there. Hints: 1. R is object oriented. That is, your read.table command creates an object Wdbc. It do

[R] Remove warnings.

2008-10-14 Thread rkevinburton
I have a function that could possibly generate warnings in a loop. What I want is to report the warnings (warnings()) then clear out the last.warning object so that if there is a call without warnings I will not see the previous warning. Some example code: generatewarning <- function(s) {

[R] fit model

2008-10-14 Thread Vasileios Ismyrlis
I want to fit a model of Ar(1) mean equation and Arch(1) variance equation(the equations are to the attached file) to 1000 observations. How can I do that? Vasileios Ismyrlis __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-hel

Re: [R] problem using R

2008-10-14 Thread Duncan Murdoch
On 10/14/2008 4:37 AM, shradha mukherjee wrote: Hi , I am having serious trouble doing this homework. I am using R for doing the homework. If this is homework, you should ask your instructor or teaching assistant for help. There are at least two reasons for this: - They're the only ones w

[R] Fwd: sn package - skew t - code for analytical expressions for first 4 moments

2008-10-14 Thread Luc Hoegaerts
Hello please note that the code at https://stat.ethz.ch/pipermail/r-help/2006-August/110892.html to compute indices of skewness and kurtosis for the skew-t distribution is not correct. It has been kindly pointed out that i made some error in this code, which was a bit too quickly copied from t

[R] problem using R

2008-10-14 Thread shradha mukherjee
Hi , I am having serious trouble doing this homework. I am using R for doing the homework. I am having the following specific problem: a) when I input the data using the command > Wbdc <-read.table("wdbc.txt")  I do not see the data. b) When I want to run histogram using command > hist(area) I ge

[R] Question about transposing tables / matrixes in R

2008-10-14 Thread Vie
Hi, I have a huge table, approximatly 16,000 x 12,000, full of various integers. Its a tab delimited file approx 400mb in size. R takes ages to read it in (read.delim), and store it as a variable. My aim is to transpose the table, however I am hesistate to do it incase it crashes my local server,

Re: [R] request: How to ignore columns having zero sums

2008-10-14 Thread Muhammad Azam
Dear Jorge Thanks a lot. - Original Message From: Jorge Ivan Velez <[EMAIL PROTECTED]> To: Muhammad Azam <[EMAIL PROTECTED]> Cc: R mailing list Sent: Tuesday, October 14, 2008 1:52:15 PM Subject: Re: [R] request: How to ignore columns having zero sums Dear Muhammad, Try also x <-

Re: [R] ggplot2 plot with symbols and then add line

2008-10-14 Thread hadley wickham
On Tue, Oct 14, 2008 at 6:46 AM, stephen sefick <[EMAIL PROTECTED]> wrote: > r <-(structure(list(TSS = c(2.8, 8.4, 11, 1.3, 4.2, 2, 3.4, 14, 8.2, > 3.1, 1.4, 0.9, 0.5, 6.1, 9.2, 0.6, 1, 11, 2.4, 1.2, 1.3, 1.3, > 0, 1.8, 8, 11, 11, 8.5, 8.5, 1.8, 13, 4.4, 1.4, 2.1, 0.5, 25, > 25, 9.3, 6.1, 1.6, 1.5,

Re: [R] Fw: Logistic regresion - Interpreting (SENS) and (SPEC)

2008-10-14 Thread Frank E Harrell Jr
Gabor Grothendieck wrote: On Mon, Oct 13, 2008 at 11:47 PM, Frank E Harrell Jr <[EMAIL PROTECTED]> wrote: Gabor Grothendieck wrote: On Mon, Oct 13, 2008 at 11:21 PM, Frank E Harrell Jr <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: I recall a concept of Snout: sensitivity that is high e

Re: [R] request: How to ignore columns having zero sums

2008-10-14 Thread Jorge Ivan Velez
Dear Muhammad, Try also x <- c(1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,0,0,0,0,0,0,0,0); x1 <- array(x, dim=c(4,6)) x1[,apply(x1,2,function(x) !all(x==0))] HTH, Jorge On Tue, Oct 14, 2008 at 4:02 AM, Muhammad Azam <[EMAIL PROTECTED]> wrote: > Dear friends > I have an array consist of r-rows and c-col

[R] ggplot2 plot with symbols and then add line

2008-10-14 Thread stephen sefick
r <-(structure(list(TSS = c(2.8, 8.4, 11, 1.3, 4.2, 2, 3.4, 14, 8.2, 3.1, 1.4, 0.9, 0.5, 6.1, 9.2, 0.6, 1, 11, 2.4, 1.2, 1.3, 1.3, 0, 1.8, 8, 11, 11, 8.5, 8.5, 1.8, 13, 4.4, 1.4, 2.1, 0.5, 25, 25, 9.3, 6.1, 1.6, 1.5, 19, 19, 24, 9.6, 1.8, 1.4, 1), GPP = c(1.213695235, 3.817313822, 1.267930498, 10.4

  1   2   >