Re: [R] testing independence of categorical variables

2007-11-26 Thread Bernardo Rangel Tura
On Thu, 2007-11-22 at 16:16 +0500, Shoaaib Mehmood wrote: hi, is there a way of calculating of measuring dependence between two categorical variables. i tried using the chi square test to test for independence but i got error saying that the lengths of the two vectors don't match. Suppose

Re: [R] problem in closing R console

2007-11-26 Thread Uwe Ligges
amna khan wrote: Dear Sir When I close R console then following message apear when I want to save the workspace. If I close the R console without saving workspace then R console is closed otherwise not. Error in gzfile(file, wb) : unable to open connection In addition: Warning message:

Re: [R] about Runtime Error

2007-11-26 Thread Uwe Ligges
Xin Huang wrote: Hi, I wrote my own R program doing some MCMC simulation but I often got Runtime Error even the program only run for a couple of hundred times. The detail error message is as following: Runtime Error! Program: C:\Program Files\R\R-2.5.1\bin\Rgui.exe This application

Re: [R] how to calculate the return?

2007-11-26 Thread Richard . Cotton
Denver, data is a matrix like this AMR BS GE HR MO UK SP500 1974 -0.3505 -0.1154 -0.4246 -0.2107 -0.0758 0.2331 -0.2647 1975 0.7083 0.2472 0.3719 0.2227 0.0213 0.3569 0.3720 1976 0.7329 0.3665 0.2550 0.5815 0.1276 0.0781 0.2384 1977

Re: [R] CPCA?

2007-11-26 Thread Jari Oksanen
Daniel Berner daniel.berner at mail.mcgill.ca writes: It would be great to know if and where an R code for Common Principal Component Analysis is available. The only code I know is in IMSL Fortran library, and that is proprietary, and that is expensive. After a quick look, it really appears

Re: [R] help pleaseeeeeeeee

2007-11-26 Thread Clara Cordeiro
Hi Thank you very much for you interest and help in this mysterious problem. I am going to investigate the random numbers issue. Concerning the order.maxit helps but it is not what I have in mind. I think that in case order.max - if (is.null(order.max)) floor(10 * log10(n.))

[R] Unweighted meta-analysis

2007-11-26 Thread Roy Sanderson
Hello I'm very much a beginner on meta-analysis, so apologies if this is a trivial posting. I've been sent a set data from separate experimental studies, Treatment and Control, but no measure of the variance of effect sizes, numbers of replicates etc. Instead, for each study, all I have is the

Re: [R] Dot plots in R

2007-11-26 Thread Adrian Dusa
On Saturday 24 November 2007, Paul Smith wrote: Dear All, Can R produce dot plots like the one of the following picture: http://en.wikipedia.org/wiki/Image:Dotplot_of_random_values.png ? I have tried dotchart, but no success. I'm coming late to this thread, but I believe what Paul wants is

Re: [R] help pleaseeeeeeeee

2007-11-26 Thread Ben Bolker
CCordeiro wrote: Hi Thank you very much for you interest and help in this mysterious problem. I am going to investigate the random numbers issue. Concerning the order.maxit helps but it is not what I have in mind. I think that in case Dear Clara, this did actually get

Re: [R] CPCA?

2007-11-26 Thread Ben Bolker
Jari Oksanen wrote: Daniel Berner daniel.berner at mail.mcgill.ca writes: It would be great to know if and where an R code for Common Principal Component Analysis is available. The only code I know is in IMSL Fortran library, and that is proprietary, and that is expensive. After a

[R] pass lm( ) a char vector as the variables to be included

2007-11-26 Thread boshao zhang
Dear Everyone in list: I am writing some codes to automate the process of fitting linear models where the names of variables of models are produced and stored in character vectors. But I have problems to pass the vectors to the lm( ) because I don't know how to strip the quotation marks

Re: [R] pass lm( ) a char vector as the variables to be included

2007-11-26 Thread Richard . Cotton
Here are the codes of the example of lm( ): ## Annette Dobson (1990) An Introduction to Generalized Linear Models. ## Page 9: Plant Weight Data. ctl - (4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt - (4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group - gl(2,10,20,

Re: [R] testing independence of categorical variables

2007-11-26 Thread John Kane
prettyR --- Shoaaib Mehmood [EMAIL PROTECTED] wrote: i cant find help for xtab. Which package contains this function On Nov 24, 2007 12:16 PM, G Ilhamto [EMAIL PROTECTED] wrote: hi shohaib, have you tried xtab instead of chisq.test? Ilham On Nov 22, 2007 6:16 AM, Shoaaib

[R] writing summary() to a text file

2007-11-26 Thread Federico Calboli
Hi All, I would like to output the results of a function into a text file, legible as a such. The function produces a summary quite like: summary(lm(x ~ y + w * z)) [for instance] and I am not clear how to save this summary into a text file 'automagically', because I need to be able to do

[R] help in md scaling

2007-11-26 Thread G Ilhamto
Dear list, I am starting a new project in cmdscale, and I have a question regarding distance matrix and covariance matrix. Can I use covariance as my distance matrix? Any good reference in this matter? Thank you, ilham [[alternative HTML version deleted]]

Re: [R] writing summary() to a text file

2007-11-26 Thread John Kane
Would something like this do it? sink(file=reg.txt) summary(reg) sink() --- Federico Calboli [EMAIL PROTECTED] wrote: Hi All, I would like to output the results of a function into a text file, legible as a such. The function produces a summary quite like: summary(lm(x ~ y + w * z))

[R] R-2.6.1 is released

2007-11-26 Thread Peter Dalgaard
I've rolled up R-2.6.1.tar.gz a short while ago. This is a maintenance release and fixes a number of mostly minor bugs and platform issues, as well as a couple of major problems. Probably, the most important issues were - save-to-postscript on Windows - tcltk event loop with X11 - build issue on

Re: [R] writing summary() to a text file

2007-11-26 Thread jim holtman
?capture.output On Nov 26, 2007 9:31 AM, Federico Calboli [EMAIL PROTECTED] wrote: Hi All, I would like to output the results of a function into a text file, legible as a such. The function produces a summary quite like: summary(lm(x ~ y + w * z)) [for instance] and I am not clear how

Re: [R] writing summary() to a text file

2007-11-26 Thread Richard . Cotton
I would like to output the results of a function into a text file, legible as a such. The function produces a summary quite like: summary(lm(x ~ y + w * z)) You can either redirect output to a file using cat or sink; generate a latex table using xtable (in the xtable package); or export

Re: [R] PCA with NA

2007-11-26 Thread Kevin Wright
The pcaMethods package offers a collection of different algorithms for PCA, some of which (NIPALS and others) can be used on data that have missing values. Kevin Wright On Nov 24, 2007 4:59 PM, Hartmut Oldenbürger [EMAIL PROTECTED] wrote: Hi Birgit, and All Possibly you should not consider

Re: [R] complex conjugates roots from polyroot?

2007-11-26 Thread Ravi Varadhan
Hi Spencer, The default tolerance in your function might be a bit too conservative (i.e. too small). Here is an example: set.seed(123) z - polyroot(sample(1:5, size=40, rep=T)) # polynomial of degree 39 zmat - which(outer(z, z, FUN=is.conj), arr.ind=T) zmat[zmat[,1] zmat[,2], ] row

Re: [R] writing summary() to a text file

2007-11-26 Thread Gabor Grothendieck
Also, this works: s - summary(iris) capture.output(s, file = myfile.txt) and the Hmisc and xtable packages can output it in latex: library(xtable) print(xtable(s), file = myfile.tex) library(Hmisc) latex(s, file= myfile.tex) On Nov 26, 2007 9:59 AM, John Kane [EMAIL PROTECTED] wrote: Would

[R] Fwd: Empty list to use in a for cycle

2007-11-26 Thread Niccolò Bassani
Dear R-users, I'm posting a problem I already asked help for some time ago, because I'm facing that problem once again and even because now, reading that old e-mail, and the answer recevied, I understand I've not made myself clear. Here's the question: I need to create an empty list of a specific

Re: [R] writing summary() to a text file

2007-11-26 Thread Mike Prager
Federico Calboli [EMAIL PROTECTED] wrote: I would like to output the results of a function into a text file, legible as a such. The function produces a summary quite like: Take a look at the sink() function. Does that do what you need? -- Mike Prager, NOAA, Beaufort, NC * Opinions

Re: [R] Packages - a great resource, but hard to find the right one

2007-11-26 Thread Mike Prager
hadley wickham [EMAIL PROTECTED] wrote: Which moves somewhat back towards my original suggestion of review articles. To me, an article which compared and contrasted four or five packages on a given topic would be much more useful than an article which reviewed only a single package. I think

[R] limits on the length of the name of a script file in R 2.6.0.?

2007-11-26 Thread Dimitri Liakhovitski
Hello! I posted earlier - about my problems with R 2.6 crashing (i.e., telling me it needs to shut down) every time I tried to open an R script. First, it looked like it was unhappy with my working outside of R folder (under Program Files). But not it looks like it was not really the problem. Now,

Re: [R] pass lm( ) a char vector as the variables to be included

2007-11-26 Thread Gavin Simpson
On Mon, 2007-11-26 at 14:17 +, [EMAIL PROTECTED] wrote: Here are the codes of the example of lm( ): ## Annette Dobson (1990) An Introduction to Generalized Linear Models. ## Page 9: Plant Weight Data. ctl - (4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt -

Re: [R] limits on the length of the name of a script file in R 2.6.0.?

2007-11-26 Thread Duncan Murdoch
On 11/26/2007 11:03 AM, Dimitri Liakhovitski wrote: Hello! I posted earlier - about my problems with R 2.6 crashing (i.e., telling me it needs to shut down) every time I tried to open an R script. First, it looked like it was unhappy with my working outside of R folder (under Program Files).

[R] Problem installing R on Solaris 9

2007-11-26 Thread aziza belmaati
I've downloaded R-2.6.0 I want to install it on Solaris, so, I run the configure command, it to be fine, but once I run make it give me the following error: *ld: fatal : fichier Rmain.o : type de machine ELF erronV : EM_386 ld: fatal : Erreurs dans le traitement des fichiers. Aucun rVsultat n'a

[R] All files inactive in installing R

2007-11-26 Thread amna khan
Dear Sir I was facing various problems especially in making graphs. No graph file was displayed. I reinstall the R 2.6.0. During installation all files icon is inactive. It has not been marked. Which is creating many problems particularly grDevices are not responding. How to solve this problem

Re: [R] Problem installing R on Solaris 9

2007-11-26 Thread Prof Brian Ripley
On Mon, 26 Nov 2007, aziza belmaati wrote: I've downloaded R-2.6.0 I want to install it on Solaris, so, I run the configure command, it to be fine, but once I run make it give me the following error: *ld: fatal : fichier Rmain.o : type de machine ELF erronV : EM_386 ld: fatal : Erreurs

[R] Communicating from one function to another

2007-11-26 Thread Thomas L Jones, PhD
My question is a seemingly simple one. I have a bunch of user-defined functions which compute such-and-such objects. I want to be able to define a variable in a particular function, then make use of it later, perhaps in a different function, without necessarily having to move it around in

Re: [R] Problem installing R on Solaris 9

2007-11-26 Thread Peter Dalgaard
aziza belmaati wrote: I've downloaded R-2.6.0 I want to install it on Solaris, so, I run the configure command, it to be fine, but once I run make it give me the following error: *ld: fatal : fichier Rmain.o : type de machine ELF erronV : EM_386 ld: fatal : Erreurs dans le traitement des

Re: [R] ftable as latex (with Hmisc?)

2007-11-26 Thread Frank E Harrell Jr
Dieter Menne wrote: Dear List, possibly called Frank, I tried to create an ftable lookalike of the following data set in LaTeX/Sweave with summary(formula,..), but I could not get it to work for count tables; numeric tables work fine. summary(formula,...,fun=table) does not give the

Re: [R] Fwd: Empty list to use in a for cycle

2007-11-26 Thread Joerg van den Hoff
On Mon, Nov 26, 2007 at 04:35:53PM +0100, Niccolò Bassani wrote: Dear R-users, I'm posting a problem I already asked help for some time ago, because I'm facing that problem once again and even because now, reading that old e-mail, and the answer recevied, I understand I've not made myself

Re: [R] complex conjugates roots from polyroot?

2007-11-26 Thread Ravi Varadhan
Spencer, I just observed that the polynomial root calculation in the package, polynom, using the function solve() is more accurate than the polyroot() function in the base package. Here is an example: set.seed(1234) p - polynomial(sample(1:10, size=45, rep=T)) # degree 44 z - solve(p)

[R] visualizing nucleotide sequence properties

2007-11-26 Thread Bernd Jagla
Hi there, I am looking for R-packages that can help me visualize properties on nucleotide sequences. I want to display sequences in the 1-100K base range as lines and plot features above and below those lines. Any ideas would be welcome. Thanks, Bernd [[alternative

Re: [R] mvr error in PLS package

2007-11-26 Thread Gavin Simpson
On Mon, 2007-11-26 at 09:25 -0800, Bricklemyer, Ross S wrote: All, I have been using a data set to build pls models for three different soil properties. Two of the three models run fine; however I receive the following error for the final model. libs.IC.cal - mvr(libs.IC.fmla, data =

Re: [R] Communicating from one function to another

2007-11-26 Thread Alberto Monteiro
Thomas L Jones wrote: My question is a seemingly simple one. I have a bunch of user- defined functions which compute such-and-such objects. I want to be able to define a variable in a particular function, then make use of it later, perhaps in a different function, without necessarily

Re: [R] Communicating from one function to another

2007-11-26 Thread Duncan Murdoch
On 11/26/2007 1:25 PM, Alberto Monteiro wrote: Thomas L Jones wrote: My question is a seemingly simple one. I have a bunch of user- defined functions which compute such-and-such objects. I want to be able to define a variable in a particular function, then make use of it later, perhaps in

[R] looking for packages that visualize nucleotide sequence properties

2007-11-26 Thread Bernd Jagla
Hi there, I am looking for R-packages that can help me visualize properties on nucleotide sequences. I want to display sequences in the 1-100K base range as lines and plot features above and below those lines. Any ideas would be welcome. Thanks, Bernd

Re: [R] ftable as latex (with Hmisc?)

2007-11-26 Thread Dieter Menne
Dieter Menne wrote: I tried to create an ftable lookalike of the following data set in LaTeX/Sweave with summary(formula,..), but I could not get it to work for count tables; numeric tables work fine. summary(formula,...,fun=table) does not give the full cross breakdown. Frank E

Re: [R] Communicating from one function to another

2007-11-26 Thread Alberto Monteiro
Duncan Murdoch wrote: R doesn't really have global variables. - goes looking in parent environments until it finds the target variable, and makes the assignment there. If it never finds one, it makes the assignment in the global environment, but the name is misleading: it should

[R] Preserving output of MCMC iterations

2007-11-26 Thread Francesco Checchi
Dear colleagues, I'm an epidemiologist with no background in programming and just started using R a few weeks ago. I am working on the epidemiology of African sleeping sickness, and am trying to use R to perform a Monte Carlo Markov Chain analysis to estimate three unknown parameters within a

[R] writing statistical function for boot

2007-11-26 Thread Monica Pisica
Hi everyone, I need help in writing a statistical function for bootstrap. Suppose m is a matrix with n cols and p rows, my original data. What I want to do is a bootstrap (using boot from package boot) on eigenvectors from a PCA done on m with a statistic function calculating the eigenvector

Re: [R] connection diagram

2007-11-26 Thread elw
On Wed, 14 Nov 2007, Manal Helal wrote: Dimn Waves Tot. Parts In Wave Wave NoSerial Index W Order M Index DepTot. D1-Serial D1-IndexD1-OrderD1-M Index D2-Serial D2-IndexD2-OrderD2-M Index 2 7 1 0 1

[R] Plotting with R: setting the y axis

2007-11-26 Thread Dave Jacoby
I have a series of numbers I'm wanting to plot. They come from a nanodrop machine, which graphs with a specific x and y indices. X goes from 220nm to 350nm, which I can set. But the y axis should go from -5 to 65, but I'm finding it impossible to hardcode that. I've looked. I've typed ?plot at

Re: [R] Filling in a Zero Matrix

2007-11-26 Thread Julian Burgos
Hi Amy, Many (perhaps most) of the people on the list do not receive emails with html...so we can't see colored text. Also it would be helpfully to have a bit of your data, so we can run your code (see the posting guide in this regard,http://www.R-project.org/posting-guide.html). Please

Re: [R] question about extreme value distribution

2007-11-26 Thread Greg Snow
As an alternative you could try quantile regression (find a regression line for the 95th percentile), if the relationship between max(y) and x is only due to more points (and therefore more oportunities for large values) then the estimated quantile lines should not differ significantly from 0.

Re: [R] Plotting with R: setting the y axis

2007-11-26 Thread Dylan Beaudette
On Monday 26 November 2007, Dave Jacoby wrote: I have a series of numbers I'm wanting to plot. They come from a nanodrop machine, which graphs with a specific x and y indices. X goes from 220nm to 350nm, which I can set. But the y axis should go from -5 to 65, but I'm finding it impossible to

[R] Specification Tests for Tobit Models

2007-11-26 Thread Malte Brockmann
Dear R-List, I am using Tobit regression models to estimate censored dependent variables (using survreg in the survival package). I have 2 questions: 1) Is there any package providing specification tests for Tobit models (Hausman test proposed by Newey (1987), Journal of Econometrics, White

[R] Problem with avoiding rep

2007-11-26 Thread Paul Smith
Dear All, Suppose that you have the following data: X Frequency 1 3 4 2 3 4 To get a vector with all observations, one could use data - c(rep(1,3),rep(4,2),rep(3,4)) I am wondering whether there exists an easier way of doing this. Any ideas? Thanks in advance, Paul

[R] newbie polr() question

2007-11-26 Thread Max
Hi everyone, I'm trying to understand some R output here for ordinal regression. I have some integer data called A split up into 3 ordinal categories, top, middle and bottom, T, M and B respectively. I have to explain this output to people who have a very poor idea about statistics and just

Re: [R] multiple comparisons/tukey kramer

2007-11-26 Thread Tyler Smith
On 2007-11-23, hadley wickham [EMAIL PROTECTED] wrote: What I need is a reference to the tests implemented in glht, so I can decide which one is appropriate for my data. Sequen, Changepoint et al. may be common terms in some fields, but not in the references I'm working from. Have you read

Re: [R] Problem with avoiding rep

2007-11-26 Thread Gabor Csardi
x - c(1,4,3) freq - c(3,2,4) rep(x, freq) [1] 1 1 1 4 4 3 3 3 3 Gabor On Mon, Nov 26, 2007 at 07:34:36PM +, Paul Smith wrote: Dear All, Suppose that you have the following data: X Frequency 1 3 4 2 3 4 To get a vector with all observations, one could use

Re: [R] Problem with avoiding rep

2007-11-26 Thread Paul Smith
On Nov 26, 2007 7:45 PM, Gabor Csardi [EMAIL PROTECTED] wrote: x - c(1,4,3) freq - c(3,2,4) rep(x, freq) [1] 1 1 1 4 4 3 3 3 3 Thanks, Gabor. I had just tried rep(1:10,10:20) but should have tried rep(1:10,11:20) Paul On Mon, Nov 26, 2007 at 07:34:36PM +, Paul Smith wrote:

Re: [R] Filling in a Zero Matrix

2007-11-26 Thread Julian Burgos
My mistake, by xlabel and ylabel you are refering to the row and column names of your matrix, right? To label a matrix you can simply use colnames() and rownames(). Still its not clear to me what you are trying to do with your code. Perhaps if you give us a sample of your data and explain

Re: [R] Fwd: Empty list to use in a for cycle

2007-11-26 Thread ONKELINX, Thierry
You could try something like this (untested). lapply(unique(elio2$id), function(i){ sub.mu - exp.mu[exp.mu$id==i, ] n - nrow(sub.mu) D - matrix(0, n, n) diag(D) - sub.mu$deriv.link A - mat.cov[seq_len(n), seq_len(n)] R - corstr[seq_len(n), seq_len(n)] SolveD - solve(D) SolveA -

Re: [R] 'Split' character

2007-11-26 Thread Sébastien
One additionnal question about a problem that I just noticed in my script: the list created by my split function is sorted in the increasing order and not in the current order of the elements of the do.call argument (see the results of the two last lines of the following script). I was

[R] spss, string factors, selecting

2007-11-26 Thread Katherine Jones
Hi, I am having trouble with a large dataset I am importing from SPSS. The problem is I have to merge two datasets (which seems to be working OK) then select rows based on attributes. I have a column with either blank cells, B or E entered. I want to select all rows with E. I have other

Re: [R] Unweighted meta-analysis

2007-11-26 Thread Emmanuel Charpentier
Roy Sanderson a écrit : Hello I'm very much a beginner on meta-analysis, so apologies if this is a trivial posting. I've been sent a set data from separate experimental studies, Treatment and Control, but no measure of the variance of effect sizes, numbers of replicates etc. Instead, for

Re: [R] pass lm( ) a char vector as the variables to be included

2007-11-26 Thread Emmanuel Charpentier
Gavin Simpson a écrit : On Mon, 2007-11-26 at 14:17 +, [EMAIL PROTECTED] wrote: Here are the codes of the example of lm( ): ## Annette Dobson (1990) An Introduction to Generalized Linear Models. ## Page 9: Plant Weight Data. ctl - (4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)

Re: [R] Clean programming with R

2007-11-26 Thread Martin Waller
Hmm - I looked for the codetools package on the UK(London) cran site and couldn't find it - where can I find it please? Martin [EMAIL PROTECTED] wrote: library(codetools) findGlobals(power) Thanks for your answer. In addition, findGlobals(power,FALSE) gives the list of the globals

[R] Odds Ratio calculation

2007-11-26 Thread sigalit mangut-leiba
Hello, I want to calculate Odds Ratio. I have a binary outcome and two groups of exposure: '1' are exposed, and '2' are not-exposed. I want '2' to be the reference group. By factor I get group '1' as a reference because it sorted in increasing order. How do I change it? Thank you, Sigalit.

Re: [R] Clean programming with R

2007-11-26 Thread Gabor Csardi
Try some other mirror, or the main site: http://cran.r-project.org/src/contrib/Descriptions/codetools.html You can easily install it via install.packages(codetools) and then selecting an appropriate mirror. Gabor On Mon, Nov 26, 2007 at 08:19:39PM +, Martin Waller wrote: Hmm - I looked

Re: [R] 'Split' character

2007-11-26 Thread Dimitris Rizopoulos
one way is the following: vals - do.call(paste, c(mydata[1:2], sep = :)) fc - factor(vals, levels = unique(vals)) mydata.split - split(mydata, fc, drop = TRUE) names(mydata.split) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public

Re: [R] newbie polr() question

2007-11-26 Thread Prof Brian Ripley
On Mon, 26 Nov 2007, Max wrote: Hi everyone, I'm trying to understand some R output here for ordinal regression. I have some integer data called A split up into 3 ordinal categories, top, middle and bottom, T, M and B respectively. I have to explain this output to people who have a very poor

Re: [R] Clean programming with R

2007-11-26 Thread Prof Brian Ripley
It is part of recent versions of R (a recommended package), so if Mr Waller follows the advice of the posting guide, he will find it already installed. On Mon, 26 Nov 2007, Gabor Csardi wrote: Try some other mirror, or the main site:

Re: [R] Filling in a Zero Matrix

2007-11-26 Thread jim holtman
You can use the reshape package: x - read.table(textConnection(Samp MCI PCT + 11 2 + 1 4 5 + 1 7 8 + 2 4 4 + 2

Re: [R] Communicating from one function to another

2007-11-26 Thread Duncan Murdoch
On 11/26/2007 1:46 PM, Alberto Monteiro wrote: Duncan Murdoch wrote: R doesn't really have global variables. - goes looking in parent environments until it finds the target variable, and makes the assignment there. If it never finds one, it makes the assignment in the global

[R] Time Series Issues, Stationarity ..

2007-11-26 Thread Ozcan Asilkan
Hello, I am very new to R and Time Series. I need some help including R codes about the following issues. I' ll really appreciate any number of answers... # I have a time series data composed of 24 values: myinput = c(n1,n2...,n24); # In order to make a forecasting a, I use the following codes

Re: [R] Odds Ratio calculation

2007-11-26 Thread Uwe Ligges
sigalit mangut-leiba wrote: Hello, I want to calculate Odds Ratio. I have a binary outcome and two groups of exposure: '1' are exposed, and '2' are not-exposed. I want '2' to be the reference group. By factor I get group '1' as a reference because it sorted in increasing order. How do I

Re: [R] ggplo2: fixed extent greater than data?

2007-11-26 Thread thegeologician
hadley wrote: On 11/23/07, thegeologician [EMAIL PROTECTED] wrote: I'd like to produce a series of maps with different data on, but exactly the same extent in each plot. Is there a way of switching the automatic extent (to the data of the last layer added) OFF? I'm trying something

Re: [R] how to compute highest density interval?

2007-11-26 Thread Greg Snow
The hpd function in the TeachingDemos package does this computation (for unimodal densities). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On

Re: [R] Time Series Issues, Stationarity ..

2007-11-26 Thread John C Frain
With 24 values you are asking the impossible from your data. If you use the standard Box Jenkins approach rather than an automatic ARIMA and using any prior knowledge of the data you might manage some form of forecast. Look at graphs of the data and their first differences. Look at graphs of

Re: [R] Time Series Issues, Stationarity ..

2007-11-26 Thread Uwe Ligges
Ozcan Asilkan wrote: Hello, I am very new to R and Time Series. I need some help including R codes about the following issues. I' ll really appreciate any number of answers... # I have a time series data composed of 24 values: myinput = c(n1,n2...,n24); # In order to make a

Re: [R] Install repeated library

2007-11-26 Thread Becky Parker
It worked. The web page must have been down when I tried it the other day. Thank you, Becky On 11/26/07, Jonathan Baron [EMAIL PROTECTED] wrote: Try http://popgen.unimaas.nl/~jlindsey/rcode.html On 11/25/07 10:41, Becky Parker wrote: Hello - I cannot get to

Re: [R] spss, string factors, selecting

2007-11-26 Thread jim holtman
?subset subset(data, column == E) On Nov 26, 2007 3:07 PM, Katherine Jones [EMAIL PROTECTED] wrote: Hi, I am having trouble with a large dataset I am importing from SPSS. The problem is I have to merge two datasets (which seems to be working OK) then select rows based on attributes. I have

Re: [R] Install repeated library

2007-11-26 Thread Becky Parker
I was able to get the repeated library from http://popgen.unimaas.nl/~jlindsey/rcode.htmlhttp://popgen.unimaas.nl/%7Ejlindsey/rcode.html I still have not been able to find the repeated library on CRAN. It is not listed on http://cran.r-project.org/src/contrib/PACKAGES.html I also tried clicking

Re: [R] spss, string factors, selecting

2007-11-26 Thread Katherine Jones
This sort of works. It does select the E data, but unfortunately it doesn't select the data from the other columns; I want to select data across about 5 columns by the factor E in one of the columns. It should be easy, but for some reason it is not working. The spaces being added don't

Re: [R] Install repeated library

2007-11-26 Thread Prof Brian Ripley
On Mon, 26 Nov 2007, Becky Parker wrote: I was able to get the repeated library from http://popgen.unimaas.nl/~jlindsey/rcode.htmlhttp://popgen.unimaas.nl/%7Ejlindsey/rcode.html I still have not been able to find the repeated library on CRAN. It is not listed on

Re: [R] spss, string factors, selecting

2007-11-26 Thread jim holtman
That should give you back a subset of 'data' (with all its columns), for those with E in 'column'. Can you show an example of your data and what the desired output would be. The posting guide asks provide commented, minimal, self-contained, reproducible code so we don't have to speculate on

[R] 2d Joint Density Plot

2007-11-26 Thread Josef Fruehwald
Hi all, I'm fairly new to R, so I'm still trying to feel out what is available to me. I would like to be able to plot joint density in a two dimensional plot where density is indicated by color or darkness gradients, like a 2d color coded topographic map. Ideally, the output would be something

Re: [R] newbie polr() question

2007-11-26 Thread Max
Prof Brian Ripley explained : On Mon, 26 Nov 2007, Max wrote: Hi everyone, I'm trying to understand some R output here for ordinal regression. I have some integer data called A split up into 3 ordinal categories, top, middle and bottom, T, M and B respectively. I have to explain this

Re: [R] 2d Joint Density Plot

2007-11-26 Thread jim holtman
Look at levelplot in the lattice package. On Nov 26, 2007 5:19 PM, Josef Fruehwald [EMAIL PROTECTED] wrote: Hi all, I'm fairly new to R, so I'm still trying to feel out what is available to me. I would like to be able to plot joint density in a two dimensional plot where density is

Re: [R] Communicating from one function to another

2007-11-26 Thread Greg Snow
Global variables are strongly discouraged in R, but there are sometimes when they may be needed and so are possible. One example where they are used is in random number generation, every time a random number function is called (rnorm for example) the global variable .Random.seed is updated so

Re: [R] anyway to force rpart() to include a specific predictor

2007-11-26 Thread Weiwei Shi
just my2cent: could you make a derived feature by including the desired predictor in each of features you use to present to rpart? (by the way, if I can understand your question right, I assume rpart picks only one predictor each time at each node) Best, Weiwei On 11/26/07, Wensui Liu [EMAIL

Re: [R] anova planned comparisons/contrasts

2007-11-26 Thread Greg Snow
Others have shown some approaches that work well for after you fit the model. Here is another approach starting with the model fit itself: tmp - c(control, glucose, fructose, gluc+fruct, sucrose) treatment - factor(rep( tmp, each=10 ), levels=tmp) length - c(75, 67,

Re: [R] newbie polr() question

2007-11-26 Thread Emmanuel Charpentier
Max a écrit : Prof Brian Ripley explained : On Mon, 26 Nov 2007, Max wrote: Hi everyone, I'm trying to understand some R output here for ordinal regression. I have some integer data called A split up into 3 ordinal categories, top, middle and bottom, T, M and B respectively. I have to

[R] generating .Rd files

2007-11-26 Thread Edna Bell
Hi R Gurus! I have a package that I am putting together. I waited until the end to do the documentation and would like to generate a set of empty .Rd files. Is there a quick way to do this, please? Thanks, Edna Bell PS I can't seem to access the Writing R Extensions manual from 2.6.1 on

[R] Please ignore previous .Rd question

2007-11-26 Thread Edna Bell
If the function is f, you can use prompt(f) Sorry thanks, Edna __ 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,

Re: [R] generating .Rd files

2007-11-26 Thread Gabor Csardi
Edna, maybe there is a way, but Rd files are not that difficult, writing an empty one requires less time than writing this email. Then just copy your empty file as many times as you want. Gabor ps. perhaps you didn't install the manuals. You can always read the up-to-date versions at the R

Re: [R] Problem with avoiding rep

2007-11-26 Thread David Winsemius
Paul Smith [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: On Nov 26, 2007 7:45 PM, Gabor Csardi [EMAIL PROTECTED] wrote: x - c(1,4,3) freq - c(3,2,4) rep(x, freq) [1] 1 1 1 4 4 3 3 3 3 Thanks, Gabor. I had just tried rep(1:10,10:20) but should have tried rep(1:10,11:20)

[R] calculate column means when missing data is present

2007-11-26 Thread Luke Neraas
# Hello, # I have a matrix that contains some missing values denoted by NA. # I would like to calculate the mean for each column and not have the # NA values included. here is a sample matrix X below. c1 - c(1,4,3,2,NA,2,5,6,4,2) c2 - c(1,3,6,NA,NA,2,9,6,1,2) c3 - c(2,4,2,NA,4,2,NA,6,3,5) c4

Re: [R] calculate column means when missing data is present

2007-11-26 Thread Denver XU
colMeans(X,na.rm=T) ?colMeans 2007/11/27, Luke Neraas [EMAIL PROTECTED]: # Hello, # I have a matrix that contains some missing values denoted by NA. # I would like to calculate the mean for each column and not have the # NA values included. here is a sample matrix X below. c1 -

Re: [R] calculate column means when missing data is present

2007-11-26 Thread Peter Alspach
Luke Check ?colMeans or help(colMeans) you will see there is an agrument, na.rm, which by default is FALSE - you need to set it to TRUE. Peter Alspach -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Luke Neraas Sent: Tuesday, 27 November 2007

Re: [R] spss, string factors, selecting

2007-11-26 Thread Katherine Jones
Hi, This is probably a case where someone has to see what is happening on my computer and it is complicated by my data being from SPSS (not my choice). It is quite hard to give my data, because it is such a large dataset. I have analysed 9 other datasets that work fine, but this

[R] lme object manipulation

2007-11-26 Thread SHIN LIN
Hello: I have an lme object, say lme_res2, which was generated using the varIdent. I'm trying to extract the double 1.532940 from the object, but I can't find it by attributes(lme_res2) or attributes(summary(lme_res2)). How can I pull it out (so that I can save it to another variable)?

Re: [R] spss, string factors, selecting

2007-11-26 Thread jim holtman
Can you provide a small subset of the data that shows the problem. In a sense, what you are doing with: selectE-Data[Fatmethod== E,] should pull your rows of interest. What does 'str(Data)' show? What does 'str(selectE)' show? If you can at least include 10-20 rows of data that show what is

Re: [R] Packages - a great resource, but hard to find the right one

2007-11-26 Thread Duncan Murdoch
Loren Engrav wrote: It is clear that R and Bio are amazing resources and that many people invest lots of time in making them work, thank you Having said that From the point of view of an R/Bio novice an improved method to find packages would be very helpful as suggested by John Sorkin

  1   2   >