[R] name of object from character vector

2005-03-11 Thread Gasper Cankar
Hello everyone! A simple question (I'm not sure about the answer): How can I give a name to my data.frame from a character vector of names? For example, each data.frame is a table of results for a subject and I have a vector of subject names like b - c(math, geography, history) How do I

Re: [R] name of object from character vector

2005-03-11 Thread Dimitris Rizopoulos
look at ?assign, e.g., b - c(math, geography, history) assign(b[1], data.frame(x=rnorm(5), y=rnorm(5))) math I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven,

[R] RODBC Package

2005-03-11 Thread Stephan Freyberger
Hello R-Help, is there any way of using the RODBC Package on a Mac OS X System? If yes, what do I need to get it running. Concerning these issues, I am pretty unexperienced, so please state any step necessary. The actual problem is accessing data in Excel- files. (unfortunately no alternative

Re: [R] Bonferroni simultaneous confidence intervals for multiple regression

2005-03-11 Thread Dieter Menne
Cara Gormally cgormally at plantbio.uga.edu writes: I'm having no luck figuring out how to find Bonferroni simultaneous confidence intervals to obtain a family of estimates in R. Try package multcomp (no Bonferroni, but more powerful alternatives) or multtest on Bioconductor

[R] Calculating lengths of runs of 0 or 1 sequences in meteorological data

2005-03-11 Thread Mohammad Ehsanul Karim
Dear List Members, I need some help about programming in S language. My problem is as follows: I have meteorological data (about rainfall measurement each day from 1989-2002), say like http://www.angelfire.com/ab5/get5/data.rainfall.txt or http://www.angelfire.com/ab5/get5/R.rainfall.txt in a

Re: [R] sample function

2005-03-11 Thread Ted Harding
On 11-Mar-05 Martin C. Martin wrote: hist is lumping things together. Try: sum(temp == 0) compare to the height of the left most bar. Is this a bug in hist? - Martin Well, not a bug strictly speaking since it works as documented, but I do think it's not necessarily a happy choice.

Re: [R] Calculating lengths of runs of 0 or 1 sequences in meteorological data

2005-03-11 Thread Detlef Steuer
Mohammad, ?rle is your friend, I guess. Detlef On Fri, 11 Mar 2005 03:07:56 -0800 (PST) Mohammad Ehsanul Karim [EMAIL PROTECTED] wrote: Dear List Members, I need some help about programming in S language. My problem is as follows: I have meteorological data (about rainfall measurement

RE: [R] Calculating lengths of runs of 0 or 1 sequences in meteo

2005-03-11 Thread Ted Harding
On 11-Mar-05 Mohammad Ehsanul Karim wrote: Dear List Members, I need some help about programming in S language. My problem is as follows: I have meteorological data (about rainfall measurement each day from 1989-2002), say like http://www.angelfire.com/ab5/get5/data.rainfall.txt or

Re: [R] R: LIST function and LOOPS

2005-03-11 Thread Clark Allan
hi thanx for the help. i dont want to use matrices. i solve my problem, see the example below. the set.seed is used because in my actual application i need to generate INDEPENDENT variables. will this ensure that the variables are independent? z3-function(w) { for (i in 1:w) { ss-0

RE: [R] Bonferroni simultaneous confidence intervals for multipleregression

2005-03-11 Thread John Fox
Dear Cara, You could use the confint() function, setting the level argument to 1 - alpha/length(coefficients(model)), where model is the linear model that you've fit and alpha is the complement of the level of confidence. If you're interested only in a subset of say p coefficients, then use 1 -

Re: [R] Logistic regression goodness of fit tests

2005-03-11 Thread Frank E Harrell Jr
Trevor Wiens wrote: On Thu, 10 Mar 2005 16:19:41 -0600 Frank E Harrell Jr [EMAIL PROTECTED] wrote: The goodness of fit test only works on prespecified models. It is not valid when stepwise variable selection is used (unless perhaps you use alpha=0.5). Perhaps I'm blind, but I can't find any

Re: [R] RODBC Package

2005-03-11 Thread Prof Brian Ripley
On Fri, 11 Mar 2005, Stephan Freyberger wrote: Hello R-Help, is there any way of using the RODBC Package on a Mac OS X System? If yes, what do I need to get it running. Concerning these issues, I am pretty unexperienced, so please state any step necessary. The actual problem is accessing data in

[R] R: generating independent vectors

2005-03-11 Thread Clark Allan
hi all i would like to generate independent vectors. i have included the code below. i display the correlation matrix of the n*p (n=the number of samples, p= the number of variables) matrix. what i find is that as n increases, the correlation matrix tends to an identity matrix. i.e.

Re: [R] R: generating independent vectors

2005-03-11 Thread Chuck Cleland
You might try mvrnorm() in MASS. library(MASS) mvrnorm(n=10, mu=rep(0, 3), Sigma=diag(3), empirical=TRUE) Clark Allan wrote: hi all i would like to generate independent vectors. i have included the code below. i display the correlation matrix of the n*p (n=the number of samples, p= the number of

Re: [R] R: generating independent vectors

2005-03-11 Thread Clark Allan
thanx. this function works and does exactly what i want Chuck Cleland wrote: You might try mvrnorm() in MASS. library(MASS) mvrnorm(n=10, mu=rep(0, 3), Sigma=diag(3), empirical=TRUE) Clark Allan wrote: hi all i would like to generate independent vectors. i have included the code

[R] reading in data problems

2005-03-11 Thread Upasna Sharma
Hi I have a dataset (.txt file and .dat file) in which the length of one record is 144. There is no header in the .txt or .dat file itself. When I read this file using the read.table command, and want to drop some coloumns by setting the argument colClasses to NULL for the columns that I want to

[R] [R-pkgs] mgcv 1.2-0

2005-03-11 Thread Simon Wood
mgcv version 1.2 is on CRAN now. mgcv provides generalized additive models and generalized additive mixed models with automatic estimation of the smoothness of model components. Changes in this version are: * A new gam fitting method is implemented for the generalized case. It provides more

Re: [R] XML to data frame or list

2005-03-11 Thread Gabor Grothendieck
bogdan romocea br44114 at yahoo.com writes: : : Dear useRs, : : I have a simple/RTFM question about XML parsing. Given an XML file, : such as (fragment) : A100/A : B23/B : Ctrue/C : how do I import it in a data frame or list, so that the values (100, : 23, true) can be accessed through the

Re: [R] XML to data frame or list

2005-03-11 Thread Barry Rowlingson
Gabor Grothendieck wrote: You could check out the ctv package that was recently announced. It uses XML so its source would provide an example. If its a one-time operation, Excel reads XML and you could then use one of the many Excel to R possibilities. For an xml file like this: ?xml version=1.0?

[R] aov or t-test applied on all variables of a data.frame

2005-03-11 Thread Christoph Lehmann
Hi I have a data.frame with say 10 continuous variables and one grouping factor (say 3 levels) how can I easily (without loops) apply for each continous variable e.g. an aov, with the grouping factor as my factor (or if the grouping factor has 2 levels, eg. a t-test) thanks for a hint cheers

Re: [R] reading in data problems

2005-03-11 Thread Thomas Lumley
On Fri, 11 Mar 2005, Upasna Sharma wrote: Hi I have a dataset (.txt file and .dat file) in which the length of one record is 144. There is no header in the .txt or .dat file itself. When I read this file using the read.table command, and want to drop some coloumns by setting the argument

Re: [R] aov or t-test applied on all variables of a data.frame

2005-03-11 Thread Thomas Lumley
On Fri, 11 Mar 2005, Christoph Lehmann wrote: Hi I have a data.frame with say 10 continuous variables and one grouping factor (say 3 levels) how can I easily (without loops) apply for each continous variable e.g. an aov, with the grouping factor as my factor (or if the grouping factor has 2

Re: [R] aov or t-test applied on all variables of a data.frame

2005-03-11 Thread Dimitris Rizopoulos
you mean something like this: dat - data.frame(matrix(rnorm(10*100), 100), f=sample(letters[1:3], 100, TRUE)) models - lapply(dat[sapply(dat, is.numeric)], function(x, f) aov(x~f), f=dat$f) # models lapply(models, summary) I hope it helps. Best, Dimitris Dimitris Rizopoulos

Re: [R] Logistic regression goodness of fit tests

2005-03-11 Thread Trevor Wiens
On Fri, 11 Mar 2005 07:32:30 -0500 Frank E Harrell Jr [EMAIL PROTECTED] wrote: What I mean is the effective significance level for keeping a variable in the model. Using AIC for one degree of freedom variables is effectively using an alpha of 0.16 if I recall properly. But I hope you got

Re: [R] aov or t-test applied on all variables of a data.frame

2005-03-11 Thread Peter Dalgaard
Christoph Lehmann [EMAIL PROTECTED] writes: Hi I have a data.frame with say 10 continuous variables and one grouping factor (say 3 levels) how can I easily (without loops) apply for each continous variable e.g. an aov, with the grouping factor as my factor (or if the grouping factor has 2

[R] Re: [S] Looking for advanced R/S+ programming course in bay area

2005-03-11 Thread eugene dalt
Check out www.xlsolutions-corp.com, they are offering a course in San Francisco March 31st - April 1st. --- paul king [EMAIL PROTECTED] wrote: Hi all, I am taking a new job in San Francisco and looking for an upcoming advanced R/S+ programming course in bay area. Best - Paul

[R] Simplex(boot) returning invalid answer

2005-03-11 Thread Andrew Stoneman
In trying to use simplex() from the boot package, I have run into a situation that doesn't seem like it should be possible. It is claiming that it has solved the LP, but returns a vector of all zeros, which does not satisfy the constraints I passed in. A small example: ubMatrix -

[R] dates and graphic

2005-03-11 Thread Riad BENGHIDA
hi I'm student in master, for my work I use R software, I make a grphic, I will, for each point on graphic the corresponding date of consulting. The number of consultations is variable for the patients ( min=6, max= 44) thank's - mails !

[R] difficulties with the save.image() function

2005-03-11 Thread Tracy Bergemann
Dear list, I've had difficulty saving my workspace to an .RData file. This causes considerable frustration as it means that I have to regenerate my analysis every time I want to update it. For microarray data in particular, this can be quite time consuming. I'm saving my data to a network

Re: [R] aov or t-test applied on all variables of a data.frame

2005-03-11 Thread Christoph Lehmann
many thanks for the sapply hint. How can I use sapply for a compact result of the aov computation, say I call sapply(dd[-1], function(y, f) aov(y ~ f), f = dd$V1) aov gives the result in another form than t.test thanks a lot Peter Dalgaard wrote: Christoph Lehmann [EMAIL PROTECTED] writes: Hi I

[R] Lattice bwplot error

2005-03-11 Thread Yang, Richard
Dear all; Searching the R site for answers to my problem, but found none. Here is the run and error: bwplot(dev ~ Dbhcl | Period, data = DbhValid2, font = 2, + main=list( ), axis.font =2, + ylab = list(label = Residual (cm), font = 2), + xlab = list(label = Dbh class (cm), font =

[R] warning message when using anova

2005-03-11 Thread tpeng
Hi can someone help me with the following warning message I got when I used two way anova: Warning messages: 1: Models with response NULL removed because response differs from model 1 in: anova.lmlist(object, ...) 2: Models with response NULL removed because response differs from model 1 in:

Re: [R] Lattice bwplot error

2005-03-11 Thread Deepayan Sarkar
On Friday 11 March 2005 11:47, Yang, Richard wrote: Dear all; Searching the R site for answers to my problem, but found none. If this is what I'm guessing it is, you haven't searched carefully enough. This was a bug (in lattice) that was reported several times, but has been fixed long ago.

RE: [R] Lattice bwplot error

2005-03-11 Thread Yang, Richard
Thank, Deepayan Sarkar and Sundar Dorai-Raj for their quick responses. After updating lattice, the problem resolved. Richard -Original Message- Subject: [R] Lattice bwplot error Dear all; Searching the R site for answers to my problem, but found none. Here is the run and

Re: [R] Negative binomial regression for count data,

2005-03-11 Thread Seyed Reza Jafarzadeh
Dear list, I would like to know: 1. After I have used the R code (http://pscl.stanford.edu/zeroinfl.r) to fit a zero-inflated negative binomial model, what criteria I should follow to compare and select the best model (models with different predictors)? 2. How can I compare the model I get

Re: [R] Bonferroni simultaneous confidence intervals for multiple regression

2005-03-11 Thread Spencer Graves
John Fox described one version of the standard Bonferroni correction. I just got 51 hits from www.r-project.org - Search - R Site Search - Bonferroni; you may wish to review them. More generally, a Google search for Bonferroni produced about 347,000 hits, the fifth of which was the

Re: [R] dates and graphic

2005-03-11 Thread Spencer Graves
I'm not certain what you want, but will the following help you: plot(1:4, type=n) text(1:4, letters[1:4]) If this does NOT solve your problem, please tell us why it is deficient. If you try something else that does not work, please describe what you tried and why you didn't like

[R] pretty print of summary

2005-03-11 Thread Charles Dugas
Dear R-users, using the interactive mode, the command summary(my.survreg.object) will output details of the object my.survreg.object in a very neat fashion. I would like to have that sent to a file, in ascii format, as it appears within the interactive mode. Is that possible ? This seems like

Re: [R] pretty print of summary

2005-03-11 Thread Marc Schwartz
On Fri, 2005-03-11 at 22:49 -0500, Charles Dugas wrote: Dear R-users, using the interactive mode, the command summary(my.survreg.object) will output details of the object my.survreg.object in a very neat fashion. I would like to have that sent to a file, in ascii format, as it