[R] defining number of samples

2009-10-26 Thread ms.com
dear all i am trying to perform t-test (t.test) in R here i am putting the commands and answer i got t.test(Ht_cm[from_treeline=='above'][type=='SD'],Ht_cm[from_treeline=='below'][type=='SD']) Welch Two Sample t-test data: Ht_cm[from_treeline == above][type == SD] and

Re: [R] Keeping package sources for recompilation with new R version?

2009-10-26 Thread Rainer M Krug
2009/10/25 Uwe Ligges lig...@statistik.tu-dortmund.de Rainer M Krug wrote: Hi I am using Ubuntu Hardy, and I installing many packages from source. I am keeping my R packages fairly up to date. My question is: is there a way, of keeping the source packages, so that when I am installing

[R] exclude data for boxplot stats using mathematical operator

2009-10-26 Thread e-letter
Readers, I have a data set as follows: 1,1 2,2 3,3 4,4 5,3 6,2 7,-10 8,-9 9,-3 10,2 11,3 12,4 13,5 14,4 15,3 16,2 17,1 I entered this data set using the command 'read.csv'. I want to exclude values fewer than zero in column 2 so then I tried the following command:

Re: [R] defining number of samples

2009-10-26 Thread Peter Ehlers
ms.com wrote: dear all i am trying to perform t-test (t.test) in R here i am putting the commands and answer i got t.test(Ht_cm[from_treeline=='above'][type=='SD'],Ht_cm[from_treeline=='below'][type=='SD']) Welch Two Sample t-test data: Ht_cm[from_treeline == above][type == SD] and

Re: [R] exclude data for boxplot stats using mathematical operator

2009-10-26 Thread Stephan Kolassa
Try this: boxplot.stats(x[x[,2]0,2],do.conf=FALSE) HTH, Stephan e-letter schrieb: Readers, I have a data set as follows: 1,1 2,2 3,3 4,4 5,3 6,2 7,-10 8,-9 9,-3 10,2 11,3 12,4 13,5 14,4 15,3 16,2 17,1 I entered this data set using the command 'read.csv'. I want to exclude values fewer than

Re: [R] data frame is killing me! help

2009-10-26 Thread Petr PIKAL
Hi data(gasoline) str(gasoline) 'data.frame': 60 obs. of 2 variables: $ octane: num 85.3 85.2 88.5 83.4 87.9 ... $ NIR : AsIs [1:60, 1:401] -0.050193 -0.044227 -0.046867 -0.046705 -0.050859 ... ..- attr(*, dimnames)=List of 2 .. ..$ : chr 1 2 3 4 ... .. ..$ : chr 900 nm 902 nm

[R] Odp: URGENT helo re-beggining with R

2009-10-26 Thread Petr PIKAL
Hi not sure that i understand what you want but maybe something like this can help you df-data.frame(x=1:10, y=5*(1:10)+3+rnorm(10)) plot(df) abline(fit-lm(y~x, data=df)) matlines(predict(fit, interval=confidence)) segments(df$x, df$y, df$x, df$y-resid(fit)) Regards Petr

Re: [R] Temperature Prediction Model

2009-10-26 Thread Aneeta
Thank you everyone for all the responses. Clint you are correct in assuming that the problem deals with sensors in a lab setup which can be assumed to be isolated from outside temperature changes. And, I am only dealing with temperature so the other parameters are not important. There will be

[R] how to intergrate rglpk with Rserve

2009-10-26 Thread pragathichi
I am using eclipse and jboss server.I am successful in calling R from java using Rserve. Now i want to solve lpp (linear programming). For this i require rglpk package how to write the java program to include the rglpk package or to solve the lpp. this is the small program which i tried

[R] help with linear model

2009-10-26 Thread Eleni Christodoulou
Dear list, I have been searching for a week to fit a simple linear model to my data. I have looked into the previous posts but I haven't found anything relevant to my problem. I guess it is something simple...I just cannot see it. I have the following data frame, named data, which is a subset of

Re: [R] help with linear model

2009-10-26 Thread Ista Zahn
I'm not familiar with microarray data, so I hope I'm not off base here. Data frames are structured so that variables appear in the columns and cases in the rows. From your formula it looks like you're trying to fit a model using rows as variables and columns as cases. There is probably a way to

[R] Odp: help with linear model

2009-10-26 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 26.10.2009 10:48:51: Dear list, I have been searching for a week to fit a simple linear model to my data. I have looked into the previous posts but I haven't found anything relevant to my problem. I guess it is something simple...I just cannot

Re: [R] help with linear model

2009-10-26 Thread Eleni Christodoulou
Thank you all for your replies. I have tried transposing my data and before but I did not mention it because I was getting the same error. In the present case though it worked because I put lm1=lm(*norm~*.,data=t(data)) instead of lm1=lm(*fm1*, data=t(data)) where *fm1=norm~cols...* I actually

[R] function

2009-10-26 Thread Val
Hi all, Is there a function in R that handle nonparametric model for survival analysis (Cox or Weibull)? Thanks a lot Val [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] Increase the Java heap space for openNLP

2009-10-26 Thread Richard Liu
When I run sentDetect in the openNLP package I receive a Java heap space exception. How can I increase the heap space? I am running the 64-bit Leopard version of R 2.9.2 and R.app on a Mac with OS X 10.5.8. Thanks, Richard -- View this message in context:

Re: [R] help with linear model

2009-10-26 Thread Petr PIKAL
r-help-boun...@r-project.org napsal dne 26.10.2009 11:31:26: Thank you all for your replies. I have tried transposing my data and before but I did not mention it because I was getting the same error. In the present case though it worked because I put lm1=lm(*norm~*.,data=t(data)) instead of

Re: [R] lsfit residuals

2009-10-26 Thread David Winsemius
On Oct 25, 2009, at 1:20 PM, Tanya Cashorali wrote: I'm trying to extract the points above and below a particular lsfit. I can only get the residuals from the original fit though. x = runif(100, 0, 10) plot(x) abline(lsfit(1:100, test)) Error in as.matrix(y) : object 'test' not found I

Re: [R] function

2009-10-26 Thread Liviu Andronic
On 10/26/09, Val valkr...@gmail.com wrote: Is there a function in R that handle nonparametric model for survival analysis (Cox or Weibull)? http://www.rseek.org/?cx=010923144343702598753%3Aboaz1reyxd4q=survival+analysissa=Search+functions%2C+lists%2C+and+morecof=FORID%3A11 Liviu

[R] xyplot lines goes forth and backwards

2009-10-26 Thread marcos carvajalino
Hi, This is my first post in this page althougt i've been using R for several months (by the way english is not my native language so sorry about the grammar). I have a problem with a xyplot on lattice, it's supossed to print different lines for each river (Rio) conditioned by a chemical

Re: [R] xyplot lines goes forth and backwards

2009-10-26 Thread jim holtman
My guess is (since no data was supplied) is that the data is not sorted into date order. Can you provide a subset of the data that exhibits the problem? It may just be a matter of sorting your dataframe into date order before doing the plots. On Mon, Oct 26, 2009 at 9:14 AM, marcos carvajalino

Re: [R] lsfit residuals

2009-10-26 Thread David Winsemius
On Oct 26, 2009, at 8:47 AM, Tanya Cashorali wrote: Sorry here's working code, I wrote it from my iPhone before! Gee, can I get the R.app that runs on an iPhone? x = runif(100, 0, 10) plot(x) abline(lsfit(1:100, x)) abline(lsfit(1:100, x + sd(x))) fit = lsfit(1:100, x + sd(x)) y =

[R] regular expressions

2009-10-26 Thread baptiste auguie
Dear list, I have the following text to parse (originating from readLines as some lines have unequal size), st = c(START text1 1 text2 2.3, whatever intermediate text, START text1 23.4 text2 3.1415) from which I'd like to extract the lines starting with START, and group the subsequent fields in

Re: [R] xyplot lines goes forth and backwards

2009-10-26 Thread marcos carvajalino
Thanks a lot Jim!! i sorted them and BINGO!! How about the sum issue? any ideas? -- Marcos Antonio Carvajalino Fernández Estudiante de Ingeniería Ambiental y Sanitaria Universidad del Magdalena, Colombia [[alternative HTML version deleted]]

[R] xyplot lines goes forth and backwards

2009-10-26 Thread marcos carvajalino
Thanks a lot Jim!! i sorted them and BINGO!! How about the sum issue? any ideas? -- Marcos Antonio Carvajalino Fernández Estudiante de Ingeniería Ambiental y Sanitaria Universidad del Magdalena, Colombia __ R-help@r-project.org mailing list

[R] explaining the output of my linear model analysis

2009-10-26 Thread john56
Hi, I am new in statistics and i manage to make the linear model analysis but i have some difficulties in explaining the results. Can someone help me explain the output of my linear model analysis ? My data are with 2 variables habitat (e,s) and treatment (a,c,p) with multiple trials within.

Re: [R] xyplot lines goes forth and backwards

2009-10-26 Thread jim holtman
You probably want to use something like aggregate or tapply to sum up the required quantities. Impossible to give more precise answers without the actual data and what the expected results might look like. On Mon, Oct 26, 2009 at 9:36 AM, marcos carvajalino maancafe...@gmail.com wrote: Thanks a

[R] Creating a sparse matrix from a file

2009-10-26 Thread Pallavi Palleti
Hi all, I am new to R and learning the same. I would like to create a sparse matrix from an existing file whose contents are in the format rowIndex,columnIndex,value for ex: 1,2,14 2,4,15 I would like to create a sparse matrix by taking the above as input. However, I couldn't find an

[R] Sandard deviation calculation

2009-10-26 Thread ms.com
Dear all I am trying to learn R I was trying to calculate standard deviation here are the commands and outputs in R sd(Ht_cm[type=='SD'])[1] 3.283605 sd(Ht_cm[from_treeline=='above'])[1] 16.83289 sd(Ht_cm[type=='SD'][from_treeline=='above'])[1] NA the problem is that, i could not understand

[R] What happen for negative binomail link in lmer() fonction?

2009-10-26 Thread Manue
Dear R users, I’m performing some GLMMs analysis with a negative binomial link. I already performed such analysis some months ago with the lmer() function but when I tried it today I encountered this problem: *Erreur dans famType(glmFit$family) : unknown GLM family: ‘Negative Binomial’* Does

Re: [R] regular expressions

2009-10-26 Thread Gabor Grothendieck
Assuming only START fields match pat: ## this one has more fields: how do I generalize the regular expression? st2 = c(START text1 1 text2 2.3 text3 5, whatever intermediate text, + START text1 23.4 text2 3.1415 text3 6) pat - [[:alnum:]]+ +([0-9.]+) s - strapply(st2, pat, c, simplify =

Re: [R] lsfit residuals

2009-10-26 Thread Tanya Cashorali
Sorry here's working code, I wrote it from my iPhone before! x = runif(100, 0, 10) plot(x) abline(lsfit(1:100, x)) abline(lsfit(1:100, x + sd(x))) fit = lsfit(1:100, x + sd(x)) y = which(residuals(fit) 0) points(y, x[y], col=red) Notice the points that are red are all the ones above the first

Re: [R] regular expressions

2009-10-26 Thread baptiste auguie
Perfect, thanks! baptiste 2009/10/26 Gabor Grothendieck ggrothendi...@gmail.com: Assuming only START fields match pat: ## this one has more fields: how do I generalize the regular expression? st2 = c(START text1 1 text2 2.3 text3 5, whatever intermediate text, + START text1 23.4 text2

Re: [R] Sandard deviation calculation

2009-10-26 Thread Ted Harding
On 26-Oct-09 09:44:55, ms.com wrote: Dear all I am trying to learn R I was trying to calculate standard deviation here are the commands and outputs in R sd(Ht_cm[type=='SD'])[1] 3.283605 sd(Ht_cm[from_treeline=='above'])[1] 16.83289 sd(Ht_cm[type=='SD'][from_treeline=='above'])[1] NA

[R] What is the most efficient practice to develop an R package?

2009-10-26 Thread Peng Yu
I am reading Section 5 and 6 of http://cran.r-project.org/doc/contrib/Leisch-CreatingPackages.pdf It seems that I have to do the following two steps in order to make an R package. But when I am testing these package, these two steps will run many times, which may take a lot of time. So when I

[R] Planned comparisons among means with WRS package

2009-10-26 Thread atorso
Hello, I have done a robust two-way ANOVA with the WRS (Wilcox's Robust Statistics) package. I was also interested in doing a planned comparison among means, but my knowledge of statistics is quite limited, and I don't know if a robust version for a planned comparison of means exists. If it

Re: [R] What is the most efficient practice to develop an R package?

2009-10-26 Thread Duncan Murdoch
On 10/26/2009 10:29 AM, Peng Yu wrote: I am reading Section 5 and 6 of http://cran.r-project.org/doc/contrib/Leisch-CreatingPackages.pdf It seems that I have to do the following two steps in order to make an R package. But when I am testing these package, these two steps will run many times,

Re: [R] What is the most efficient practice to develop an R package?

2009-10-26 Thread Martin Morgan
Peng Yu wrote: I am reading Section 5 and 6 of http://cran.r-project.org/doc/contrib/Leisch-CreatingPackages.pdf It seems that I have to do the following two steps in order to make an R package. But when I am testing these package, these two steps will run many times, which may take a lot

Re: [R] Sandard deviation calculation

2009-10-26 Thread hadley wickham
What are the values of  length((Ht_cm[type=='SD'][from_treeline=='above'])[1]) I suspect the error is in the subsetting - the following seems more plausible: Ht_cm[type=='SD' from_treeline=='above'] Hadley -- http://had.co.nz/ __

Re: [R] Sandard deviation calculation

2009-10-26 Thread Duncan Murdoch
On 10/26/2009 11:05 AM, hadley wickham wrote: What are the values of length((Ht_cm[type=='SD'][from_treeline=='above'])[1]) I suspect the error is in the subsetting - the following seems more plausible: Ht_cm[type=='SD' from_treeline=='above'] But don't double that ampersand: use

[R] R 2.9.0 is released

2009-10-26 Thread Peter Dalgaard
I've rolled up R-2.10.0.tar.gz some hours ago. This is a development release which contains a number of new features, notably a brand new HTML based dynamic help system. Also, a number of mostly minor bugs have been fixed. See the full list of changes below. You can get it from

Re: [R] RGtk2:::gdkColorToString throws an error

2009-10-26 Thread Michael Lawrence
Hi and sorry for the late reply. The Gdk library is part of the GTK+ bundle (GTK+, Gdk and GdkPixbuf are distributed together and have synchronized versions). So you'll just need GTK+ 2.12 or higher. Michael On Tue, Oct 20, 2009 at 8:16 AM, Ronggui Huang ronggui.hu...@gmail.comwrote: Dear all,

[R] R 2.10.0 is released

2009-10-26 Thread Peter Dalgaard
(D'oh. Forgot to change the Subject: line...) I've rolled up R-2.10.0.tar.gz some hours ago. This is a development release which contains a number of new features, notably a brand new HTML based dynamic help system. Also, a number of mostly minor bugs have been fixed. See the full list of

Re: [R] Sandard deviation calculation

2009-10-26 Thread Wolfgang Raffelsberger
Dear MS, please follow the posting guide and provide reproducible lines of code ! Like this I have no idea what's inside your Ht_cm object . Maybe the problem is that your data might contain NAs, since the basic formula doesn't allow missing values. In this case you have to specify how the

Re: [R] What is the most efficient practice to develop an R package?

2009-10-26 Thread Dirk Eddelbuettel
On 26 October 2009 at 07:57, Martin Morgan wrote: | Peng Yu wrote: | I am reading Section 5 and 6 of | http://cran.r-project.org/doc/contrib/Leisch-CreatingPackages.pdf | | It seems that I have to do the following two steps in order to make an | R package. But when I am testing these

Re: [R] Temperature Prediction Model

2009-10-26 Thread Clint Bowman
Aneeta, My gorilla and mouse analogies were referring to the magnitude of the disturbance and also to its time signature. Are you only interested in the large disturbance which is abrupt (the gorilla)? Or do you also want to be able to detect the more surreptitious attack which may be quite

[R] Competing risk regression error in solve.default

2009-10-26 Thread kende jan
Dear all, I am trying to use the crr function in the cmprsk package version 2.2 to analyse 198 observations.I have receive the error in solve.default. Can anyone give me some insights into where the problem is? Thanks here is my script and in attached file my data. cov=cbind(x1,x2)

Re: [R] PDF too large, PNG bad quality

2009-10-26 Thread Greg Snow
Hexbin used to use base graphics, but has switched to grid. So you can either learn how to augment the grid graph, use lattice and learn how to augent there. Or you can get a fairly good base graphics approximation using the my.symbols function in the TeachingDemos package, e.g.: x -

Re: [R] Importing data from text file with mixed format

2009-10-26 Thread delnatan
All these have been really helpful. Once again I see that anything's possible in R! Thank you for the suggestion Bill, I think arranging the data in one data frame is a good idea. -Daniel William Dunlap wrote: -Original Message- From: r-help-boun...@r-project.org

Re: [R] data frame is killing me! help

2009-10-26 Thread bbslover
Thank you ,Petr It is a good answer,clearly. thanks! Petr Pikal wrote: Hi data(gasoline) str(gasoline) 'data.frame': 60 obs. of 2 variables: $ octane: num 85.3 85.2 88.5 83.4 87.9 ... $ NIR : AsIs [1:60, 1:401] -0.050193 -0.044227 -0.046867 -0.046705 -0.050859 ... ..-

[R] zeros keep dropping

2009-10-26 Thread Lanna Jin
Hello All! I am trying to plot the frequency of species coocurrance. If given a data set similar like this...(V1=species A, V2=species B, V3=frequency of cooccurance) data V1 V2 V3 1 A B 0 2 A C 2 3 A D 5 4 B C 0 5 B D 1 6 C D 0

[R] Help with namespace

2009-10-26 Thread Doran, Harold
I'm having a little trouble building a package with a namespace. Suppose I have two functions: g and f and I want to build the package foo. Suppose f is a function that has an internal purpose and should not be visible to the user. Additionally, I do not want to write a help (Rd) file for f.

[R] fit an exponential curve

2009-10-26 Thread Rafael Moral
Dear useRs, I have the following plot: pos - c(27/44, 11/32, 8/40, 4/42, 3/40, 4/40, 2/40) tmin - c(15.8, 12.6, 10.5, 2.4, 5.2, 8.5, 7.9) plot(tmin, pos) I would like to fit an exponential curve to it. How could I be able to do this? Thanks in advance, Rafael.

[R] Cbind() on the right-side of a formula in xYplot()

2009-10-26 Thread Dylan Beaudette
Hi, Using the latest rms package I am able to make nice plots of model predictions +/- desired confidence intervals like this: # need this library(rms) # setup data d - data.frame(x=rnorm(100), y=rnorm(100)) dd - datadist(d) options(datadist='dd') # fit model l - ols(y ~ rcs(x), data=d) #

Re: [R] fit an exponential curve

2009-10-26 Thread Jorge Ivan Velez
Hi Rafael, Here is a suggestion: # Data pos - c(27/44, 11/32, 8/40, 4/42, 3/40, 4/40, 2/40) tmin - c(15.8, 12.6, 10.5, 2.4, 5.2, 8.5, 7.9) d - data.frame(pos, tmin) # Non-linear model fit - nls(pos ~ a*tmin^b, data = d, start = list(a = .1, b = .1),

Re: [R] What happen for negative binomail link in lmer() fonction?

2009-10-26 Thread Ben Bolker
Manue wrote: Dear R users, I’m performing some GLMMs analysis with a negative binomial link. I already performed such analysis some months ago with the lmer() function but when I tried it today I encountered this problem: *Erreur dans famType(glmFit$family) : unknown GLM family:

Re: [R] zeros keep dropping

2009-10-26 Thread Peter Dalgaard
Lanna Jin wrote: Hello All! I am trying to plot the frequency of species coocurrance. If given a data set similar like this...(V1=species A, V2=species B, V3=frequency of cooccurance) data V1 V2 V3 1 A B 0 2 A C 2 3 A D 5 4 B C 0 5 B D 1 6 C D 0

Re: [R] Cbind() on the right-side of a formula in xYplot()

2009-10-26 Thread Frank E Harrell Jr
Dylan Beaudette wrote: Hi, Using the latest rms package I am able to make nice plots of model predictions +/- desired confidence intervals like this: # need this library(rms) # setup data d - data.frame(x=rnorm(100), y=rnorm(100)) dd - datadist(d) options(datadist='dd') # fit model l -

Re: [R] Help with namespace

2009-10-26 Thread Duncan Murdoch
On 10/26/2009 1:43 PM, Doran, Harold wrote: I'm having a little trouble building a package with a namespace. Suppose I have two functions: g and f and I want to build the package foo. Suppose f is a function that has an internal purpose and should not be visible to the user. Additionally, I

Re: [R] What is the most efficient practice to develop an R package?

2009-10-26 Thread Peng Yu
On Mon, Oct 26, 2009 at 11:22 AM, Dirk Eddelbuettel e...@debian.org wrote: On 26 October 2009 at 07:57, Martin Morgan wrote: | Peng Yu wrote: | I am reading Section 5 and 6 of | http://cran.r-project.org/doc/contrib/Leisch-CreatingPackages.pdf | | It seems that I have to do the

Re: [R] explalinig the output of my linear model analysis

2009-10-26 Thread Ista Zahn
I've never seen the / used in a formula like that. What does it do? -Ista On Mon, Oct 26, 2009 at 8:13 AM, john56 panath...@gmail.com wrote: Hi, I am new in statistics and i manage to make the linear model analysis but i have some difficulties in explaining the results. Can someone help me

[R] Why 'validity' is not called? (S4)

2009-10-26 Thread Peng Yu
I thought that 'validity' defined in 'setClass' should be called in 'new'. Could somebody let me know why 'validity' is not called? How to make it be called? setClass( + Class='A', + representation=representation( + x='numeric' + ), + validity=function(object){ +

[R] R.oo and S4?

2009-10-26 Thread Peng Yu
There are different way to make R classes. I know R.oo and S4. I'm wondering which one is the current popular one. Which one is current recommended when make new R packages? Thank you! __ R-help@r-project.org mailing list

Re: [R] Why 'validity' is not called? (S4)

2009-10-26 Thread Martin Morgan
Peng Yu wrote: I thought that 'validity' defined in 'setClass' should be called in 'new'. Could somebody let me know why 'validity' is not called? How to make it be called? setClass( + Class='A', + representation=representation( + x='numeric' + ), +

Re: [R] R.oo and S4?

2009-10-26 Thread Martin Morgan
Peng Yu wrote: There are different way to make R classes. I know R.oo and S4. I'm wondering which one is the current popular one. Which one is current recommended when make new R packages? Thank you! It depends on who the recommender is. S4 is part of the methods package and therefore of R's

[R] How to browse all the functions in a package?

2009-10-26 Thread Peng Yu
'?removeClass' shows that 'removeClass' is from package 'package:methods'. Is there a command which can show me all the functions and the classed defined in a package such as 'package:methods'? __ R-help@r-project.org mailing list

Re: [R] Help with namespace

2009-10-26 Thread Doran, Harold
-Original Message- From: Duncan Murdoch [mailto:murd...@stats.uwo.ca] Sent: Monday, October 26, 2009 2:29 PM To: Doran, Harold Cc: r-help@r-project.org Subject: Re: [R] Help with namespace On 10/26/2009 1:43 PM, Doran, Harold wrote: I'm having a little trouble building a

Re: [R] What is the most efficient practice to develop an R package?

2009-10-26 Thread Dirk Eddelbuettel
On 26 October 2009 at 13:29, Peng Yu wrote: | On Mon, Oct 26, 2009 at 11:22 AM, Dirk Eddelbuettel e...@debian.org wrote: | | On 26 October 2009 at 07:57, Martin Morgan wrote: | | Peng Yu wrote: | | I am reading Section 5 and 6 of | |

Re: [R] exclude data for boxplot stats using mathematical operator

2009-10-26 Thread John Kane
Perhaps subset the data first? subset(x, x[,2] =0) --- On Mon, 10/26/09, e-letter inp...@gmail.com wrote: From: e-letter inp...@gmail.com Subject: [R] exclude data for boxplot stats using mathematical operator To: r-help@r-project.org Received: Monday, October 26, 2009, 3:25 AM Readers,

Re: [R] How to browse all the functions in a package?

2009-10-26 Thread Martin Morgan
Peng Yu wrote: '?removeClass' shows that 'removeClass' is from package 'package:methods'. Is there a command which can show me all the functions and the classed defined in a package such as 'package:methods'? getClasses(where=getNamespace('methods')) showMethods(where=getNamespace('methods'))

Re: [R] What is the most efficient practice to develop an R package?

2009-10-26 Thread Martin Morgan
Dirk Eddelbuettel wrote: On 26 October 2009 at 13:29, Peng Yu wrote: | On Mon, Oct 26, 2009 at 11:22 AM, Dirk Eddelbuettel e...@debian.org wrote: | | On 26 October 2009 at 07:57, Martin Morgan wrote: | | Peng Yu wrote: | | I am reading Section 5 and 6 of | |

Re: [R] R.oo and S4?

2009-10-26 Thread Henrik Bengtsson
There are two basic class method dispatching mechanisms in R: S3 and S4. These are not R.oo. From a *design* point of view, S3 and S4 are rather similar, or more precisely, you can do the same things in both if you're careful. From an implementation point of view, they are different, and the

Re: [R] Why 'validity' is not called? (S4)

2009-10-26 Thread Peng Yu
On Mon, Oct 26, 2009 at 1:49 PM, Martin Morgan mtmor...@fhcrc.org wrote: Peng Yu wrote: I thought that 'validity' defined in 'setClass' should be called in 'new'. Could somebody let me know why 'validity' is not called? How to make it be called? setClass( +     Class='A', +    

Re: [R] R.oo and S4?

2009-10-26 Thread Gabor Grothendieck
S3 and S4 are part of the core of R so they would presumably be the most used. S4 is an extension to S3 but adds strong typing and a number of other features. R.oo and proto are packages on CRAN which give access to different models of object oriented programming than S3 and S4. R.oo uses a more

[R] GLMMPQL and negbinomial: trouble with the X-axis in PREDICT

2009-10-26 Thread Erin Latham
I'm having some difficulty with graphing outputs of a GLM model I've been working. I have count data for both my predictor (only 1) and response variables, and I have pseudoreplication which I've modeled as a random effect. The odTest() from pscl:: indicated that the negative binomial distribution

Re: [R] mclustBIC version 3.3.1

2009-10-26 Thread madmax1425
Any news about this? I sent reproducible data to author but no reply. Thanks in advance, Max madmax1425 wrote: Thanks! I just sent him an email. If anyone noticed any behavior change with this function version 3.3.1 please report any finding. Thanks in advance, Max Uwe Ligges-3

[R] FW: making a plot in xyplot

2009-10-26 Thread Ordaz, Sarah
Hi, I'd like to clarify my previous posting. See below - my updates are noted with *s Thanks, Sarah Ordaz ord...@upmc.edu Hello, I am a newbie to the lattice package in R, and I'm trying to make a plot using the xyplot function. I have repeated measures data (2 conditions) for two different

Re: [R] Why 'validity' is not called? (S4)

2009-10-26 Thread Martin Morgan
Peng Yu wrote: On Mon, Oct 26, 2009 at 1:49 PM, Martin Morgan mtmor...@fhcrc.org wrote: Peng Yu wrote: I thought that 'validity' defined in 'setClass' should be called in 'new'. Could somebody let me know why 'validity' is not called? How to make it be called? setClass( + Class='A', +

[R] Unable to get Legend with survplot rms package

2009-10-26 Thread Aric Gregson
Hello, I apologize for the post as I am certainly overlooking a simple solution to my difficulties with getting a legend to print on a survplot from the rms package. I am plotting the following: survplot(survest(fita), n.risk=T, conf='none', cex.n.risk=.85, dots=T, col='gray10', lty=2)

[R] reshaping a data frame

2009-10-26 Thread Erin Hodgess
Dear R People: Suppose I have a data.frame, x.df, which has one column and 100 rows. Sometimes I need to see it as 20 rows and 5 columns, sometimes I need to see it as 10 rows with 10 columns. Is there a quick way to make those transformations, please? Thanks in advance, Sincerely, Erin PS

[R] basic statistics to csv

2009-10-26 Thread lanczos
I know that my question is like a very newbie question, but at the moment I stacked with it and I need a quick solution. I need to make an overall statistical overview of various datasets, the summary() and numSummary() functions are fully sufficient. My question is, how can I export results to a

Re: [R] Prediction Error Calculation

2009-10-26 Thread quaildoc
Any suggestions? quaildoc wrote: Hello List, I am fitting a logistic regression model for some presence/absence type data. I have numerous covariates I am fitting to explain variation, and I am using AIC to rank models. However, I would like to report how well my best model (s) do at

Re: [R] Unable to get Legend with survplot rms package

2009-10-26 Thread Frank E Harrell Jr
Aric Gregson wrote: Hello, I apologize for the post as I am certainly overlooking a simple solution to my difficulties with getting a legend to print on a survplot from the rms package. I am plotting the following: survplot(survest(fita), n.risk=T, conf='none', cex.n.risk=.85, dots=T,

[R] as.POSIXct month problem

2009-10-26 Thread guillaume chaumet
Hi everybody When I try example of strptime x - c(1jan1960, 2jan1960, 31mar1960, 30jul1960) z - strptime(x, %d%b%Y) The result is; z [1] NA NA NA NA I have got the same result with complete form of month but not with numeric form. Any idea? [[alternative HTML version deleted]]

Re: [R] as.POSIXct month problem

2009-10-26 Thread Erik Iverson
Not able to replicate: x - c(1jan1960, 2jan1960, 31mar1960, 30jul1960) z - strptime(x, %d%b%Y) z [1] 1960-01-01 CST 1960-01-02 CST 1960-03-31 CST 1960-07-30 CDT -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of guillaume chaumet

[R] issue with levels of a factor after subsetting

2009-10-26 Thread marcos carvajalino
Hi Second question in a day, i'm beginnning to feel incompetent... This time i'm having a weird problem, i'm importing the next data base: car-read.csv2(Historicos.csv) 'data.frame': 1818 obs. of 6 variables: $ Dpto : Factor w/ 11 levels ANTIOQUIA,ATLÁNTICO,..: 2 2 2 2 2 1 1 1 1 5 ... $

Re: [R] as.POSIXct month problem

2009-10-26 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of guillaume chaumet Sent: Monday, October 26, 2009 1:32 PM To: r-help@r-project.org Subject: [R] as.POSIXct month problem Hi everybody When I try example of strptime x -

Re: [R] as.POSIXct month problem

2009-10-26 Thread Jorge Ivan Velez
Hi Guillaume, What is your sessionInfo() ? It works me: x - c(1jan1960, 2jan1960, 31mar1960, 30jul1960) z - strptime(x, %d%b%Y) z [1] 1960-01-01 1960-01-02 1960-03-31 1960-07-30 sessionInfo() R version 2.9.2 RC (2009-08-23 r49375) i386-pc-mingw32 locale: LC_COLLATE=English_United

Re: [R] as.POSIXct month problem

2009-10-26 Thread guillaume chaumet
Thank you for your quick response sessionInfo() R version 2.9.2 (2009-08-24) x86_64-pc-linux-gnu locale:

[R] Cannot activate chm help in R 2.10

2009-10-26 Thread Ulrike Groemping
Dear all, I just tried to be fast for once, installed R 2.10 and also newly installed all previously-installed packages. However, now all my help files are text only, which is of course a pity with the new possibilities of links between help pages. What can I do to re-activate chm-help?

Re: [R] Unable to get Legend with survplot rms package

2009-10-26 Thread Aric Gregson
On Mon, 26 Oct 2009 13:21:23 -0700 Frank E Harrell Jr f.harr...@vanderbilt.edu wrote: Please send exact code for an example that fails. If possible, generate the data using a simple simulation to make the example reproducible. endtime - c(251,753,753,791,732,1081,184,713,674,732,254,

Re: [R] as.POSIXct month problem

2009-10-26 Thread guillaume chaumet
That's work with Sys.setlocale(LC_TIME,en_US.UTF-8) Thank you 2009/10/26 Jorge Ivan Velez jorgeivanve...@gmail.com Hi Guillaume, What is your sessionInfo() ? It works me: x - c(1jan1960, 2jan1960, 31mar1960, 30jul1960) z - strptime(x, %d%b%Y) z [1] 1960-01-01 1960-01-02 1960-03-31

Re: [R] basic statistics to csv

2009-10-26 Thread Liviu Andronic
Hello On 10/26/09, lanc...@fns.uniba.sk lanc...@fns.uniba.sk wrote: nsu - numSummary(x[,c(a, b, c)], statistics=c(mean, sd, quantiles), quantiles=c(0,.25,.5,.75,1)) write.csv(nsu, file = numsummary.csv) I get the ERROR: cannot coerce class numSummary into a data.frame message. Try

Re: [R] issue with levels of a factor after subsetting

2009-10-26 Thread marcos carvajalino
Thanks Phil, exactly what i was looking for!! 2009/10/26 Phil Spector spec...@stat.berkeley.edu: Marcos -   Either refer to levels(factor(car4$Rio)) or levels(car4$Rio[,drop=TRUE]) to show only the levels that are present in the variable.                                        - Phil

Re: [R] as.POSIXct month problem

2009-10-26 Thread Peter Dalgaard
guillaume chaumet wrote: Thank you for your quick response sessionInfo() R version 2.9.2 (2009-08-24) x86_64-pc-linux-gnu locale:

Re: [R] Cannot activate chm help in R 2.10

2009-10-26 Thread Ulrike Groemping
I realize now that the dynamic help is no longer implemented via chm apparently. But nevertheless, the intention is certainly to be able to call help WITH links from within R? What can I do to make that work instead of the pure text files I get at the moment ? Could a proxy be in the way ? I

[R] Time variables changed after reopening a .RData file (bug?)

2009-10-26 Thread Tal Galili
Hello all, I recently opened a backup .RData file which contained (three) time variables created in the session I had a few months ago. Upon inspecting those variables I suddenly realized they all got an extra hour to them. So a variable like: morning - as.difftime(08:00:00) That was defined a

Re: [R] as.POSIXct month problem

2009-10-26 Thread guillaume chaumet
I am on Ubuntu Karmic. 2009/10/26 Peter Dalgaard p.dalga...@biostat.ku.dk guillaume chaumet wrote: Thank you for your quick response sessionInfo() R version 2.9.2 (2009-08-24) x86_64-pc-linux-gnu locale:

Re: [R] reshaping a data frame

2009-10-26 Thread John Kane
Why not just unlist the data.frame and specify the number of rows in a matrix each time you need look at a different layout, assuming I understand the question. Example === aa - data.frame(1:100) bb - unlist(aa) (cc - matrix(bb,

Re: [R] Unable to get Legend with survplot rms package

2009-10-26 Thread Frank E Harrell Jr
Aric Gregson wrote: On Mon, 26 Oct 2009 13:21:23 -0700 Frank E Harrell Jr f.harr...@vanderbilt.edu wrote: Please send exact code for an example that fails. If possible, generate the data using a simple simulation to make the example reproducible. endtime -

Re: [R] Unable to get Legend with survplot rms package

2009-10-26 Thread Aric Gregson
On Mon, 26 Oct 2009 15:10:42 -0700 Frank E Harrell Jr f.harr...@vanderbilt.edu wrote: survplot(survest(fit.example1), n.risk=T, conf='none', cex.n.risk=.85, dots=T, col='gray10', lty=2) The argument to survplot should be a cph or psm or survfit object (or a survest result on a psm object).

  1   2   >