Re: [R] PCA and MDS

2005-06-22 Thread Prof Brian Ripley
On Wed, 22 Jun 2005, Guohui Ding wrote: prcomp(stats) Principal Components Analysis princomp(stats) Principal Components Analysis scale(base) Scaling and Centering of Matrix-like Objects The first two are correct for PCA, but scale is not MDS. MDS is available in cmdscale (stats), isoMDS

[R] How to use expression in label with xYplot

2005-06-22 Thread PANTERA Laurent
Dear R-List, I want to use the label function (from Hmisc library) to allow for the names of my isotopes. library(Hmisc) library(lattice) library(grid) num - c(78,137,129m) nom - c(Ge,Cs,Te) df - data.frame(GE78=seq(nom),CS137=seq(nom),TE129m=seq(nom)) if I use this function to create the

Re: [R] tapply

2005-06-22 Thread Martin Maechler
AndyL == Liaw, Andy [EMAIL PROTECTED] on Tue, 21 Jun 2005 13:30:54 -0400 writes: AndyL Try: (x - factor(1:2, levels=1:5)) AndyL [1] 1 2 AndyL Levels: 1 2 3 4 5 (x - x[, drop=TRUE]) AndyL [1] 1 2 AndyL Levels: 1 2 or (x - factor(1:2, levels=1:5)) (x2

[R] predict.coxph fitted values for failure times

2005-06-22 Thread Dan Bebber
I would like to extract predicted failure times from a coxph model in library(survival). However, none of the prediction options (lp, risk, expected, terms) seem to bear any relationship to failure time. Perhaps I am asking the wrong question, but can coxph provide predicted failure times?

[R] A question on time-dependent covariates in the Cox model.

2005-06-22 Thread Marianne dk
I have a dataset with event=death time (from medical examination until death/censoring) dose (given at examination time) Two groups are considered, a non-exposed group (dose=0), an exposed group (dose between 5 and 60). For some reason there is a theory of the dose increasing its effect over

Re: [R] predict.coxph fitted values for failure times

2005-06-22 Thread Prof Brian Ripley
On Wed, 22 Jun 2005, Dan Bebber wrote: I would like to extract predicted failure times from a coxph model in library(survival). However, none of the prediction options (lp, risk, expected, terms) seem to bear any relationship to failure time. Perhaps I am asking the wrong question, but can

Re: [R] mu^2(1-mu)^2 variance function for GLM

2005-06-22 Thread Henric Nilsson
Dear Professor Firth, David Firth said the following on 2005-06-16 17:22: I do not have a ready stock of other examples, but I do have my own version of a family function for this, reproduced below. It differs from yours (apart from being a regular family function rather than using a

Re: [R] sweep() and recycling

2005-06-22 Thread Prof Brian Ripley
I think that as the proponents do not agree, we need to leave this as is. BTW, R-devel is the place to discuss patched to R, rather than R-help. On Tue, 21 Jun 2005, Heather Turner wrote: Agreed my examples may be trivial and I'm sure there are more efficient ways to do the same thing, but I

Re: [R] A question on time-dependent covariates in the Cox model.

2005-06-22 Thread Peter Dalgaard
Marianne dk [EMAIL PROTECTED] writes: I have a dataset with event=death time (from medical examination until death/censoring) dose (given at examination time) Two groups are considered, a non-exposed group (dose=0), an exposed group (dose between 5 and 60). For some reason there is

[R] Subsetting across a frame for plotting

2005-06-22 Thread Morten Sickel
I have a huge frame holding holding model results for a number of locations and time series: str(tonedata) `data.frame': 434 obs. of 339 variables: $ VALUE : int 101 104 105 106 111 118 119 121 122 123 ... $ COUNT : int 2443 184 1539 1016 132 1208 1580 654 864 560 ... $ AREA: num

[R] legend

2005-06-22 Thread Thomas Steiner
I color some area grey with polygon() (with a red border) and then I want to have the dashed red border in the legend as well. How do I manage it? And I want to mix (latex) expressions with text in my legend. Just execute my lines below and you know want I mean. Or pass by at

[R] nlme leading minor error

2005-06-22 Thread Petr Pikal
Dear all I am struggling with nlme and error message. Even going through Pinheiro, Bates nlme book did not gave me a clue how to avoid this. fit - nlme(ce ~ fi1 / ((1+exp(fi2-fi3*tepl))^(1/fi4)), data = temp1na.gr, start = c(fi1=30, fi2=-100, fi3=-.05, fi4=40), fixed = fi1+fi2+fi3+fi4~1,

Re: [R] Subsetting across a frame for plotting

2005-06-22 Thread Liaw, Andy
You might save yourself some headaches by turning it into a matrix instead, since all the columns are either integer or numeric: tonedata - data.matrix(tonedata) Data frames are really lists, so even when you get a one-row subset, it's still a one-row data frame. You can use unlist() to turn

Re: [R] the svDialogs package

2005-06-22 Thread Marco Zucchelli
Hello Philippe, Thanks for the explanation! did you change the guidlgopen as well? Now I get : file - guiDlgOpen(title= Open case/control file,defaultFile=,defaultDir=,multi=FALSE, filters = c(All files (*.*), *.*)) gdata - read.table(file,as.is=T,header=T) Error in file(file, r) :

Re: [R] How to use expression in label with xYplot

2005-06-22 Thread Frank E Harrell Jr
PANTERA Laurent wrote: Dear R-List, I want to use the label function (from Hmisc library) to allow for the names of my isotopes. library(Hmisc) library(lattice) library(grid) num - c(78,137,129m) nom - c(Ge,Cs,Te) df - data.frame(GE78=seq(nom),CS137=seq(nom),TE129m=seq(nom)) if I

[R] A polar.plot BUG in plotrix 1.3.3 ?

2005-06-22 Thread Halldor Björnsson
Hi, I just updated to R-2.1.1 and updated packages acordingly However, after the update, routines that use polar.plot did not function as correctly. In plotrix 1.3.3 the polar.plot function does scale label.pos to radians prior to calling radial.plot Hence, the command

Re: [R] the svDialogs package

2005-06-22 Thread Marco Zucchelli
Hello again, I am using the guidlglist I noticed (on windows) that if you scroll the list by using the up and down arrows of the gui by clicking with the mouse, if you click twice fast the gui disappears and the value on top of the list is selected. It is meant to be like that ? Marco

[R] Snow package -- Results

2005-06-22 Thread Naji
First, many thanks to Simon Urbanek for his help. A simulation case (50x34x5x3 250 replications) each based on behavior of 2500 consumers takes - 2h20mins on a laptop (2 MHz, 1Go, WinXp) - 1h on a G5 bi-proc (2.5 Mhz, 2Go) A loop was used for the laptop, the same loop was transposed as function

Re: [R] A question on time-dependent covariates in the Cox model.

2005-06-22 Thread Jacob Etches
This is a question about time-varying effects rather than time-varying covariates, even if the SAS method tests for the former by using the latter. SAS evaluates the line dosetime=time*dose; for all observations at each event time as it estimates the model, such that you are not using

Re: [R] nlme leading minor error

2005-06-22 Thread Douglas Bates
On 6/22/05, Petr Pikal [EMAIL PROTECTED] wrote: Dear all I am struggling with nlme and error message. Even going through Pinheiro, Bates nlme book did not gave me a clue how to avoid this. fit - nlme(ce ~ fi1 / ((1+exp(fi2-fi3*tepl))^(1/fi4)), data = temp1na.gr, start = c(fi1=30,

Re: [R] A polar.plot BUG in plotrix 1.3.3 ?

2005-06-22 Thread Uwe Ligges
Halldor Björnsson wrote: Hi, I just updated to R-2.1.1 and updated packages acordingly However, after the update, routines that use polar.plot did not function as correctly. In plotrix 1.3.3 the polar.plot function does scale label.pos to radians prior to calling radial.plot Hence,

Re: [R] Subsetting across a frame for plotting

2005-06-22 Thread Morten Sickel
Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] På vegne av Liaw, Andy You might save yourself some headaches by turning it into a matrix instead, since all the columns are either integer or numeric: tonedata - data.matrix(tonedata) Data frames are really lists, so even when you get a

[R] r programming help

2005-06-22 Thread Mohammad Ehsanul Karim
Dear list, Is there anyway i can make the following formula short by r-programming? CYCLE.n-c(NA, WET[1]*DRY[1], WET[1]*DRY[2]+WET[2]*DRY[1], WET[1]*DRY[3]+WET[2]*DRY[2]+WET[3]*DRY[1], WET[1]*DRY[4]+WET[2]*DRY[3]+WET[3]*DRY[2]+WET[4]*DRY[1],

[R] Extract Coeff, Std Error, etc from gnls output

2005-06-22 Thread Christian Mora
Dear list members; Is there any trick to extract the coefficients along with std errors, t-values and p-values for each beta from a gnls fit model (similar to the results obtained using summary(lm)$coeff for linear models)? Thanks for any hint cm __

[R] Contour Plots

2005-06-22 Thread Bernard L. Dillard
Hello all. I'm confused a bit about contour plots. After reading the help at ?contour, it seems as though the contour plot is for 3D plots (x,y, and z). My data is in the form of grid coordinates (x,y), and I want to see a contour plot of the data so that I can tell where most observations lie.

Re: [R] Problem trying to use boot and lme together

2005-06-22 Thread Michael Dewey
At 23:09 21/06/05, Prof Brian Ripley wrote: On Tue, 21 Jun 2005, Douglas Bates wrote: On 6/21/05, Søren Højsgaard [EMAIL PROTECTED] wrote: Thanks everyone for your help, more comments at the foot The problem with simulate.lme is that it only returns logL for a given model fitted to a simulated

Re: [R] Contour Plots

2005-06-22 Thread Liaw, Andy
I guess what you want is contours of the density over the x-y plane. There are a few choices that I know of: kde2d in MASS (part of the `VR' bundle) bkde2d in KernSmooth sm.density in sm locfit in locfit Andy From: Bernard L. Dillard Hello all. I'm confused a bit about contour plots.

[R] Kouros Owzar is ooo.

2005-06-22 Thread Kouros Owzar
I will be out of the office starting 06/21/2005 and will not return until 06/29/2005. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] r programming help

2005-06-22 Thread Peter Dalgaard
Mohammad Ehsanul Karim [EMAIL PROTECTED] writes: Dear list, Is there anyway i can make the following formula short by r-programming? CYCLE.n-c(NA, WET[1]*DRY[1], WET[1]*DRY[2]+WET[2]*DRY[1], WET[1]*DRY[3]+WET[2]*DRY[2]+WET[3]*DRY[1], As far as I can see: z - toeplitz(DRY)

[R] (slightly off topic, but...) More of a stat design question...

2005-06-22 Thread David L. Van Brunt, Ph.D.
With such a wide range of backgrounds here, I thought I'd toss this out here to get ideas. I've lucked into some clinical trial data where schizophrenic patients were randomly assigned to start on one of three drugs, then were followed naturalistically over a year (or more, depending on when

Re: [R] predict.coxph fitted values for failure times

2005-06-22 Thread Thomas Lumley
On Wed, 22 Jun 2005, Dan Bebber wrote: I would like to extract predicted failure times from a coxph model in library(survival). However, none of the prediction options (lp, risk, expected, terms) seem to bear any relationship to failure time. Perhaps I am asking the wrong question, but can

[R] Is it possible to get the first letter of a word?

2005-06-22 Thread Navarre Sabine
Hi, I would to get the first letter of a word like: title_cat TitleCat 1 Training I would like T from Training! Thnaks a lot for your help Sabine - Téléchargez le ici ! [[alternative HTML version deleted]]

Re: [R] Is it possible to get the first letter of a word?

2005-06-22 Thread Uwe Ligges
Navarre Sabine wrote: Hi, I would to get the first letter of a word like: title_cat TitleCat 1 Training I would like T from Training! Thnaks a lot for your help substr(title_cat,1,1) Uwe Ligges Sabine -

Re: [R] Is it possible to get the first letter of a word?

2005-06-22 Thread Liaw, Andy
Use substring() or substr(). Andy From: Navarre Sabine Hi, I would to get the first letter of a word like: title_cat TitleCat 1 Training I would like T from Training! Thnaks a lot for your help Sabine -

Re: [R] Is it possible to get the first letter of a word?

2005-06-22 Thread Chuck Cleland
?substring Navarre Sabine wrote: Hi, I would to get the first letter of a word like: title_cat TitleCat 1 Training I would like T from Training! Thnaks a lot for your help Sabine - Téléchargez le ici !

[R] Is it possible to get the first letter of a word?

2005-06-22 Thread Ken Knoblauch
or What about; strsplit(Training, split=)[[1]][1] [1] T Ken Knoblauch Inserm U371, Cerveau et Vision Department of Cognitive Neurosciences 18 avenue du Doyen Lepine 69500 Bron France tel: +33 (0)4 72 91 34 77 fax: +33 (0)4 72 91 34 61 portable: 06 84 10 64 10

Re: [R] Is it possible to get the first letter of a word?

2005-06-22 Thread Marc Schwartz
On Wed, 2005-06-22 at 16:42 +0200, Navarre Sabine wrote: Hi, I would to get the first letter of a word like: title_cat TitleCat 1 Training I would like T from Training! Thnaks a lot for your help Sabine There are multiple approaches, but you need to be careful,

Re: [R] Contour Plots

2005-06-22 Thread Uwe Ligges
Bernard L. Dillard wrote: Hello all. I'm confused a bit about contour plots. After reading the help at ?contour, it seems as though the contour plot is for 3D plots (x,y, and z). My data is in the form of grid coordinates (x,y), and I want to see a contour plot of the data so that I can

[R] Howto crosstable-ing......

2005-06-22 Thread v . demartino2
I receive the following meteo dataset regularly, containing the average daily temperatures (tMedia) of a certain month for 24 selected meteo-stations (COD_WMO) whose human-readable names are in (NOME). str(tabella) `data.frame': 1038 obs. of 4 variables: $ COD_WMO: int 16045 16045 16045

Re: [R] legend

2005-06-22 Thread Uwe Ligges
Thomas Steiner wrote: I color some area grey with polygon() (with a red border) and then I want to have the dashed red border in the legend as well. How do I manage it? And I want to mix (latex) expressions with text in my legend. Both points are not that easy to solve, hence I'd like to

Re: [R] Howto crosstable-ing......

2005-06-22 Thread Uwe Ligges
See ?reshape Uwe Ligges [EMAIL PROTECTED] wrote: I receive the following meteo dataset regularly, containing the average daily temperatures (tMedia) of a certain month for 24 selected meteo-stations (COD_WMO) whose human-readable names are in (NOME). str(tabella) `data.frame': 1038 obs.

[R] chisq test and fisher exact test

2005-06-22 Thread Weiwei Shi
Hi, I have a text mining project and currently I am working on feature generation/selection part. My plan is selecting a set of words or word combinations which have better discriminant capability than other words in telling the group id's (2 classes in this case) for a dataset which has 2,000,000

Re: [R] Howto crosstable-ing......

2005-06-22 Thread Liaw, Andy
Looks to me like you want something like reshape()... Andy From: [EMAIL PROTECTED] I receive the following meteo dataset regularly, containing the average daily temperatures (tMedia) of a certain month for 24 selected meteo-stations (COD_WMO) whose human-readable names are in (NOME).

Re: [R] r programming help

2005-06-22 Thread Peter Wolf
Try: DRY-c(2,5,3,7,11) WET-(1:5)*10 print(filter(c(rep(0,length(WET)),DRY),WET)) Time Series: Start = 1 End = 10 Frequency = 1 [1] NA NA 0 20 90 190 360 640 NA NA CYCLE.n-c(NA, WET[1]*DRY[1], WET[1]*DRY[2]+WET[2]*DRY[1], WET[1]*DRY[3]+WET[2]*DRY[2]+WET[3]*DRY[1],

Re: [R] Howto crosstable-ing......

2005-06-22 Thread Marc Schwartz
On Wed, 2005-06-22 at 17:12 +0200, [EMAIL PROTECTED] wrote: I receive the following meteo dataset regularly, containing the average daily temperatures (tMedia) of a certain month for 24 selected meteo-stations (COD_WMO) whose human-readable names are in (NOME). str(tabella) `data.frame':

Re: [R] r programming help

2005-06-22 Thread Don MacQueen
In addition to Peter's suggestion of converting to a matrix operation, here is a simple solution using naive R programming. Using the 7th element of CYCLE.n as an example: replace this: WET[1]*DRY[6]+WET[2]*DRY[5]+WET[3]*DRY[4]+WET[4]*DRY[3]+WET[5]*DRY[2]+WET[6]*DRY[1] with this:

Re: [R] Extract Coeff, Std Error, etc from gnls output

2005-06-22 Thread Douglas Bates
On 6/22/05, Christian Mora [EMAIL PROTECTED] wrote: Dear list members; Is there any trick to extract the coefficients along with std errors, t-values and p-values for each beta from a gnls fit model (similar to the results obtained using summary(lm)$coeff for linear models)? The best way to

[R] monitoring objects sizes

2005-06-22 Thread Omar Lakkis
I have an R script that loops over market contracts. The script runs well for markets with relatively small number of contracts but seg faults when the number of contracts (loop iterations) is large. Is there a way for me to monitor my objects and their sizes from within the R script? How can I

Re: [R] chisq test and fisher exact test

2005-06-22 Thread Kjetil Brinchmann Halvorsen
Weiwei Shi wrote: Hi, I have a text mining project and currently I am working on feature generation/selection part. My plan is selecting a set of words or word combinations which have better discriminant capability than other words in telling the group id's (2 classes in this case) for a dataset

Re: [R] monitoring objects sizes

2005-06-22 Thread Liaw, Andy
Do RSiteSearch(ls.obj) and click on the first hit. Andy From: Omar Lakkis I have an R script that loops over market contracts. The script runs well for markets with relatively small number of contracts but seg faults when the number of contracts (loop iterations) is large. Is there a way

Re: [R] monitoring objects sizes

2005-06-22 Thread Spencer Graves
hel.search(object size) found a function object.size that should do what you want. spencer graves Omar Lakkis wrote: I have an R script that loops over market contracts. The script runs well for markets with relatively small number of contracts but seg faults when the

[R] classes with chron slots

2005-06-22 Thread Sebastian Luque
I'd like to define a class with a chron slot, but: R require(chron) R setClass(myclass, representation(datetime = chron)) [1] myclass Warning message: undefined slot classes in definition of myclass: datetime(class chron) in: .completeClassSlots(ClassDef, where) How should such a class be

[R] analyzing suvival data using splines (a.k.a., piecewise log-hazard-ratio models)

2005-06-22 Thread Wittner, Ben
I'm looking for software that makes plots such as fig 4 (a)-(e), fig 5 anf fig 7 of Gray, Robert, Flexible Methods for Analyzing Survival Data Using Splines, with Applications to Breast Cancer Prognosis, 1992, J Am Stat Assoc, pp 942-51. In other words, I'm looking for software that takes

Re: [R] analyzing suvival data using splines (a.k.a., piecewise log-hazard-ratio models)

2005-06-22 Thread Frank E Harrell Jr
Wittner, Ben wrote: I'm looking for software that makes plots such as fig 4 (a)-(e), fig 5 anf fig 7 of Gray, Robert, Flexible Methods for Analyzing Survival Data Using Splines, with Applications to Breast Cancer Prognosis, 1992, J Am Stat Assoc, pp 942-51. In other words, I'm looking

[R] Rsquare from glmmPQL or another GLMM?

2005-06-22 Thread Ronaldo Reis-Jr.
Hi, I know that Rsquare in glm or in non-linear models is wrong, but some people like this. How I make to estimate the Rsquare from a model ajusted with glmmPQL or another GLMM? Thanks for all Ronaldo -- A simplicidade é o último degrau da sabedoria. -- Victor Hugo -- | //

[R] load history does not work on OS X

2005-06-22 Thread Steven T. Stoddard
I am running R 2.1 on OSX 10.4 using the precompiled binaries/ Raqua.app. loadhistory() nor load history (from the history 'drawer') do NOT work. I can save history files and even see them in a text editor just fine, but cannot load any information (even after loading library(utils)).

[R] substitute in a named expression

2005-06-22 Thread Søren Højsgaard
I have a 'named expression' like expr - expression(rep(1,d)) and would like to replace the argument d with say 5 without actually evaluating the expression. So I try substitute(expr, list(d=5)) in which case R simply returns expr which when I 'evaluate' it gives eval(expr) Error in

[R] How to sort a dataset by one column?

2005-06-22 Thread Ling Jin
I understand how to sort a vector, but I could not find how to sort a data frame or matrix by one variable (column). Could you give me some examples? Thanks! Ling __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] string/character to number

2005-06-22 Thread Jake Michaelson
I did a very quick search of the archive and couldn't find a readily available answer to this one: I'd like to convert, for example: c(a, b, a, b) to c(1, -1, 1, -1) In the case of the first vector, it may be any length, but will always only have two unique values. It must always be

Re: [R] string/character to number

2005-06-22 Thread Jake Michaelson
Duh! sub() --Jake On Jun 22, 2005, at 3:35 PM, Jake Michaelson wrote: I did a very quick search of the archive and couldn't find a readily available answer to this one: I'd like to convert, for example: c(a, b, a, b) to c(1, -1, 1, -1) In the case of the first vector, it may be any

Re: [R] How to sort a dataset by one column?

2005-06-22 Thread Marc Schwartz
On Wed, 2005-06-22 at 14:34 -0700, Ling Jin wrote: I understand how to sort a vector, but I could not find how to sort a data frame or matrix by one variable (column). Could you give me some examples? Thanks! Ling See the examples in ?order HTH, Marc Schwartz

Re: [R] string/character to number

2005-06-22 Thread Søren Højsgaard
This works x-c(a, b, a, b) x[x==a]-1 x[x==b]- -1 as.numeric(x) [1] 1 -1 1 -1 Fra: [EMAIL PROTECTED] på vegne af Jake Michaelson Sendt: on 22-06-2005 23:35 Til: R-help@stat.math.ethz.ch Emne: [R] string/character to number I did a very quick search of the

Re: [R] How to sort a dataset by one column?

2005-06-22 Thread Liaw, Andy
See RSiteSearch(sort.data.frame), or more generally, ?order. Andy From: Ling Jin I understand how to sort a vector, but I could not find how to sort a data frame or matrix by one variable (column). Could you give me some examples? Thanks! Ling

Re: [R] string/character to number

2005-06-22 Thread Berton Gunter
Note: sub() returns a character vector not a numeric vector. as.numeric() will convert it. Slightly slicker and faster is: 2*(z=='a')-1 where z is your vector, c('a','b','a','b') Cheers, Bert -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jake

Re: [R] string/character to number

2005-06-22 Thread Marc Schwartz
To do this in one step, it would be easier to use ifelse(): Chars [1] a b a b ifelse(Chars == a, 1, -1) [1] 1 -1 1 -1 HTH, Marc Schwartz On Wed, 2005-06-22 at 15:46 -0600, Jake Michaelson wrote: Duh! sub() --Jake On Jun 22, 2005, at 3:35 PM, Jake Michaelson wrote: I did a

Re: [R] string/character to number

2005-06-22 Thread Liaw, Andy
You can do indexing by name: x - c(a, b, a, b) v - c(a=1, b=-1) v[x] a b a b 1 -1 1 -1 Andy From: Jake Michaelson Duh! sub() --Jake On Jun 22, 2005, at 3:35 PM, Jake Michaelson wrote: I did a very quick search of the archive and couldn't find a readily available

Re: [R] substitute in a named expression

2005-06-22 Thread Gabor Grothendieck
On 6/22/05, Søren Højsgaard [EMAIL PROTECTED] wrote: I have a 'named expression' like expr - expression(rep(1,d)) and would like to replace the argument d with say 5 without actually evaluating the expression. So I try substitute(expr, list(d=5)) in which case R simply returns expr which

Re: [R] chisq test and fisher exact test

2005-06-22 Thread Weiwei Shi
Is it b/c my question is too long so no one answers it? I should have splitted it. :( On 6/22/05, Kjetil Brinchmann Halvorsen [EMAIL PROTECTED] wrote: Weiwei Shi wrote: Hi, I have a text mining project and currently I am working on feature generation/selection part. My plan is selecting a

Re: [R] substitute in a named expression

2005-06-22 Thread Peter Dalgaard
Gabor Grothendieck [EMAIL PROTECTED] writes: On 6/22/05, Søren Højsgaard [EMAIL PROTECTED] wrote: I have a 'named expression' like expr - expression(rep(1,d)) and would like to replace the argument d with say 5 without actually evaluating the expression. So I try substitute(expr,

[R] How to read an excel data into R?

2005-06-22 Thread Ling Jin
Hi all, Does anybody know the easiest way to import excel data into R? I copied and pasted the excel data into a txt file, and tried read.table, but R reported that Error in read.table(data_support.txt, sep = , header = T) : more columns than column names Thanks! Ling

Re: [R] How to read an excel data into R?

2005-06-22 Thread Spencer Graves
Your error message tells me that you have different numbers of fields in different lines. You say you, copied and pasted the excel data into a txt file. I usually copy what I want into a clean sheet then File - Save, then File - Save As - Save as type = CSV (Comma delimited)

Re: [R] legend

2005-06-22 Thread Paul Murrell
Hi Uwe Ligges wrote: Thomas Steiner wrote: I color some area grey with polygon() (with a red border) and then I want to have the dashed red border in the legend as well. How do I manage it? And I want to mix (latex) expressions with text in my legend. Both points are not that easy

Re: [R] How to read an excel data into R?

2005-06-22 Thread Wensui Liu
Ling, You might take a look at the function read.xls() in gdata library. HTH. On 6/22/05, Ling Jin [EMAIL PROTECTED] wrote: Hi all, Does anybody know the easiest way to import excel data into R? I copied and pasted the excel data into a txt file, and tried read.table, but R reported that

[R] Large number of covariates in survival regressions

2005-06-22 Thread Thomas Davidoff
I am trying to run a survival time regression (no time dependence so exponential distribution) with a fairly large but not huge number of right hand side variables (about 60). r seems to not be able to estimate coefficients or standard errors for many of the covariates but can for some of

[R] mac osx, g95 package port problem

2005-06-22 Thread Joel Bremson
Hi all, I have a working package for linux, including fortran 95 code compiled with g95, that I need to port to OS X. The package works on Linux and seems to load on the Mac, but when I try to run a function that calls C or Fortran I'm told that the symbol is not loaded. I'm developing via a

Re: [R] How to read an excel data into R?

2005-06-22 Thread William Revelle
Ling, If any column has text with spaces between words, this will lead to the more columns ... problem. Delete the spaces and try again. e.g., if the Excel file is Var1Var2Var3 text1 2 more text 3 4 yet more5 6 and more7 8 blahblah

[R] How to save changed options in Rcmdr

2005-06-22 Thread Shige Song
Dear All, I want to change the default options of Rcmdr; it seemed to work when I made changes and click the Exit and Restart R Commander. However, next time I open Rcmdr, it automatically restored to the default options. Is there a way to change Rcmdr's options permanently? Thanks! Shige