Re: [R] Problem with ?curve

2007-04-20 Thread Ron Michael
Dear all R users, Thank you Greg for having time in my problem. Your suggestion is working pretty fine for my problem. But here I am involved for some teaching assignments in a local school. If at least I could use sliders for changing values, it would be very fine. Have anyone any

Re: [R] Accessing R applications from Web

2007-04-20 Thread hadley wickham
I learned to do this by studying Alfredo Pontillo and Angelo Mineo's R-php (http://dssm.unipa.it/R-php). Specifically, look at the file pages/result/index.php They have done lots of other good stuff in their project, like filtering dangerous commands - you would not want to let a user just

[R] box priece Q statistic

2007-04-20 Thread zahid khan
when we applied box priece Q statistic in stat library how does it work? suppose we have series Yt then either it apply on residuals obtained by regressing yt on Yt-1 .or apply direct on the series Yt - [[alternative HTML version

Re: [R] Random number generator in R compared

2007-04-20 Thread raymond chiruka
I am trying to generate survival data using R .Im trying to randomly generate a column of 1s and 0 and another column randomly generated using an exponential distribution but l cant seem to get the random function. how do l go about it thanks in advance rt chiruka

Re: [R] convergence

2007-04-20 Thread Julien Barnier
Hi, how can i write a loop that makes algorithm keeps repeating until a solution is converged?do i use a for loop? i know that we can use for loop to ask for a number of repetitions, but how to use it to ask the algorithm to keep repeating until a solution is converged? I don't know what

Re: [R] sequential for loop

2007-04-20 Thread Charilaos Skiadas
Hi Michael, On Apr 20, 2007, at 12:31 AM, Michael Toews wrote: Hi all, I'm usually comfortable using the *apply functions for vectorizing loops in R. However, my particular problem now is using it in a sequential operation, which uses values evaluated in an offset of the loop vector.

[R] Innstalling packages in Vista

2007-04-20 Thread toftaker
Hi I am having problems innstalling new packages in R on my vista system. The error message was Error in zip.unpack(pkg, tmpDir) : cannot open file 'C:/Program Files/R/R-2.4.1/library/file195610e4/tree/chtml/tree.chm When I tried to find a solution to the problem it became clear to me that I

[R] R help- getting same results with different data

2007-04-20 Thread Tina Robles
I am calculating batting averages using the attached code (dye.02_R_code.doc and giambi.03_R_code.doc) and the attached data. I've run this code for several players' data but always get the same results (see attached MLB R CONSOLE.doc). It's obvious that the results wouldn't be exactly the

[R] rv package

2007-04-20 Thread gsmatos1
Hi, Does anybody knows how to coerce an mcmc objetct to a rv object without loose the information about what parameters. was simulated I tried do it but it looks that this informatio was lost. Thank you very much for any information. Gilberto Matos.

Re: [R] Random number generator in R compared

2007-04-20 Thread Daniel Nordlund
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of raymond chiruka Sent: Thursday, April 19, 2007 5:23 AM To: R-help@stat.math.ethz.ch Subject: Re: [R] Random number generator in R compared I am trying to generate survival data using R .Im trying to

Re: [R] Filtering

2007-04-20 Thread Martin Maechler
Soare == Soare Marcian-Alin [EMAIL PROTECTED] on Fri, 20 Apr 2007 01:32:30 +0200 writes: Soare Hello Everybody, Soare How can I filter a dataset? Have you tried help(filter) ? filter() is a standard function and mentions others. Further note that statisticians often talk

[R] Anderson-Darling for Gamma Distribution, and Extreme Value Distribution

2007-04-20 Thread ann young
Any examples of implementing Anderson-Darling for Gamma Distribution quickly: that is, getting critical values for different sample sizes for different values of the Gamma distribution parameters in order to do the Goodneess of fit test? These appear difficult to get since

Re: [R] Innstalling packages in Vista

2007-04-20 Thread Prof Brian Ripley
Oh, *please* do consult the list archives as the posting guide suggests: I posted an answer to this earlier this morning, referencing a comprehensive answer from Sunday. The problem is a lack of understanding of how Vista security works. You are using a version of R which predates Vista, so

Re: [R] sequential for loop

2007-04-20 Thread Peter Dalgaard
Charilaos Skiadas wrote: Hi Michael, On Apr 20, 2007, at 12:31 AM, Michael Toews wrote: Hi all, I'm usually comfortable using the *apply functions for vectorizing loops in R. However, my particular problem now is using it in a sequential operation, which uses values evaluated in an

[R] lancer R en batch

2007-04-20 Thread elyakhlifi mustapha
hello, I'd like know if it's possible to run R with the options BATCH it means not interactively thanks. ___ Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances,

[R] sequences extraction

2007-04-20 Thread Bruno C\.
Hello, I need to extract sequences from an ordered vector. For example, if a-c(1,2,3,6,10,11,13) I need to get the followings 4 vectors (1,2,3),(6),(10,11),(13) Thank You -Bruno -- Leggi GRATIS le tue mail con il telefonino i-mode™ di Wind

Re: [R] lancer R en batch

2007-04-20 Thread Julien Barnier
Hi, I'd like know if it's possible to run R with the options BATCH it means not interactively Yes, you can use the following command-line instruction : R CMD BATCH your_file.r You can look at Appendix B of An introduction to R for more infos on how to invoke R :

Re: [R] sequences extraction

2007-04-20 Thread Julien Barnier
Hi, I need to extract sequences from an ordered vector. For example, if a-c(1,2,3,6,10,11,13) I need to get the followings 4 vectors (1,2,3),(6),(10,11),(13) There should be a more elegant way to do it, but the following code seems to work (it returns the results a s a list) :

[R] Export to spss .SAV format

2007-04-20 Thread Stuart Leask
Hi there. I need to exchange some data with a colleague who uses SPSS. It looks at the moment as if R is limited to exporting a syntax file and a data file. While I would have no problem with this, there is clearly scope for confusion and errors on the part of my colleague, who is more used to

Re: [R] Conditional power, predictive power

2007-04-20 Thread francogrex
Or more elegantly the function below where a and b are the parameters of the beta prior, xa and xb are the current number of events in group A and B respectively; na and nb are the current total number of subjects in group A and B respectively; Na and Nb are the final total number of subject in

Re: [R] importing excel-file

2007-04-20 Thread Hans-Peter
Hi Alberto, I can't call read.xls while Excel is opening the xls file. R crashes and must be aborted. Could not reproduce here (Win2000, Excel 2003, R 2.4.1 and 2.5.0.alpha). Who knows... but I cannot think of anything that could cause such a problem: xlsReadWrite works on the plain file

[R] Hi

2007-04-20 Thread Asthakp
Please add me to mailing list. regards Astha ** See what's free at http://www.aol.com. [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list

[R] sorting data in R

2007-04-20 Thread elyakhlifi mustapha
hello, I'd like know how to sort a data frame in R for example how I should do to sort by Catholic with swiss data frame like below thanks Fertility Agriculture Examination Education Catholic Infant.Mortality Courtelary80.217.0 1512 9.96

Re: [R] Matrix or grid conversion of spatial data

2007-04-20 Thread ONKELINX, Thierry
Marco, I've done something similar with spatial data. I defined the points as SpatialPoints, the grid as SpatialGrid (using the sp package). Then table(overlay(grid, points)) will give you the number of points inside each gridcell. library(sp) points - SpatialPoints(your.data.frame) cellsize - 1

Re: [R] sorting data in R

2007-04-20 Thread Julien Barnier
Hi, I'd like know how to sort a data frame in R for example how I should do to sort by Catholic with swiss data frame like below It's in the FAQ : http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-sort-the-rows-of-a-data-frame_003f HTH, Julien -- Julien Barnier Groupe de recherche

Re: [R] sorting data in R

2007-04-20 Thread gyadav
Hi Best function for sorting which i have used and many in the community :-) HTH Cheers sort.data.frame(Oats, ~ -nitro + Variety) Feedback and improvements are welcome. sort.data.frame - function(form,dat){ # Author: Kevin Wright # Some ideas from Andy Liaw #

[R] regarding 3d Bar Plot

2007-04-20 Thread gyadav
Hi All R experts I have data in a two dimensional table. each row of the data adds upto 100 ( hence they are percentages ). it can be interpreted as like this A - I are the matches and P - X are the players. Thus Player P scored 20% of the runs during this season in Match C, 60% in Match D

[R] xyplot: Combining 'subscripts' and 'allow.multiple=T'

2007-04-20 Thread Søren Højsgaard
Dear all, Consider this plot xyplot(Sepal.Length + Sepal.Width ~ Petal.Length | Species, data = iris, allow.multiple=T, outer=F, panel = function(x,y,...) { panel.xyplot(x,y,...) } ) I want to *add* some things to each panel and what I want to add involves

Re: [R] Accessing R applications from Web

2007-04-20 Thread Elio Mineo
Il giorno gio, 19/04/2007 alle 11.43 -0500, hadley wickham ha scritto: I learned to do this by studying Alfredo Pontillo and Angelo Mineo's R-php (http://dssm.unipa.it/R-php). Specifically, look at the file pages/result/index.php They have done lots of other good stuff in their project,

[R] Change the mode of a list

2007-04-20 Thread Felix Wave
Hello, can anybody tell me a easy way to change the mode of an aggregate list to numeric? I found a solution but I looks cruel. Thank's Felix PS: In the past you have asked what I am doing. I have to evaluate measures of two gauges of our university. The aim is to get an answer which one is

Re: [R] sequences extraction

2007-04-20 Thread jim holtman
Here is one way of doing it: a [1] 1 2 3 6 10 11 13 b - c(FALSE, diff(a) != 1) cumsum(b) [1] 0 0 0 1 2 2 3 split(a, cumsum(b)) $`0` [1] 1 2 3 $`1` [1] 6 $`2` [1] 10 11 $`3` [1] 13 On 4/20/07, Bruno C. [EMAIL PROTECTED] wrote: Hello, I need to extract sequences from an ordered

Re: [R] Change the mode of a list

2007-04-20 Thread Soare Marcian-Alin
Hello, I dont know if it works, but try: storage.mode(xxx) = numeric Alin 2007/4/20, Felix Wave [EMAIL PROTECTED]: Hello, can anybody tell me a easy way to change the mode of an aggregate list to numeric? I found a solution but I looks cruel. Thank's Felix PS: In the past you have

[R] How to return more than one variable from function

2007-04-20 Thread vinod gullu
Dera R users, I have written a function which computes variance, sd, r^2, R^2adj etc. But i am not able to return all of them in return statement. So how to return more than one variable from function. In C i used to return by pointers etc. is there any way like that. Thanks in advance.

Re: [R] Change the mode of a list

2007-04-20 Thread jim holtman
This will take all the numerics in the list and create a matrix: as.matrix(MEAN[unlist(lapply(MEAN, is.numeric))]) On 4/20/07, Soare Marcian-Alin [EMAIL PROTECTED] wrote: Hello, I dont know if it works, but try: storage.mode(xxx) = numeric Alin 2007/4/20, Felix Wave [EMAIL PROTECTED]:

Re: [R] How to return more than one variable from function

2007-04-20 Thread jim holtman
use a 'list' as the return value containing the values you want returned. x- function(){ . list(val1=a, val2=b, val3=c) } On 4/20/07, vinod gullu [EMAIL PROTECTED] wrote: Dera R users, I have written a function which computes variance, sd, r^2, R^2adj etc. But i am not able to return all

[R] automatic call generation for aov()

2007-04-20 Thread Bruno L. Giordano
Hello, I am writing down a general function to implement the bootstrapF method for repeated measures anova. I am passing the function several data frames: y = dependent subj = subject identifiers b = between-subjects factors (number = NB) w = within-subjects factors (number = NW) after

Re: [R] importing excel-file

2007-04-20 Thread Hans-Peter
This is Windows XP, Excel 2003, R 2.4.1. Maybe the problem is with Windows XP. I know that it locks some files, even when I open for reading. For example, if I open 'test.xls' file, then I can't issue the DOS command 'copy test.xls new_test.xls'. Thanks for your information. Will test

Re: [R] how to convert the lower triangle of a matrix to a symmetricmatrix

2007-04-20 Thread John Fox
Dear Ranjan, If the elements are ordered by rows, then the following should do the trick: X - diag(p) X[upper.tri(X, diag=TRUE)] - elements X - X + t(X) - diag(diag(X)) If they are ordered by columns, substitute lower.tri() for upper.tri(). I hope this helps, John

[R] Error: cannot change value of locked binding for

2007-04-20 Thread gyadav
Hello R experts What does this error means and how to resolve this issue (cannot change value of locked binding for ). Please suggest mc = MonteCarloOption(dt = 1/360, pathLength = 30, mcSteps = 5000, mcLoops = + 50, init = TRUE, innovations.gen = sobolInnovations, path.gen = wienerPath, +

Re: [R] How to return more than one variable from function

2007-04-20 Thread Julien Barnier
Hi, I have written a function which computes variance, sd, r^2, R^2adj etc. But i am not able to return all of them in return statement. You can return a vector, or a list. For example : func - function() { ... result - list(variance=3, sd=sqrt(3)) return(result) # you can omit this

Re: [R] Change the mode of a list

2007-04-20 Thread Felix Wave
With as.matrix(MEAN[unlist(lapply(MEAN, is.numeric))]) I will get two colums not three and only the last colum are my values (MEAN[,3]). The first is only a rising number. I also tried: MEASURE - sapply( MEAN, as.numeric ) resp. MEAN - unlist(MEAN) MEASURE - matrix(MEAN, ncol=3,

Re: [R] Suggestions for statistical computing course

2007-04-20 Thread Ravi Varadhan
Hi Giovanni, You may want to consider: Numerical analysis for statisticians (Springer) by Ken Lange. We used when I was taking a graduate level (MS and PhD students) course in statistical computing. I really like it and still use it frequently. Ravi.

[R] Help on averaging sets of rows defined by row name

2007-04-20 Thread Booman, M
Dear all, This is my problem: I have a table of gene expression data, where 1st column is gene name, and 2nd -39th columns each are exression data for 38 samples. There are multiple measurements per sample for each gene, so there are multiple rows for each gene name. I want to average these

[R] importing sas datasets

2007-04-20 Thread [EMAIL PROTECTED]
Hello, I wanted to ask help about importing sas datasets. 1)I tried with some functions as read.ssd (foreign package), but it doesn't import the file if the length of the variables' names are longer than 8 bite (it has to conform to the 6 version). 2)I then tried with the sas.get function

Re: [R] how to convert the lower triangle of a matrix to a symmetricmatrix [Broadcast]

2007-04-20 Thread Liaw, Andy
Ranjan and Prof. Fox, Similar approach can be found in stats:::as.matrix.dist(). Andy From: John Fox Dear Ranjan, If the elements are ordered by rows, then the following should do the trick: X - diag(p) X[upper.tri(X, diag=TRUE)] - elements X - X + t(X) - diag(diag(X))

Re: [R] Change the mode of a list

2007-04-20 Thread Felix Wave
With as.matrix(MEAN[unlist(lapply(MEAN, is.numeric))]) I will get two colums not three and only the last colum are my values (MEAN[,3]). The first is only a rising number. I also tried: MEASURE - sapply( MEAN, as.numeric ) resp. MEAN - unlist(MEAN) MEASURE - matrix(MEAN, ncol=3,

Re: [R] importing excel-file

2007-04-20 Thread Erich Neuwirth
I am coming in late in this discussion because I am away from home and do not read my email regularly. Here are my few cents. If you are working on Windows and have Excel installed, an easy way of transferring data between R and Excel is my RExcel package which ships with Thomas Baier's R(D)COM

Re: [R] Help on averaging sets of rows defined by row name

2007-04-20 Thread ONKELINX, Thierry
Dear Marije, I think that aggregate() would make your life a lot easier. aggregate(table.imputed, by = table.imputed[, 1], FUN = mean) Cheers, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek /

Re: [R] Change the mode of a list

2007-04-20 Thread Felix Wave
Hello, unfortunately storage.mode won't run. storage.mode(MEAN) = numeric Default in as.double.default(list(Group.1 = c(1, 2, 3, 4, 5, 6, 7, 8, 9, : (list) Object can't change in 'double' I also tried: MEASURE - sapply( MEAN, as.numeric ) But then, the first colum is +1 greater and the

Re: [R] Suggestions for statistical computing course

2007-04-20 Thread Liaw, Andy
I really like John Monahan's Numerical Methods of Statistics (Cambridge University Press). As to running/editing R scripts, you may want to look into JGR. The built-in editor is not as smart as ESS in some respect, but smarter than ESS in others. The only thing that keep me from using it

Re: [R] Character coerced to factor and I cannot get it back

2007-04-20 Thread John Kane
Thanks Stephen and Gabor. It works like a charm both ways. It took me a minute or two to find the global command but I definately like it :) Now to remember to change it on the USB installation too. Any idea what the rationale was for setting the option to TRUE? I can see advantages

Re: [R] Help on averaging sets of rows defined by row name

2007-04-20 Thread Liaw, Andy
You might want to check which of the following scales better for the size of data you have. ## Make up some data to try. R dat - data.frame(gene=rep(letters[1:3], each=3), s1=runif(9), s2=runif(9)) R dat genes1s2 1a 0.9959172 0.9531052 2a 0.2064497 0.4257022 3a

Re: [R] Suggestions for statistical computing course

2007-04-20 Thread ONKELINX, Thierry
2. I do most of my work in R using Emacs and ESS. That means that I keep a file in an emacs window and I submit it to R one line at a time or one region at a time, making corrections and iterating as needed. When I am done, I just save the file with the last, working, correct

Re: [R] Suggestions for statistical computing course

2007-04-20 Thread Duncan Murdoch
On 4/20/2007 9:34 AM, Giovanni Petris wrote: Dear R-helpers, I am planning a course on Statistical Computing and Computational Statistics for the Fall semester, aimed at first year Masters students in Statistics. Among the topics that I would like to cover are linear algebra related to

[R] cat() to STDERR

2007-04-20 Thread ivo welch
Dear R wizards---I read Brian Ripley's post from 2004 which said that it was not possible to print to STDERR. Alas, I have more modest needs. I was wondering if it was possible to just send a string to STDERR with cat() while in CMD BATCH mode. Is it not possible to open STDERR in R? (Or does

Re: [R] Help on averaging sets of rows defined by row name

2007-04-20 Thread Liaw, Andy
Do note that I used dat[1] instead of dat[,1] or dat[[1]] as the second argument to aggregate(): If dat is a data frame, then dat[1] is also a data frame with only the first column. Since data frame is also a list, dat[1] is a one-component list. My guess is that Tierry didn't try his

Re: [R] importing excel-file

2007-04-20 Thread Alberto Monteiro
Hans-Peter wrote: I can't call read.xls while Excel is opening the xls file. R crashes and must be aborted. Could not reproduce here (Win2000, Excel 2003, R 2.4.1 and 2.5.0.alpha). Who knows... This is Windows XP, Excel 2003, R 2.4.1. but I cannot think of anything that could cause

Re: [R] How to return more than one variable from function

2007-04-20 Thread Vincent Goulet
Le Vendredi 20 Avril 2007 07:46, Julien Barnier a écrit : Hi, I have written a function which computes variance, sd, r^2, R^2adj etc. But i am not able to return all of them in return statement. You can return a vector, or a list. For example : func - function() { ... result -

[R] Partitioning around mediods (PAM)

2007-04-20 Thread nathaniel Grey
Hi, I need some help understanding the output from PAM. When I look at the output it doesn't list the cluster number by the median vlaues on each of the variables (like it does with k-means) Instead I have the following: So I know for instance cluster 1 has a mean for variable1 of 33.33,

[R] modified test of phillips-perron

2007-04-20 Thread Martin Ivanov
Hello! I would like to know whether the test of Phillips-Perron, modified for time series with large negative moving average terms implemented in R. Besides I would also like to ask the same question about the Leybourne-McCabe test for stationarity. Regards, Martin

Re: [R] Suggestions for statistical computing course

2007-04-20 Thread Mike Prager
Giovanni Petris [EMAIL PROTECTED] wrote: 2. I do most of my work in R using Emacs and ESS. That means that I keep a file in an emacs window and I submit it to R one line at a time or one region at a time, making corrections and iterating as needed. When I am done, I just save the

[R] Fwd: Re: Character coerced to factor and I cannot get it back

2007-04-20 Thread John Kane
--- John Kane [EMAIL PROTECTED] wrote: Date: Fri, 20 Apr 2007 10:47:45 -0400 (EDT) From: John Kane [EMAIL PROTECTED] Subject: Re: [R] Character coerced to factor and I cannot get it back To: jim holtman [EMAIL PROTECTED] Thanks Jim, I can live with it as a factor or I will do as you

Re: [R] Suggestions for statistical computing course

2007-04-20 Thread John Kane
--- Ravi Varadhan [EMAIL PROTECTED] wrote: Hi Giovanni, I have been quite satisfied with Tinn-R (http://www.sciviews.org/Tinn-R/ ) in a Windows environment. It is small fast and I can run both it and R from a USB if I need a portable setup. 2. I do most of my work in R using Emacs

Re: [R] importing excel-file

2007-04-20 Thread Alberto Monteiro
Hans-Peter wrote: I added colClasses = double, and now it works - but I lose all strings, that become NAs (they don't matter - maybe if they matter, I just have to call read.xls twice). Without colClasses = double, the numbers become meaningless stuff. If a scalar colClasses argument is

Re: [R] How to return more than one variable from function

2007-04-20 Thread Ron Michael
?list - Original Message From: vinod gullu [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Friday, April 20, 2007 5:00:45 PM Subject: [R] How to return more than one variable from function Dera R users, I have written a function which computes variance, sd, r^2, R^2adj etc. But i

Re: [R] How to return more than one variable from function

2007-04-20 Thread Liaw, Andy
From: Vincent Goulet Le Vendredi 20 Avril 2007 07:46, Julien Barnier a écrit : Hi, I have written a function which computes variance, sd, r^2, R^2adj etc. But i am not able to return all of them in return statement. You can return a vector, or a list. For example : func

Re: [R] Help on averaging sets of rows defined by row name

2007-04-20 Thread Booman, M
Thanks for your help everyone! I had some trouble with the 'aggregate' function because the 'table.impute[,1]' was not a list (which the 'by' argument should be), and it took a very very long time to coerce it into one. But the rowmeans method works almost instantly! And I have no problems with

[R] Suggestions for statistical computing course

2007-04-20 Thread Giovanni Petris
Dear R-helpers, I am planning a course on Statistical Computing and Computational Statistics for the Fall semester, aimed at first year Masters students in Statistics. Among the topics that I would like to cover are linear algebra related to least squares calculations, optimization and

[R] help for dynlm command

2007-04-20 Thread zahid khan
Suppose we have the time series “y” When I regress this series on its first lag then I use the following command in dynlm as r=dynlm( y~L(y,1)) if I put the command of summary of above regression model then by the command summary (r ) I will get the following out put elements

Re: [R] importing excel-file

2007-04-20 Thread Alberto Monteiro
Please ignore the last test case. I thought I had saved it, but I hadn't, sheet = 2 was empty. Now it works. Alberto Monteiro __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Hi

2007-04-20 Thread John Kane
--- [EMAIL PROTECTED] wrote: Please add me to mailing list. regards Astha I think you need to go here to subscribe https://stat.ethz.ch/mailman/listinfo/r-help __ R-help@stat.math.ethz.ch mailing list

[R] Udpate R under a proxy

2007-04-20 Thread justin bem
dear all, I get internet via a proxy server when I try to downlaod package it always fail. Even when i add and environnment variable for the http proxy server. I use windows XP SP2 Sincerly Justin BEM Elève Ingénieur Statisticien Economiste BP 294 Yaoundé. Tél (00237)9597295.

[R] RE : Re: Change the mode of a list

2007-04-20 Thread justin bem
see ?unlist --- Soare Marcian-Alin [EMAIL PROTECTED] a écrit : Hello, I dont know if it works, but try: storage.mode(xxx) = numeric Alin 2007/4/20, Felix Wave [EMAIL PROTECTED]: Hello, can anybody tell me a easy way to change the mode of an aggregate list to numeric? I

Re: [R] Problem with ?curve

2007-04-20 Thread Greg Snow
Try this for now (a combination of my previous answer and the example from the tkrplot help page): library(tkrplot) library(TeachingDemos) tkcurve - function(expr, from, to, ...){ tt - tktoplevel() myx - from myfun - function(){ curve(expr, from, to, ...) tmp1 - cnvrt.coords(0,0,

Re: [R] Partitioning around mediods (PAM)

2007-04-20 Thread Martin Maechler
You've asked the almost identical question yesterday. {that *de*creases the probability of getting help in some cases!} If you take a little effort and follow the posting guide (keywords reproducible example; not using HTML in e-mails), I (and many others) gladly will help you further.

Re: [R] cat() to STDERR

2007-04-20 Thread Peter Dalgaard
ivo welch wrote: Dear R wizards---I read Brian Ripley's post from 2004 which said that it was not possible to print to STDERR. Alas, I have more modest needs. I was wondering if it was possible to just send a string to STDERR with cat() while in CMD BATCH mode. Is it not possible to open

[R] Hiding Warning messages in coxme output

2007-04-20 Thread Mohammad Ehsanul Karim
Dear list, I have been trying to use coxme in R 2.3.1. When I use coxme in the following data sim.fr1, i get Warning messages: using 'as.environment(NULL)' is deprecated Why does it occur? How can I hide such warning message, especially when coxme is under a loop? Mohammad Ehsanul Karim

Re: [R] cat() to STDERR

2007-04-20 Thread Prof Brian Ripley
On Fri, 20 Apr 2007, Peter Dalgaard wrote: ivo welch wrote: Dear R wizards---I read Brian Ripley's post from 2004 which said that it was not possible to print to STDERR. Alas, I have more modest needs. I was wondering if it was possible to just send a string to STDERR with cat() while in

Re: [R] Suggestions for statistical computing course

2007-04-20 Thread Fred Bacon
On Fri, 2007-04-20 at 16:02 +0200, ONKELINX, Thierry wrote: While I am looking for simple and effective solutions that do not require installing emacs in our computer lab, the answer you should teach your students emacs/ess on top of R is perfecly acceptable.

Re: [R] xyplot: Combining 'subscripts' and 'allow.multiple=T'

2007-04-20 Thread Sundar Dorai-Raj
Søren Højsgaard said the following on 4/20/2007 3:57 AM: Dear all, Consider this plot xyplot(Sepal.Length + Sepal.Width ~ Petal.Length | Species, data = iris, allow.multiple=T, outer=F, panel = function(x,y,...) { panel.xyplot(x,y,...) } ) I

Re: [R] Hiding Warning messages in coxme output

2007-04-20 Thread Henrique Dallazuanna
Try: options(warn=-1) To restore: options(warn=1) -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40 S 49° 16' 22 Ohttp://maps.google.com/maps?f=qhl=enq=Curitiba,+Brazillayer=ie=UTF8z=18ll=-25.448315,-49.276916spn=0.002054,0.005407t=kom=1 On 4/20/07, Mohammad Ehsanul Karim [EMAIL

Re: [R] Partitioning around mediods (PAM)

2007-04-20 Thread Ranjan Maitra
The question is not reproducable, therefore useless. Perhaps you are forgetting what a medoid is when you expect a mean? HTH, Ranjan On Fri, 20 Apr 2007 17:09:09 +0200 (CEST) nathaniel Grey [EMAIL PROTECTED] wrote: Hi, I need some help understanding the output from PAM. When I look at

[R] Fastest way to repeatedly subset a data frame?

2007-04-20 Thread Iestyn Lewis
Hi - I have a data frame with a large number of observations (62,000 rows, but only 2 columns - a character ID and a result list). Sample: my.df - data.frame(id=c(ID1, ID2, ID3), result=1:3) my.df id result 1 ID1 1 2 ID2 2 3 ID3 3 I have a list of ID vectors. This

Re: [R] Udpate R under a proxy

2007-04-20 Thread Prof Brian Ripley
See rw-FAQ Q2.19, and of course the posting guide. Claiming 'it always fail' does not help us help you, but blaming your tools in this way could be considered discourteous (or worse). On Fri, 20 Apr 2007, justin bem wrote: dear all, I get internet via a proxy server when I try to downlaod

[R] limmaGUI

2007-04-20 Thread solie . alizadeh
Dear all, I have a question about limmaGUI that is usually run in R environment. My problem is loading data into the programm. I have 6 gpr files that apparently are not compatible with limma. Everytime I'm trying to load the data (including a RNA targets file, an error appears:Error

Re: [R] Error: cannot change value of locked binding for

2007-04-20 Thread Martin Becker
Did you have a look at the posting guide? We have to guess that you are using some version of fOptions in some version of R under some OS, and that you run code from the examples section of ?MonteCarloOption relying on other code from that section which is not mentioned at all. Given that these

[R] Using power.t.test over a range of conditions

2007-04-20 Thread Inman, Brant A. M.D.
R-Helpers: I would like to perform sample size calculations for an experiment. As part of this process, I would like to know how various assumptions affect the sample size calculation. For instance, one thing that I would like to know is how the calculated sample size changes as I vary the

Re: [R] cat() to STDERR

2007-04-20 Thread Peter Dalgaard
Prof Brian Ripley wrote: On Fri, 20 Apr 2007, Peter Dalgaard wrote: ivo welch wrote: Dear R wizards---I read Brian Ripley's post from 2004 which said that it was not possible to print to STDERR. Alas, I have more modest needs. I was wondering if it was possible to just send a

Re: [R] Udpate R under a proxy

2007-04-20 Thread Liaw, Andy
This is what I just tried (thanks, Dirk!): Start R and then Sys.putenv(http_proxy, whatever), options(download.file.method=wget) doesn't work. Open up a command prompt, define http_proxy there, then run Rgui. Set options(download.file.method=wget). This works. Perhaps you can define

Re: [R] cat() to STDERR

2007-04-20 Thread ivo welch
thank you, peter and brian. I had not found the stderr() function. (I had looked at the R Input/Output guide.) This is great. regards, /ivo __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] importing sas datasets

2007-04-20 Thread Daniel Nordlund
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, April 20, 2007 6:36 AM To: r-help@stat.math.ethz.ch Subject: [R] importing sas datasets Hello, I wanted to ask help about importing sas datasets. 1)I tried with

Re: [R] Character coerced to factor and I cannot get it back

2007-04-20 Thread Gabor Grothendieck
Just one caveat. I personally would try to avoid using global options since it can cause conflicts when two different programs assume two different settings of the same global option and need to interact. On 4/20/07, John Kane [EMAIL PROTECTED] wrote: Thanks Stephen and Gabor. It works like a

Re: [R] Using power.t.test over a range of conditions

2007-04-20 Thread Chuck Cleland
Inman, Brant A. M.D. wrote: R-Helpers: I would like to perform sample size calculations for an experiment. As part of this process, I would like to know how various assumptions affect the sample size calculation. For instance, one thing that I would like to know is how the calculated

Re: [R] sequences extraction

2007-04-20 Thread GREGOR Brian J
Here's a solution which uses diff() and apply. findSequences - function(Data){ # Sort the vector in case it hasn't been sorted Data - sort(Data) # Check that there are no duplicate values in Data if(any(duplicated(Data))) stop(Function with not work if Data argument contains

Re: [R] Fastest way to repeatedly subset a data frame?

2007-04-20 Thread Iestyn Lewis
Hi Phil - Sadly, although your syntax is certainly a lot cleaner and more elegant than mine, the elapsed time is about the same. 5 minutes may have been an exaggeration, but we are looking at a timescale of minutes, where the C# hashtable method was under a second. I have a feeling the

Re: [R] xyplot: Combining 'subscripts' and 'allow.multiple=T'

2007-04-20 Thread Deepayan Sarkar
On 4/20/07, Sundar Dorai-Raj [EMAIL PROTECTED] wrote: Søren Højsgaard said the following on 4/20/2007 3:57 AM: Dear all, Consider this plot xyplot(Sepal.Length + Sepal.Width ~ Petal.Length | Species, data = iris, allow.multiple=T, outer=F, panel = function(x,y,...) {

Re: [R] Using power.t.test over a range of conditions

2007-04-20 Thread Inman, Brant A. M.D.
Chuck Cleland and Steve Weigand both pointed out my mistake in the loop...trying to assign a list (i.e. the output from power.t.test) to a cell in a data.frame. Thanks guys. Brant __ R-help@stat.math.ethz.ch mailing list

Re: [R] Fastest way to repeatedly subset a data frame?

2007-04-20 Thread hadley wickham
On 4/20/07, Iestyn Lewis [EMAIL PROTECTED] wrote: Hi - I have a data frame with a large number of observations (62,000 rows, but only 2 columns - a character ID and a result list). Sample: my.df - data.frame(id=c(ID1, ID2, ID3), result=1:3) my.df id result 1 ID1 1 2 ID2

Re: [R] xyplot: Combining 'subscripts' and 'allow.multiple=T'

2007-04-20 Thread Sundar Dorai-Raj
Deepayan Sarkar said the following on 4/20/2007 11:42 AM: On 4/20/07, Sundar Dorai-Raj [EMAIL PROTECTED] wrote: Søren Højsgaard said the following on 4/20/2007 3:57 AM: Dear all, Consider this plot xyplot(Sepal.Length + Sepal.Width ~ Petal.Length | Species, data = iris,

[R] Approaches of Frailty estimation: coxme vs coxph(...frailty(id, dist='gauss'))

2007-04-20 Thread Mohammad Ehsanul Karim
Dear List, In documents (Therneau, 2003 : On mixed-effect cox models, ...), as far as I came to know, coxme penalize the partial likelihood (Ripatti, Palmgren, 2000) where as frailtyPenal (in frailtypack package) uses the penalized the full likelihood approach (Rondeau et al, 2003). How, then,

  1   2   >