Re: [R] recovering "status" after q(status=n) in Windows

2007-11-26 Thread Prof Brian Ripley
On Mon, 26 Nov 2007, Dennis Fisher wrote: > Colleagues, > > I am writing scripts that run on both Windows (Vista) and Linux > (RedHat 9). The scripts will be used in both S-Plus (version 8) and > R (2.6.0). I am trying to use the "status" portion of the quit command: > --

Re: [R] newbie polr() question

2007-11-26 Thread Prof Brian Ripley
On Mon, 26 Nov 2007, Max wrote: > 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 an

Re: [R] generating .Rd files

2007-11-26 Thread Edna Bell
Thanks to all. I did not install. (no wonder I couldn't find them...) On 11/26/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 26/11/2007 6:59 PM, Edna Bell wrote: > > Hi R Gurus! > > > > I have a package that I am putting together. > > > > I waited until the end to do the documentation and

[R] recovering "status" after q(status=n) in Windows

2007-11-26 Thread Dennis Fisher
Colleagues, I am writing scripts that run on both Windows (Vista) and Linux (RedHat 9). The scripts will be used in both S-Plus (version 8) and R (2.6.0). I am trying to use the "status" portion of the quit command: --

Re: [R] Communicating from one function to another

2007-11-26 Thread hadley wickham
On 11/26/07, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > Others have already answered your direct question but consider that > what you may want without realizing it is object-oriented programming. I agree with Gabor, you're not actually looking for a global state, but a mutable object (explic

Re: [R] Communicating from one function to another

2007-11-26 Thread Gabor Grothendieck
Others have already answered your direct question but consider that what you may want without realizing it is object-oriented programming. Here p is a proto object with components x and f. x is a variable and f is a method. The method f sets x to a. (Presumably in reality f would do other things

Re: [R] generating .Rd files

2007-11-26 Thread Gabor Grothendieck
See ?package.skeleton ?prompt On Nov 26, 2007 6:59 PM, Edna Bell <[EMAIL PROTECTED]> wrote: > 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 th

Re: [R] generating .Rd files

2007-11-26 Thread Duncan Murdoch
On 26/11/2007 6:59 PM, Edna Bell wrote: > 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 se

Re: [R] 'Split' character

2007-11-26 Thread Gabor Grothendieck
Recall that I had suggested you try interaction in place of paste if paste was not what you wanted. On Nov 26, 2007 3:08 PM, Sébastien <[EMAIL PROTECTED]> wrote: > One additionnal question about a problem that I just noticed in my script: > the list created by my split function is sorted in the in

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

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 i

[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)? Than

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 particular

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 200

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. > > >

Re: [R] 'Split' character

2007-11-26 Thread Sébastien
Thank you very much Jim. jim holtman a écrit : > You can reorder like this: > > y <- unique(do.call(paste,c(mydata[,1:2],sep = ":"))) > ordered.mydata <- mydata.split[y] > > On Nov 26, 2007 3:08 PM, Sébastien <[EMAIL PROTECTED]> wrote: > >> One additionnal question about a problem that I just n

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

2007-11-26 Thread Loren Engrav
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 Three other things would also

Re: [R] 'Split' character

2007-11-26 Thread Sébastien
Sure, it helps ! I did not get that my 'do.call' was coerced to a factor and that the levels of the factor were used to order the list... Thank you very much. Dimitris Rizopoulos a écrit : > one way is the following: > > vals <- do.call(paste, c(mydata[1:2], sep = ":")) > fc <- factor(vals, leve

[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)

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 t

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 home

[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, minimal

[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 Win

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. >

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 <

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] 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 th

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

2007-11-26 Thread Wensui Liu
If I understand correctly, rpart() will pick predictor at each node automatically. I am wondering if there is a way to force rpart() including a specific predictor. The reason I am asking is that I'd like to use rpart() to detect interaction terms for some variables. Thanks. _

Re: [R] Preserving output of MCMC iterations

2007-11-26 Thread Ben Bolker
Francesco Checchi wrote: > > 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 est

Re: [R] 2d Joint Density Plot

2007-11-26 Thread Achim Zeileis
On Mon, 26 Nov 2007, Josef Fruehwald 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 indicated by color or darkness gradients, like a 2d color > coded to

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] 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 expla

[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 I

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

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.html > > I still have not been able to find the repeated library on CRAN. It is not > listed on http://cran.r-project.

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 h

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.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 clickin

Re: [R] 'Split' character

2007-11-26 Thread jim holtman
You can reorder like this: y <- unique(do.call(paste,c(mydata[,1:2],sep = ":"))) ordered.mydata <- mydata.split[y] On Nov 26, 2007 3:08 PM, Sébastien <[EMAIL PROTECTED]> wrote: > One additionnal question about a problem that I just noticed in my script: > the list created by my split function is

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

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 > > www.alpha.luc

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 f

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 the

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]

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

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. >

[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 r

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 "glob

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] 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: > http://cran.r-project.org/src/contrib/Descriptions/codeto

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 ver

Re: [R] manual parallel processing

2007-11-26 Thread Greg Snow
Also look at the nws package for another way to do this. -- 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 Behalf Of [EMAIL PROTECTED] > Sent

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] 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

[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 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

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,

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,

[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 co

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 unsuccesf

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) Solv

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 clea

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

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 c

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. > > H

[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 n

[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] 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 Info

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

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. Try

Re: [R] Naming elements of a list

2007-11-26 Thread Greg Snow
It may be easier for us to help you if you tell us what you are actually trying to accomplish (naming the elements of the list is easy, but doing that won't fix your problems). Note that when you attach a list it attaches a copy of the list, any changes to the original list will not be seen in the

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 explai

[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 the

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

Re: [R] complex conjugates roots from polyroot?

2007-11-26 Thread Spencer Graves
Hi, Ravi: Thanks very much. Per your suggestion, I made complex.eps=.Machine[["double.eps"]]), added your examples to the help file. I also listed "author" as "Spencer Graves and Ravi Varadhan" in the help file and uploaded the changes to R-forge, as I mentioned below. Later, I

[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

[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 mod

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 shoul

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.

[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] 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, p

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] 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,

[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 HTM

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) find

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 c

[R] mvr error in PLS package

2007-11-26 Thread Bricklemyer, Ross S
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 = libsdata.cond.cal, > ncomp=20,validation = "LOO", method = "oscor

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 g

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 d

[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 argume

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 : Erreur

[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

[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

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 File

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) > >

[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] 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.

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 * Opinion

[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 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:

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], ]

  1   2   >