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

2009-10-26 Thread Peter Ehlers
Ista, Here's the quote from MASS (the book, 4e, p.142): "Terms of the form a/x, where a is a factor, are best thought of as "separate regression models of type 1 + x within the levels of a." I'm not answering the OP's question because in my view if one doesn't understand the output of lm(), then

[R] Warning message when Loading package svMisc in R 2.10.0

2009-10-26 Thread Qi Li
Hi, I have a problem when using R 2.10.0, Loading required package: svMisc Warning message: package 'svMisc' was built under R version 2.9.1 and help will not work correctly HOW to fix it? __ R-help@r-project.org mailing list https://stat.ethz.ch/mai

Re: [R] WAR file installation

2009-10-26 Thread Cedrick W. Johnson
WAR files are strictly in the J2EE realm, not something related to R. You have to install your choice of app server and write java code that either uses something similar to RServe or fancy footwork using the underlying system commands to interact with R. I don't have the link off the top of

[R] WAR file installation

2009-10-26 Thread Madan Mohan
Hi Friends, Currently i am using R-2.9.1. I am new to R and i am in learning stage. Can any one tell me whether R allows WAR file installation? Other concerns i have are: 1. Does R allows WAR file installation? 2. Does R has a web server or application server concept? 3. Can we create login crede

Re: [R] How to reduce key strokes when defining S4 classes?

2009-10-26 Thread mtmorgan
Quoting Peng Yu : I feel tedious when I define a S4 class and the methods. For each method, I have to call both setMethod and setGeneric (or both setReplaceMethod and setGeneric). I would like a more compact grammar so that I can reduce the key strokes. I'm wondering if there is a better way ava

Re: [R] How to change a slot by a method?

2009-10-26 Thread mtmorgan
Quoting Peng Yu : In the following code, 'multiply' doesn't multiply a...@x by 2. I'm wondering how to define a method that can change the slot of a class. $ Rscript setGeneric.R setClass( + Class='A', + representation=representation( + x='numeric' + ) + ) [1] "A"

Re: [R] Creating a sparse matrix from a file

2009-10-26 Thread Pallavi Palleti
Hi David, Thanks for your help. This is exactly what I want. But, I have number of rows of my matrix = 25k and columns size as 80k. So, when I define a matrix object, it is throwing an error saying can not allocate a vector of length (25K * 80k). I heard that, this data can still be loaded into R

Re: [R] Using a variable in the formula

2009-10-26 Thread Rolf Turner
On 27/10/2009, at 4:26 PM, jmark17 wrote: I am sure this question has come up, but searching hasn't given me any results. So I need to enter this line: mx1 <- randomForest(X1 ~ elevation + slope + vegtype, data = moths.train) But the problem is that X1 is currently hard coded. I would in

[R] GGPLOT2 Different Layers Different X Values

2009-10-26 Thread Jonathan Bleyhl
I'm trying to plot values based on a date and then overlay a histogram also by date. The problem is that both data sets don't have exactly the same dates. So when I add the histogram, any dates that aren't already there from from the scatter plot just get tacked on at the end and are out of order.

[R] Using a variable in the formula

2009-10-26 Thread jmark17
I am sure this question has come up, but searching hasn't given me any results. So I need to enter this line: mx1 <- randomForest(X1 ~ elevation + slope + vegtype, data = moths.train) But the problem is that X1 is currently hard coded. I would instead like to be able to put in the value of X1 t

[R] MLE for lambda of Poisson distribution using fitdistr

2009-10-26 Thread ankush2kn
Hi, I am using the fitdistr of MASS to get the MLE for the lambda of a Poisson distribution. When i run the fitdistr command, i get an output that looks like - lambda 3.75 (0.03343) Couple of questions - 1. is the MLE 0.03343 for the lambda of the given distribution then? 2

[R] API question (embedding R)

2009-10-26 Thread Bernd Kreuss
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello list, i want to access R from a Pascal program. Basically i only need to be able to * start the engine / the interpreter (and keep it running) * pass strings to it (R code) that should be parsed and executed * get floats or vectors of floats in

[R] Output pairwise.t.test to data.frame

2009-10-26 Thread Sam Player
# I'm doing a pairwise.t.test on a large dataset and need the output in a data frame so I can work further with it, e.g. so I can export it to a spreadsheet. Is there any way to coerce the results to an exportable format? # For example, if I do: test <- pairwise.t.test(numbers, factors, p.adj="bo

[R] How to reduce key strokes when defining S4 classes?

2009-10-26 Thread Peng Yu
I feel tedious when I define a S4 class and the methods. For each method, I have to call both setMethod and setGeneric (or both setReplaceMethod and setGeneric). I would like a more compact grammar so that I can reduce the key strokes. I'm wondering if there is a better way available. setClass(

[R] How to change a slot by a method?

2009-10-26 Thread Peng Yu
In the following code, 'multiply' doesn't multiply a...@x by 2. I'm wondering how to define a method that can change the slot of a class. $ Rscript setGeneric.R > setClass( + Class='A', + representation=representation( + x='numeric' + ) + ) [1] "A" > > setMethod( +

Re: [R] Multiple comparison test split plot analysis in R

2009-10-26 Thread Richard M. Heiberger
Please see the maiz example in ?HH:::glht.mmc You may need to install HH first with install.packages("HH") __ 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/post

[R] syntax for estimable(gmodels package) and glht(multcomp package)

2009-10-26 Thread Robert Wilkins
Hello, I have a question as to how the syntax for glht(package multcomp) and estimable (gmodels) works, since I'm not getting everything from the documents I've googled so far, especially with models with 2nd order terms. A modestly complex model: 2-way anova with one continuous covariate, no ran

Re: [R] reshaping a data frame

2009-10-26 Thread Jim Lemon
On 10/27/2009 07:09 AM, Erin Hodgess wrote: 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, pleas

Re: [R] Poisson dpois value is too small for double precision thus corrupts loglikelihood

2009-10-26 Thread Duncan Murdoch
On 26/10/2009 8:21 PM, R_help Help wrote: Hi - I have a likelihood function that involves sums of two possions: L = a*dpois(Xi,theta1)*dpois(Yi,theta2)+b*(1-c)*a*dpois(Xi,theta1+theta3)*dpois(Yi,theta2) where a,b,c,theta1,theta2,theta3 are parameters to be estimated. (Xi,Yi) are observations.

[R] Poisson dpois value is too small for double precision thus corrupts loglikelihood

2009-10-26 Thread R_help Help
Hi - I have a likelihood function that involves sums of two possions: L = a*dpois(Xi,theta1)*dpois(Yi,theta2)+b*(1-c)*a*dpois(Xi,theta1+theta3)*dpois(Yi,theta2) where a,b,c,theta1,theta2,theta3 are parameters to be estimated. (Xi,Yi) are observations. However, Xi and Yi are usually big (> 2)

Re: [R] A naive question about permutation tests in the coin package

2009-10-26 Thread Ista Zahn
Anybody? As a social psychology student I run a lot of experiments, with random assignment but no random sampling. I've been reading about randomization tests, and want to implement them in R. My googleing and perusal of CRAN led me to the coin package, but due to the issues described in my origina

Re: [R] Creating a sparse matrix from a file

2009-10-26 Thread David Winsemius
On Oct 26, 2009, at 5:06 AM, Pallavi Palleti wrote: 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

[R] Multiple comparison test split plot analysis in R

2009-10-26 Thread Jo Stringer
Hi all! I have a split plot analysis in which the model parameters are: Efficacy = y Rep = block Product and rateind = main plot Variety = subplot I can do the split plot analysis with: summary(model1<-aov(efficacy~rep+product*rateind*variety+Error(rep:product:rate), data=ht28)) How do

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

2009-10-26 Thread Aric Gregson
On Mon, 26 Oct 2009 15:54:08 -0700 Frank E Harrell Jr wrote: > Best to take a break and read over more documentation. Got it!! Thank you very much! Aric IMPORTANT WARNING: This email (and any attachments) is ...{{dropped:9}} __ R-help@r-project.or

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

2009-10-26 Thread Aric Gregson
On Mon, 26 Oct 2009 15:54:08 -0700 Frank E Harrell Jr wrote: > But fit.example1 is a cph object. It can go directly to survplot. > > Best to take a break and read over more documentation. Yes, doesn't work as I noted. I'll keep reading as I have been, but this is the closest I have gotten to ma

[R] MLE for noncentral t distribution

2009-10-26 Thread Balzer Susanne
Hi, Actually I am facing a similar problem. I would like to fit both an ordinary (symmetric) and a non-central t distribution to my (one-dimensional) data (quite some values.. > 1 mio.). For the symmetric one, fitdistr or funInfoFun (using fitdistr) from the qAnalyst package should do the job,

Re: [R] Severe growing pains with new help system

2009-10-26 Thread Duncan Murdoch
I don't see anything below that is new today. Are you saying you didn't test any of the pre-release versions? You're basically stuck with the features that come out in .0 releases until the next one. I'll fix the typo in 4, but the rest of it is unlikely to change much in the next six months

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 15:10:42 -0700 Frank E Harrell Jr 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). My ap

[R] Severe growing pains with new help system

2009-10-26 Thread Kevin Wright
(On Windows XP with R 2.10.0) 1. In the past, I have used a desktop search engine (X1) to pre-index all of R's html help files. Obviously, this no longer works with dynamic help pages. It also appears that the .Rd files are converted to a binary format when installed and cannot be indexed by X1.

Re: [R] Multiple line commands in R scripting

2009-10-26 Thread Neil Stewart
I guess I'll have to be really careful about my line breaks. Thank you all for your help! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and p

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

2009-10-26 Thread Duncan Murdoch
Ulrike Groemping wrote: 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-ac

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 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). My apologies, al

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 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, 644,782,75

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] as.POSIXct month problem

2009-10-26 Thread guillaume chaumet
I am on Ubuntu Karmic. 2009/10/26 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: >> >> LC_CTYPE=fr_FR.UTF-8;LC_NUMERIC=C;LC_TIME=fr_FR.UTF-8;LC_COLLATE=fr_FR.UTF-8;

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

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 thin

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: LC_CTYPE=fr_FR.UTF-8;LC_NUMERIC=C;LC_TIME=fr_FR.UTF-8;LC_COLLATE=fr_FR.UTF-8;LC_MONETARY=fr_FR.UTF-8;LC_MESSAGES=fr_FR.UTF-8;LC_PAPER=fr_FR.UTF-8;LC_NAME=C;LC_ADD

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

Re: [R] basic statistics to csv

2009-10-26 Thread Liviu Andronic
Hello On 10/26/09, 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.

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

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 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, 644,782,753,278,184,715,832,

[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? chm-help

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: LC_CTYPE=fr_FR.UTF-8;LC_NUMERIC=C;LC_TIME=fr_FR.UTF-8;LC_COLLATE=fr_FR.UTF-8;LC_MONETARY=fr_FR.UTF-8;LC_MESSAGES=fr_FR.UTF-8;LC_PAPER=fr_FR.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEA

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=

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 >

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

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

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, col='gra

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)

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

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

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

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

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

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 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', >> +     representation

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 co

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 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/d

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] 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 wrote: > From: e-letter > 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, > > I have a data set as fo

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

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

[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 https://stat.ethz.ch/ma

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

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' > + ), > +

[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 https://stat.ethz.ch/mailman/lis

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

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

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 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 following two

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 do

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

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 data1<-as.data.frame

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: ‘N

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

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

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

[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 > data1<-as.data.frame(lapply(data,funct

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

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

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 <- rnorm(1

[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) z<-crr(f

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 quit

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 pa

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 fu

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

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 wrote: > Dear all, > > I try to use RGtk2

[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 http://cran.r-pro

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 Ht_

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/ __ R-help@r-p

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

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

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

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

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

Re: [R] regular expressions

2009-10-26 Thread baptiste auguie
Perfect, thanks! baptiste 2009/10/26 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")

  1   2   >