Re: [R] tklistbox selection

2008-10-30 Thread Sundar Dorai-Raj
I solved this problem by adding exportselection = 0 to the call to tklistbox. I.e. tb1 - tklistbox(tt, listvariable = tcl1, exportselection = 0, selectmode = multiple) Thanks, --sundar Sundar Dorai-Raj said the following on 10/29/2008 5:56 PM: Hi, I'm

[R] Creating Vignettes

2008-10-30 Thread Shreyasee
Hi, I want to create a new vignette and include it in an already existing package. That package has already many vignettes which are related to the chapters from the book on which the package is built. It would be a great help if anyone could help to understand how to create vignette for a

Re: [R] Creating Vignettes

2008-10-30 Thread Liviu Andronic
On Thu, Oct 30, 2008 at 7:36 AM, Shreyasee [EMAIL PROTECTED] wrote: It would be a great help if anyone could help to understand how to create vignette for a statistical test like Chi-Square test. One way to do so is to use LyX for creating and compiling Sweave files. Look here [1]. Installation

Re: [R] How to sign off this list

2008-10-30 Thread Kathi
Hi John I had the same problem: signed onto the list, then got flooded by too many emails. So I changed my personal settings to the digest mode (see link below). That means that once a day I get *ONE* email which summarizes the help list email traffic of that day. Then I can fly through its

Re: [R] Suppressing internal grid in filled.contour

2008-10-30 Thread Dieter Menne
Jonathan Greenberg greenberg at ucdavis.edu writes: Ok, I've placed the input files and the PDF on a website http://www.cstars.ucdavis.edu/~jongreen/temp/ This an aliasing problem that disappears partially when using higher resolution, as noted in the quoted #

[R] A critique of R and S-PLUS

2008-10-30 Thread Liviu Andronic
Dear all, The other day I stumbled on this article, A critique of R and S-PLUS [1], and got curious on whether the points outlined are (still) valid. The article is quite old, dating 2004, but was updated several times. Regards, Liviu [1] http://fluff.info/blog/arch/0041.htm -- Do you

[R] ggplot2: histogram with proportions (or %)

2008-10-30 Thread Bernd Weiss
Dear all (Hadley, Thierry :-), I was wondering how to force ggplot/qplot(... geom=histogram) to plot proportions (or %) instead of counts/densities. Thanks for your help, Bernd __ R-help@r-project.org mailing list

Re: [R] A critique of R and S-PLUS

2008-10-30 Thread Dieter Menne
Liviu Andronic landronimirc at gmail.com writes: The other day I stumbled on this article, A critique of R and S-PLUS [1], and got curious on whether the points outlined are (still) valid. The article is quite old, dating 2004, but was updated several times.

Re: [R] ggplot2: histogram with proportions (or %)

2008-10-30 Thread ONKELINX, Thierry
Dear Bernd, AFAIK you can only get counts, densitys, counts scale to a maximum of 1 and likewise densitys. But you can alter the labels on the scales manually. library(ggplot2) dataset - data.frame(x = rnorm(1000)) ggplot(dataset, aes(x = x)) + stat_bin(aes(y = ..ncount..)) ggplot(dataset, aes(x

[R] a nlm() question

2008-10-30 Thread Jiang Peng
Dear R listers, I have a very annoying problem using nlm(). I want to find the minimizer of my target function, if written in \LaTeX is f(\mu1,\mu2,\sigma1,\sigma2) = \sum_i^n( w_ig_t(z_i) ), where g_t(z) is a pdf of bivariate normal distribution and z_i is my samples. I cannot get

Re: [R] group sequential analysis - stopping for futility

2008-10-30 Thread Bernardo Rangel Tura
Em Ter, 2008-10-28 às 08:30 -0700, [EMAIL PROTECTED] escreveu: Hello - I am wondering if anyone has written some R code to calculate futility bounds for a group sequential analysis of clinical trials data. The library ldbounds has a function 'bounds' which calculates the effectiveness

Re: [R] request: How to combine three matrices in the desired form

2008-10-30 Thread Jim Lemon
Hi Muhammad, Try this: cbind(matrix(paste(var,(,val,),sep=),nrow=4),as.character(nod)) Jim __ 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

Re: [R] request: How to combine three matrices in the desired form

2008-10-30 Thread Muhammad Azam
Dear Jim Thanks a lot for such a nice solution. best regards M.Azam From: Jim Lemon [EMAIL PROTECTED] Cc: R Help r-help@r-project.org Sent: Thursday, October 30, 2008 10:06:57 AM Subject: Re: [R] request: How to combine three matrices in the desired form Hi

[R] how to restrict a parameter in optim()

2008-10-30 Thread Luis SAGAON TEYSSIER
Dear all, I'm trying to estimate some parameters with the optim() function but I need to restrict one parameter and I have not found how to do it. Could you help me please? my program is basically fn-function(s) initial-function(r) { cst-r[1] cst1-r[2] beta-r[3] rho-r[4] p1-r[5]

[R] New user group/mailing list created at the University of Granada (Spain)

2008-10-30 Thread JJ Merelo
Hi, For those of you attached to the University of Granada (I know there's a bunch out there), or anybody else who is Spanish-speaking and willing to help, I have created a mailing list for R users at the aforementioned UGR. Drop by http://groups.google.com/group/gur-ugr to subscribe Cheers! --

[R] Block Bootstrap Methods for Multivariate Time Series

2008-10-30 Thread Andreas Klein
Hello. I have a problem with selecting the right block size, when I want to bootstrap multivariate non-iid time series. Assume we have N time series each of length T and obtain for each time series an optimal block size l. So we get l1, l2,..., lN optimal block sizes. When I want to apply a

[R] Is possible, on biological grounds, suggest to fitdistr (MASS library) that the estimated parameters must be between two values?

2008-10-30 Thread drbn
Sorry if it is a silly question, I haven't found documentation on this and I don't know if it is possible. library(MASS) ## for fitdistr library(msm) ## for dtnorm #prepare truncated normal distribution dtnorm0 - function(x, mean, sd , log = FALSE) { dtnorm(x, mean, sd, 105, 135, log) }

[R] Loglogistic distribution

2008-10-30 Thread Mario . Ouwens
Dear all, Does anyone knows the expression for the cumulative distribution of the loglogistic distribution used in survreg? (I.e. how are the results related to the cumulative distribution?) Best regards, Mario DISCLAIMER: The information in this message is confident...{{dropped:8}}

Re: [R] Variance generic function:

2008-10-30 Thread Martin Maechler
HLS == Han Lin Shang [EMAIL PROTECTED] on Sun, 26 Oct 2008 18:02:20 +1100 writes: HLS Hi Dear R-users: I am building a R package and would HLS like to create a generic variance function. Here is how HLS I did HLS var=function(x,...) { UseMethod(var) } HLS I wrote a Rd

[R] Re : how to restrict a parameter in optim()

2008-10-30 Thread justin bem
Where is the problem ? then you have to write the objective function with the restriced value before call optim() Justin BEM BP 1917 Yaoundé Tél (237) 99597295 (237) 22040246 De : Luis SAGAON TEYSSIER [EMAIL PROTECTED] À : r-help@r-project.org Envoyé le

Re: [R] sessionInfo() error

2008-10-30 Thread Yihui Xie
I think there must be something wrong with the result of packageDescription('heplots'). It should be a list, but in your case, it is a vector (probably NA, I guess). Regards, Yihui -- Yihui Xie [EMAIL PROTECTED] Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086 Mobile: +86-15810805877 Homepage:

[R] how to convert data from long to wide format ?

2008-10-30 Thread Daren Tan
Given a dataframe m m X Y V3 V4 1 1 A 0.5 1.2 2 1 B 0.2 1.4 3 2 A 0.1 0.9 How do I convert m to this with V4 as the cell values ? AB 1 1.2 1.4 2 0.9 NA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Help with impute.knn

2008-10-30 Thread Yihui Xie
Please read the help page carefully. The value returned by impute.knn() is not a list with the 'data' component but already a matrix (with two attributes)! Regards, Yihui -- Yihui Xie [EMAIL PROTECTED] Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086 Mobile: +86-15810805877 Homepage:

Re: [R] A critique of R and S-PLUS

2008-10-30 Thread Jan T. Kim
On Thu, Oct 30, 2008 at 09:15:54AM +0100, Liviu Andronic wrote: Dear all, The other day I stumbled on this article, A critique of R and S-PLUS [1], and got curious on whether the points outlined are (still) valid. The article is quite old, dating 2004, but was updated several times.

Re: [R] plot: Howto get parameters befor plotting anything?

2008-10-30 Thread stephen sefick
par() On Thu, Oct 30, 2008 at 5:32 AM, Johannes Graumann [EMAIL PROTECTED] wrote: Hello, Is it possible to get all par content calculated for plot without actually plotting anything? I'm missing an option plot=FALSE ... type=n will still open a device and draw the axes ... Thanks, Joh

[R] plot: Howto get parameters befor plotting anything?

2008-10-30 Thread Johannes Graumann
Hello, Is it possible to get all par content calculated for plot without actually plotting anything? I'm missing an option plot=FALSE ... type=n will still open a device and draw the axes ... Thanks, Joh __ R-help@r-project.org mailing list

Re: [R] how to convert data from long to wide format ?

2008-10-30 Thread Henrique Dallazuanna
Try this: xtabs(V4 ~ X + Y, data = m) On Thu, Oct 30, 2008 at 9:29 AM, Daren Tan [EMAIL PROTECTED] wrote: Given a dataframe m m X Y V3 V4 1 1 A 0.5 1.2 2 1 B 0.2 1.4 3 2 A 0.1 0.9 How do I convert m to this with V4 as the cell values ? AB 1 1.2 1.4 2 0.9 NA

[R] lme4/anova, error message: Calculated PWRSS for a LMM is negative

2008-10-30 Thread Sébastien Puechmaille
Dear all, I'm using the latest version of the package lme4 and R version 2.7.2 (2008-08-25). After I run the model, I get the results of the model (cf. below). Then, I run an ANOVA using the anova function and I get the following message Error in anova(lmer1) : Calculated PWRSS for a LMM is

[R] Inno setup script request

2008-10-30 Thread Sebastien JAEGER
Dear all, I am a public resaerch engineer in marseille (France) and I am currently developping a free software for high throughput experiments in biology using mainly R (bioconductor). This project is almost at a finalisation stage and I would like to build an installshield using innosetup

Re: [R] how to convert data from long to wide format ?

2008-10-30 Thread jim holtman
You can look at the reshape package: x X Y V3 V4 1 1 A 0.5 1.2 2 1 B 0.2 1.4 3 2 A 0.1 0.9 z - melt(x[,-3]) # ignore V3 Using X, Y as id variables z X Y variable value 1 1 A V4 1.2 2 1 B V4 1.4 3 2 A V4 0.9 cast(z, X ~ Y, sum) X A B 1 1 1.2 1.4 2 2 0.9 NA

Re: [R] Is possible, on biological grounds, suggest to fitdistr (MASS library) that the estimated parameters must be between two values?

2008-10-30 Thread Steve_Friedman
Doesn't use of a 95% CI of the mean give you a better handle on this issue. It then might be interesting to compare the CI range with the values obtained by the fitdist function. Steve Friedman Ph. D. Spatial Statistical Analyst Everglades and Dry Tortugas National Park 950 N Krome Ave (3rd

Re: [R] A critique of R and S-PLUS

2008-10-30 Thread Duncan Murdoch
On 10/30/2008 7:24 AM, Jan T. Kim wrote: On Thu, Oct 30, 2008 at 09:15:54AM +0100, Liviu Andronic wrote: Dear all, The other day I stumbled on this article, A critique of R and S-PLUS [1], and got curious on whether the points outlined are (still) valid. The article is quite old, dating 2004,

Re: [R] Inno setup script request

2008-10-30 Thread Duncan Murdoch
On 10/30/2008 7:53 AM, Sebastien JAEGER wrote: Dear all, I am a public resaerch engineer in marseille (France) and I am currently developping a free software for high throughput experiments in biology using mainly R (bioconductor). This project is almost at a finalisation stage and I would

Re: [R] plot: Howto get parameters befor plotting anything?

2008-10-30 Thread baptiste auguie
Hi, I believe you could use plot.window(xlim,ylim,...), followed by par(). In any case, the code of plot.default should inspire you (note that it's calling plot.new(), for instance). Baptiste On 30 Oct 2008, at 09:32, Johannes Graumann wrote: Hello, Is it possible to get all par

[R] PAM: how to get the best number of clusters

2008-10-30 Thread Maura E Monville
I have a pretty big similarity matrix (2870x2870). I will produce even bigger ones soon. I am using PAM to generate clusters. The desired number of output clusters is a PAM input parameter. I do not know a-priopri what is the best clusters layout . I resorted to the silhouette test. It takes

Re: [R] Inno setup script request

2008-10-30 Thread Prof Brian Ripley
On Thu, 30 Oct 2008, Sebastien JAEGER wrote: Dear all, I am a public resaerch engineer in marseille (France) and I am currently developping a free software for high throughput experiments in biology using mainly R (bioconductor). This project is almost at a finalisation stage and I would

Re: [R] ggplot2: histogram with proportions (or %)

2008-10-30 Thread hadley wickham
On Thu, Oct 30, 2008 at 3:49 AM, ONKELINX, Thierry [EMAIL PROTECTED] wrote: Dear Bernd, AFAIK you can only get counts, densitys, counts scale to a maximum of 1 and likewise densitys. But you can alter the labels on the scales manually. Well, a proportion is just the count divided by the

Re: [R] Suppressing internal grid in filled.contour

2008-10-30 Thread Martin Maechler
JG == Jonathan Greenberg [EMAIL PROTECTED] on Wed, 29 Oct 2008 11:40:08 -0700 writes: JG Ok, I've placed the input files and the PDF on a website (I apologize JG for attaching the PDF -- the readme guide for this listserv indicated JG that PDFs were fine): Yes, indeed, PDFs

[R] p-value=0 running coxph

2008-10-30 Thread GSt
Dear all, I have a question concerning the p-value. When running coxph I get a p-value = 0. :confused: Can this be true? Why aren´t there decimal points? Is there a way to find out the exact p-value? Here is the output:

[R] Convert windows package to Linux source package

2008-10-30 Thread Renaud Gaujoux
Hi, is there a simple way, I mean a utility that converts a windows package (.zip file) to a Linux source package (tar.gz or even simply extract the source code and Rd files needed to run successfully a R CMD check). The windows package doesn't have any external lib, C code, etc..., just

Re: [R] ggplot2: histogram with proportions (or %)

2008-10-30 Thread stephen sefick
this is probably suboptimal - but do it outside of qplot() add it to a data frame and then qplot() with Hadley's advice. On Thu, Oct 30, 2008 at 10:19 AM, hadley wickham [EMAIL PROTECTED] wrote: On Thu, Oct 30, 2008 at 3:49 AM, ONKELINX, Thierry [EMAIL PROTECTED] wrote: Dear Bernd, AFAIK you

Re: [R] Stuck with FFT

2008-10-30 Thread Rthoughts
Well, I would like to thank you all for your assisstance. I am now progressing and detecting tidal signals in my radon time series. I really appreciate this. I am not stuck with research now. Rthoughts wrote: EDIT: to assist you to assist me in turn, for which I am grateful, more detail

Re: [R] Convert windows package to Linux source package

2008-10-30 Thread Renaud Gaujoux
Well... thanks for the hint (...) but it happens that it is not as simple... You need to do some changes: - the first thing is to delete the 'Built' section from the DESCRIPTION file - + other stuffs... Thanks roger koenker wrote: unzip url:www.econ.uiuc.edu/~rogerRoger

[R] continue a loop after an error with confint

2008-10-30 Thread Benoit Boulinguiez
Hi all, I've got a list (Reg3Lst) with 1000 nls regression results in it. I'd like to get the confidence interval of the parameters obtained with the nonlinear regressions. Thus I've used this: for (i in 1:1000) { foo-list(foo,confint(Reg3Lst[[i]])) } For some regressions the

Re: [R] Convert windows package to Linux source package

2008-10-30 Thread Duncan Murdoch
On 10/30/2008 10:50 AM, Renaud Gaujoux wrote: Hi, is there a simple way, I mean a utility that converts a windows package (.zip file) to a Linux source package (tar.gz or even simply extract the source code and Rd files needed to run successfully a R CMD check). The windows package doesn't

Re: [R] continue a loop after an error with confint

2008-10-30 Thread Gábor Csárdi
Yep, see ?try Gabor On Thu, Oct 30, 2008 at 4:10 PM, Benoit Boulinguiez [EMAIL PROTECTED] wrote: Hi all, I've got a list (Reg3Lst) with 1000 nls regression results in it. I'd like to get the confidence interval of the parameters obtained with the nonlinear regressions. Thus I've used this:

[R] combine symbol beta and text in ggplot2 and adjust size

2008-10-30 Thread Juliet Hannah
For this example: library(ggplot2) p - ggplot(mtcars, aes(x = wt, y=mpg)) + geom_point() p - p + scale_x_continuous(expression(beta)) p How can I include text with the expression. For example, level of \beta. Also, how can I increase the size of the font for this axis label. Thanks, Juliet

Re: [R] combine symbol beta and text in ggplot2 and adjust size

2008-10-30 Thread hadley wickham
For this example: library(ggplot2) p - ggplot(mtcars, aes(x = wt, y=mpg)) + geom_point() p - p + scale_x_continuous(expression(beta)) p How can I include text with the expression. For example, level of \beta. Also, how can I increase Have a look at ?plotmath - you want something like

Re: [R] p-value=0 running coxph

2008-10-30 Thread C.H.
Because your test statistics (z=-9.16) is too small. (well, z 1.96 or Z -1.96 is p=0.05) If you really want the exact p, you can try pnorm(-9.16) if I were you I will quote p0.001 as well as the test statistics. (if you are going to submit it to medical journals) C On Thu, Oct 30, 2008 at

[R] smooth function advice

2008-10-30 Thread tolga . i . uzuner
Dear R Users, I am looking for a smoothing function with the following characteristics for a time series of data: - at each date, should only use data up to that date (so, right aligned and not centered) - should return a smoothed series of length equal to the original time series: -

[R] xyplot, the first tick mark starts from 2 rather than 1, and also there is a NA as the final tick mark.

2008-10-30 Thread Dr. Alireza Zolfaghari
I am trying to plot some data, but have got some difficulties with labels on the tick marks on the x-axes. There are 20 data points. All I want to do is to plot the Loss versus Lines. When I use xyplot, the first tick mark starts from 2 rather than 1, and also there is a NA as the final tick mark.

[R] summarize rows in a matrix differing only in one value

2008-10-30 Thread Rainer Tischler
MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi,=0A=0AI'd like to replace rows in a matrix which differ only in their va= lues for one numerical column (Vx) by a single row in which the value for= Vx is replaced by the median of Vx in the

Re: [R] Regression versus functional/structural relationship?

2008-10-30 Thread Ravi Varadhan
Hi Leif, Thank you for your response. I went back and carefully read a classic paper by Dennis Lindley (JRSSB 1947). He makes clear the distinction between regression and functional relationship. Here I quote his summary from his paper: (A) The functional relationship is required for the

Re: [R] smooth function advice

2008-10-30 Thread Dieter Menne
tolga.i.uzuner at jpmorgan.com writes: I am looking for a smoothing function with the following characteristics for a time series of data: - at each date, should only use data up to that date (so, right aligned and not centered) - should return a smoothed series of length equal to the

Re: [R] Convert windows package to Linux source package

2008-10-30 Thread Prof Brian Ripley
On Thu, 30 Oct 2008, Duncan Murdoch wrote: On 10/30/2008 10:50 AM, Renaud Gaujoux wrote: Hi, is there a simple way, I mean a utility that converts a windows package (.zip file) to a Linux source package (tar.gz or even simply extract the source code and Rd files needed to run successfully a

[R] bizarre axes with xyplot, problem in data?

2008-10-30 Thread Phillip Porter
Good Morning, I am using xyplot to show two variables for each of several subjects as follows: xyplot(y~x|as.factor(ID), type=b, layout=c(7,9), scales=list(x=list(tick.number=3), y=list(tick.number=5))) This is almost exactly the code I used for an earlier project, the only change is the number

[R] package pls

2008-10-30 Thread tsn4867
Hi, For the package pls, I need to understand the algorithm for simpls.fit for Partial Least Squares. I'm not sure if simpls.fit tries to find the weight vectors (loadings) to maximize which of the two: Cov(Xw, y) or maximize Cov^2(Xw,y)? Are these objective functions equivalent? (in

[R] Formula for Xi

2008-10-30 Thread SerenaHexe
Hallo! ?xml:namespace prefix = o ns = urn:schemas-microsoft-com:office:office /o:p/o:p o:p /o:p I want to compare different samples with the formula … o:p/o:p o:p /o:p Here some example data: o:p/o:p o:p /o:p o:p /o:p sample1o:p/o:p sample2o:p/o:p sample3o:p/o:p

[R] Save a function existing library

2008-10-30 Thread Douglas M. Hultstrand
Hello all, I am fairly new to R and I have created a function that I use quit frequently. I was wondering if there is away to save this function in an existing library so I can call it by using the function name once the library is loaded? Thanks, Doug -- -

Re: [R] Save a function existing library

2008-10-30 Thread Xiaoxu LI
You can choose to save your function in the file ..\etc\Rprofile.site Xiaoxu On Fri, Oct 31, 2008 at 1:45 AM, Douglas M. Hultstrand [EMAIL PROTECTED] wrote: Hello all, I am fairly new to R and I have created a function that I use quit frequently. I was wondering if there is away to save

Re: [R] Save a function existing library

2008-10-30 Thread Christos Hatzis
A simple approach would be to start a fresh R session and source your function. Then save that workspace as, e.g., myFuncs.RData. In future sessions all you have to do is attach(myFuncs.Rdata) and your functions will be available for you to use. -Christos -Original Message- From:

Re: [R] Save a function existing library

2008-10-30 Thread Jorge Ivan Velez
Dear Douglas, I'm not quite sure about that, but you could do something like: 1. Save for function in txt format 2. Use source() to load it into R As a toy example, suppose you have function called myfunction which is defined as: myfunction=funciton(x,y) x^y Now, suppose you save myfunction in

Re: [R] PAM: how to get the best number of clusters

2008-10-30 Thread Dylan Beaudette
On Thursday 30 October 2008, Maura E Monville wrote: I have a pretty big similarity matrix (2870x2870). I will produce even bigger ones soon. I am using PAM to generate clusters. The desired number of output clusters is a PAM input parameter. I do not know a-priopri what is the best clusters

Re: [R] xyplot, the first tick mark starts from 2 rather than 1, and also there is a NA as the final tick mark.

2008-10-30 Thread stephen sefick
#try this library(ggplot2) plotDATA=data.frame(Loss=c(1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10),Level=c(AvgAll,AvgAll,AvgAll,AvgAll,AvgAll,AvgAll,AvgAll, AvgAll,AvgAll,AvgAll,AvgAll,AvgAll,GUL,GUL,GUL,GUL,GUL,GUL,GUL,GUL),Line=c(1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8)) qplot(Line, Loss,

Re: [R] bizarre axes with xyplot, problem in data?

2008-10-30 Thread Phillip Porter
My SAS brain was still plugged in. I had a missing data point entered as a . I didn't think anything of it since SAS treats that as missing data. Apparently it confuses R. I deleted the . re-imported the data and everything was beautiful. If anyone is bored I am still interested in why R

Re: [R] xyplot, the first tick mark starts from 2 rather than 1, and also there is a NA as the final tick mark.

2008-10-30 Thread Deepayan Sarkar
On Thu, Oct 30, 2008 at 8:54 AM, Dr. Alireza Zolfaghari [EMAIL PROTECTED] wrote: I am trying to plot some data, but have got some difficulties with labels on the tick marks on the x-axes. There are 20 data points. All I want to do is to plot the Loss versus Lines. When I use xyplot, the first

Re: [R] bizarre axes with xyplot, problem in data?

2008-10-30 Thread Deepayan Sarkar
On Thu, Oct 30, 2008 at 11:43 AM, Phillip Porter [EMAIL PROTECTED] wrote: My SAS brain was still plugged in. I had a missing data point entered as a . I didn't think anything of it since SAS treats that as missing data. Apparently it confuses R. I deleted the . re-imported the data and

[R] trying to figure out reorder.factor in gdata

2008-10-30 Thread Christopher W. Ryan
I'm trying to make a factor with levels for day of week, appear as Monday-Sunday, rather than alphabetically. I'm using reorder.factor from gdata package, but obviously not using it properly. What am I doing wrong? Thanks. data - read.table(DataEarly2008.txt, sep= , header=T, as.is=1:2)

Re: [R] trying to figure out reorder.factor in gdata--solved--silly--

2008-10-30 Thread Christopher W. Ryan
Original dataset used abbreviations for the day of week, while I was trying to use whole words :( Thanks anyway. Christopher W. Ryan, MD SUNY Upstate Medical University Clinical Campus at Binghamton 40 Arch Street, Johnson City, NY 13790 cryanatbinghamtondotedu PGP public keys available at

[R] why does sample(x, n) give the same n items in every separate runs?

2008-10-30 Thread Shuhua Zhan
Hello R users, I have gene expression data of two groups of genes (large and small). Gene expression intensities of those genes are classified into 1 to 10 levels. What I want is to make a random set of genes that have the same levels as the small group from large group using sample(). I used

Re: [R] p-value=0 running coxph

2008-10-30 Thread Thomas Lumley
On Thu, 30 Oct 2008, GSt wrote: Dear all, I have a question concerning the p-value. When running coxph I get a p-value = 0. :confused: Can this be true? Why aren??t there decimal points? Is there a way to find out the exact p-value? The p-values are rounded, and of course they are not

Re: [R] bizarre axes with xyplot, problem in data?

2008-10-30 Thread Steven McKinney
If anyone is bored I am still interested in why R orders lattice plots from bottom to top. The idea was that, just as small values of x are typically found to the left end of the X axis and small values of y are typically found at the bottom end of the Y axis; a trellis plot corresponding to a

[R] Compiling R Packages

2008-10-30 Thread Cahill, Joshua
I am working on a SLES 10 cluster with R available on it. To better use my resources, I want to use Rmpi, but I am having a difficult time installing it. I have set the $R_LIBS variable correctly. The MPI libraries are available through the PGI compiler, but this R instance was compiled with

Re: [R] Compiling R Packages

2008-10-30 Thread Erin Hodgess
Which version of R are you using, please? I had that problem with some earlier versions of R. On Thu, Oct 30, 2008 at 3:59 PM, Cahill, Joshua [EMAIL PROTECTED] wrote: I am working on a SLES 10 cluster with R available on it. To better use my resources, I want to use Rmpi, but I am having a

Re: [R] why does sample(x, n) give the same n items in every separate runs?

2008-10-30 Thread Dieter Menne
Shuhua Zhan szhan at uoguelph.ca writes: smallvec-c(8,12,9,6,13,20,16,11,8,5) largevec-c(400,300,550,600,210,420,380,600,450,500) generdm-c() ## a random set of genes for( i in 1:length(smallvec)){ # try to chop down this line and add a print to understand # what is going on

Re: [R] How to increase iteration limit for lmer()?

2008-10-30 Thread liujb
Dieter, Thank you very much for your reply. I am sorry that I didn't provide data in my message. The data set is huge. Sorry for not specifying the model in the original message. It could be that the problem is related to the model definition itself. Here is my model: x1_sq - x1^2 x2_sq -

[R] colors in lattice histograms

2008-10-30 Thread Barker, Chris
I am using the lattice histogram histogram( ~ base_var | treatment, data=mydataset ) In my dataset, the histogram produces (as expected) two histograms, each corresponding to one of the two treatments. I would like to have the histogram for one treatment to have, say, red bars, the

Re: [R] PAM: how to get the best number of clusters

2008-10-30 Thread Dylan Beaudette
On Thursday 30 October 2008, Maura E Monville wrote: I have the book you mentioned. It basically describes the silhouette method. I do not have it handy as I moved so it is still in some box. However I cannot remember that book providing any other criterion to find the best clusters number.

Re: [R] Save a function existing library

2008-10-30 Thread Douglas M. Hultstrand
Thanks everyone, Jorge I used your suggestion and this works perfect. Doug Jorge Ivan Velez wrote: Dear Douglas, I'm not quite sure about that, but you could do something like: 1. Save for function in txt format 2. Use source() to load it into R As a toy example, suppose you have

Re: [R] colors in lattice histograms

2008-10-30 Thread Deepayan Sarkar
On Thu, Oct 30, 2008 at 4:10 PM, Barker, Chris [EMAIL PROTECTED] wrote: I am using the lattice histogram histogram( ~ base_var | treatment, data=mydataset ) In my dataset, the histogram produces (as expected) two histograms, each corresponding to one of the two treatments. I would

[R] Problems with make for R-2.8.0 on Suse Linux 10.1

2008-10-30 Thread William Hudspeth
Hello, I am trying to install R on Suse linux 10.1. To get configure to run correctly, I had to set FPICFLAGS=fPIC. R is now configured for i686-pc-linux-gnu Source directory: . Installation directory:/usr/local C compiler:gcc -std=gnu99 -g -O2 Fortran 77

Re: [R] Problems with make for R-2.8.0 on Suse Linux 10.1

2008-10-30 Thread Duncan Temple Lang
William Hudspeth wrote: Hello, I am trying to install R on Suse linux 10.1. To get configure to run correctly, I had to set FPICFLAGS=fPIC. You probably want FPICFLAGS=-fPIC ^ R is now configured for i686-pc-linux-gnu Source directory: .

[R] gregexpr slow and increases exponentially with string length -- how to speed it up?

2008-10-30 Thread Emmanuel Levy
Dear All, I have a long string and need to search for regular expressions in there. However it becomes horribly slow as the string length increases. Below is an example: when i increases by 5, the time spent increases by more! (my string is 11,000,000 letters long!) I also noticed that - the

Re: [R] why does sample(x, n) give the same n items in every separate runs?

2008-10-30 Thread Charles C. Berry
Run help.request(). In particular you need to attend to this part: Have you written example code that is - minimal - reproducible - self-contained - commented using data that is either - constructed by the code - loaded by data() - reproduced using dump(mydata, file = ) have you checked

[R] Proper way to write data frame with column and row names

2008-10-30 Thread Daren Tan
I need to write a data frame along with its column and row names to a text file. However, the first row in the text file is always short of one element. I have tried setting different parameters to write.table but that didn't help. m A B C 1 2 D 3 4 Using write.table(m, table.xls, sep=\t,

Re: [R] gregexpr slow and increases exponentially with string length -- how to speed it up?

2008-10-30 Thread Charles C. Berry
On Thu, 30 Oct 2008, Emmanuel Levy wrote: Dear All, I have a long string and need to search for regular expressions in there. However it becomes horribly slow as the string length increases. Below is an example: when i increases by 5, the time spent increases by more! (my string is 11,000,000

Re: [R] Proper way to write data frame with column and row names

2008-10-30 Thread Simon Blomberg
Try setting row.names=FALSE in the call to write.table. If you really need those row names, create a variable containing the row names in the data frame. Then use write.table with row.names=FALSE. HTH, Simon. On Fri, 2008-10-31 at 01:35 +, Daren Tan wrote: I need to write a data frame

Re: [R] gregexpr slow and increases exponentially with string length -- how to speed it up?

2008-10-30 Thread Emmanuel Levy
Hi Chuck, Thanks a lot for your suggestion. You can find all such matches (not just the disjoint ones that gregexpr finds) using something like this: twomatch -function(x,y) intersect(x+1,y) match.list - list( which( vec %in% c(3,6,7) ),

Re: [R] sessionInfo() error

2008-10-30 Thread Felix Andrews
Does the Description: entry need to be hard-wrapped with follow-on lines indented 2 spaces? 2008/10/30 Michael Friendly [EMAIL PROTECTED]: [Using R 2.7.2 on Windows XP] After re-building our heplots package, I've begun to get the following error from sessionInfo(), even though it passes R

[R] stratified kappa (measure agreement or interrater reliability)?

2008-10-30 Thread FD
Hi All: Could anyone point me to a package that can calculate stratified kappa? My design is like this, 4 raters, 30 types of diagnosis scores, 20 patients. Each rater will rate each patient for each type of diagnosis score. The rater's value is nominal. I know I can measure the agreement