[R] Blank windows in Rcmdr

2008-04-15 Thread Fehmi YAZICI
I started to learn R and like to use Rcmdr. I have the latest R (R-2.6.2) and R commander (1.3-14). When I go to Tools menu (for example) pull down "load packages" in Rcmdr, a blank window is up and there is nothing in it. I can not select and move to next step. This also happens with the other

[R] Blank windows in Rcmdr

2008-04-15 Thread Fehmi YAZICI
I started to learn R and like to use Rcmdr. I have the latest R (R-2.6.2) and R commander (1.3-14). When I go to Tools menu (for example) pull down "load packages" in Rcmdr, a blank window is up and there is nothing in it. I can not select and move to next step. This also happens with the other

Re: [R] a question of alphabetical order

2008-04-15 Thread Prof Brian Ripley
On Wed, 16 Apr 2008, [Ricardo Rodriguez] Your XEN ICT Team wrote: Almost done... Sys.setlocale(category = "LC_ALL", locale = "es_ES.ISO8859-15") The order is now correct, but it renders incorrectly most of the non-ASCII characters, both in console: 1 √\201guilas de mantenimiento 1.97 NA 1.7

[R] Brown-Forsythe F* Statistic

2008-04-15 Thread Paul Lynch
I've been searching around for a function for computing the Brown-Forsythe F* statistic which is a substitute for the normal ANOVA F statistic for when there are unequal variances, and when there is evidence of non-normality. A couple of other people have asked this question, the responses I found

Re: [R] looking for a string

2008-04-15 Thread Charles C. Berry
On Tue, 15 Apr 2008, [Ricardo Rodriguez] Your XEN ICT Team wrote: Charles C. Berry wrote: You want ?regexpr Something like regexpr("Jalapa", as.character( unidad ) ) != -1 HTH, Chuck Please, look at this... > substringJalapa <- regexpr("Jalapa", as.character(conagua$unidad ) )

Re: [R] prediction intervals from a mixed-effects models?

2008-04-15 Thread Spencer Graves
Thank you Dieter and Greg for your replies. Reinhold Kliegl suggested Gelman & Hill (2007), which looks like it contains an answer to my question. Thanks again. Spencer Graves Gregory Warnes wrote: > On Apr 13, 2008, at 1:41PM , Dieter Menne wrote: > >> Spencer Graves p

Re: [R] [R-sig-ME] prediction intervals from a mixed-effects models?

2008-04-15 Thread Spencer Graves
Dear Reinhold: Thanks for the suggestion. The index of Gelman and Hill for "prediction" for "multilevel model" mentions pp. 272-275 and 361-363. P. 362 starts with "predicting a new unit in an existing group", which sounds like what I want. Now all I need to do is study that book enou

Re: [R] How to test if t[["cat"]] exists ?

2008-04-15 Thread Charilaos Skiadas
On Apr 15, 2008, at 9:53 PM, Ng Stanley wrote: > Hi, > >> t <- list("cat"=1) >> exists("t") > [1] TRUE >> exists("t[["cat"]]") > Error: unexpected symbol in "exists("t[["cat" >> exists("t[[\"cat\"]]") > [1] FALSE Perhaps what you want is: "cat" %in% names(t) > Thanks > Stanley Haris Skiadas De

Re: [R] Making a data frame into a factor ?

2008-04-15 Thread Charilaos Skiadas
I think you want to look into ?stack. For example: x<-data.frame(a=1:5,b=6:10) y<- stack(x) Then x$values are the values, and x$ind is the factor. On Apr 15, 2008, at 9:36 PM, Paul Lynch wrote: > Hi, >I'm trying to do a linear regression style one-way ANOVA using some > data in a data frame

[R] R with commercial license / technical support?

2008-04-15 Thread Sankalp Upadhyay
Hi, We wanted to use R on production systems and business requirements mean that the software should have technical support. Is there any company providing support for R? Regards, Sankalp __ R-help@r-project.org mailing list https://stat.ethz.ch/mail

Re: [R] How to get assign an vector of words to associative array ?

2008-04-15 Thread Ng Stanley
Thanks that help. On Wed, Apr 16, 2008 at 8:46 AM, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 15/04/2008 8:36 PM, Ng Stanley wrote: > > > Hi, > > > > How to get assign an vector of words to associative array ? > > > > a[["animal"]] <- c("dog", "cat") > > > > > Error in a[["animal"]] <- c("do

[R] How to test if t[["cat"]] exists ?

2008-04-15 Thread Ng Stanley
Hi, > t <- list("cat"=1) > exists("t") [1] TRUE > exists("t[["cat"]]") Error: unexpected symbol in "exists("t[["cat" > exists("t[[\"cat\"]]") [1] FALSE Thanks Stanley [[alternative HTML version deleted]] __ R-help@r-project.org mailing list ht

[R] Making a data frame into a factor ?

2008-04-15 Thread Paul Lynch
Hi, I'm trying to do a linear regression style one-way ANOVA using some data in a data frame, and (perhaps because I am still relatively unfamiliar with both R and statistics) what I thought I should do was to make the data frame into a factor. By that I mean that I have a data frame whose colu

Re: [R] disturbing seed dependence in optim L-BFGS-B method

2008-04-15 Thread Duncan Murdoch
On 15/04/2008 6:59 PM, Bob Reilly wrote: > The the use of optim with the L-BFGS-B method for the following simple > function gives erroneous results. Any help appreciated! > > Best, > Bob Reilly > > # Code: > > V=function(p){ > p1=p[1];p2=p[2] > y=p1*p2-.4*(p1+p2) > return(-y)} > > p=c(.2,.2)

Re: [R] Transposing Data Frame does not return numeric entries

2008-04-15 Thread Bill.Venables
> dat <- read.table(textConnection(" site1 site2 site3 site4 species1 1 2 3 4 species2 30 4 5 species3 5 3 73 spesies4 0 3 67 ")) > dat site1 sit

[R] disturbing seed dependence in optim L-BFGS-B method

2008-04-15 Thread Bob Reilly
The the use of optim with the L-BFGS-B method for the following simple function gives erroneous results. Any help appreciated! Best, Bob Reilly # Code: V=function(p){ p1=p[1];p2=p[2] y=p1*p2-.4*(p1+p2) return(-y)} p=c(.2,.2) # p=c(.8,.8) max=optim(p,V,method = "L-BFGS-B",lower=c(0,0),upper=c

Re: [R] How to get assign an vector of words to associative array ?

2008-04-15 Thread Duncan Murdoch
On 15/04/2008 8:36 PM, Ng Stanley wrote: > Hi, > > How to get assign an vector of words to associative array ? > >> a[["animal"]] <- c("dog", "cat") > Error in a[["animal"]] <- c("dog", "cat") : > more elements supplied than there are to replace R uses named lists as associative arrays, but th

Re: [R] glm syntax question

2008-04-15 Thread Bill.Venables
Henrique Dallazuanna from Curitiba writes: > > Try > > On Tue, Apr 15, 2008 at 6:07 AM, maud <[EMAIL PROTECTED]> wrote: > [snip] > > > > (1) I need to be able to have my list of variables in the regression > > be based from a variable vector instead of hard code. > > (2) I need to be able to co

Re: [R] Transposing Data Frame does not return numeric entries

2008-04-15 Thread stephen sefick
ok site1 site2 site3 site4 species1 1 2 3 4 species2 30 4 5 species3 5 3 73 spesies4 0 3 67 species1 species2 species3 species4 site1 1

[R] How to get assign an vector of words to associative array ?

2008-04-15 Thread Ng Stanley
Hi, How to get assign an vector of words to associative array ? > a[["animal"]] <- c("dog", "cat") Error in a[["animal"]] <- c("dog", "cat") : more elements supplied than there are to replace Thanks stanley [[alternative HTML version deleted]]

[R] Questions related to plotting boxplots of time series data

2008-04-15 Thread Thomas Adams
List, I have looked through several R books and searched the web to find answers to my questions with no results. I have an ensemble of time series data (what are essentially Monte Carlo simulations) which I would like to summarize as a time series of boxplots, by date/time at 6-hr intervals.

Re: [R] SVD of a variance matrix

2008-04-15 Thread Giovanni Petris
Hi Ravi, Thank you for your useful reply. Does the result also hold for variance-covariance matrices that have one or more zero eigenvalues? Do you have a reference to suggest? Thank you again! Giovanni > Date: Tue, 15 Apr 2008 18:14:11 -0400 > From: Ravi Varadhan <[EMAIL PROTECTED]> > Thre

Re: [R] Including Java files in R Package

2008-04-15 Thread Duncan Murdoch
On 15/04/2008 7:20 PM, Hongshu Chen wrote: > Hi, > > I am building a package which contains some Java class files. I am planning > to create a subdirectory "inst/Java/" in the source directory and put Java > files in it, therefore after installing the package, those files will be in > the "Java/"

Re: [R] heavy graphs

2008-04-15 Thread Greg Snow
Look at the hexbin package (bioconductor I think). -Original Message- From: "Georg Ehret" <[EMAIL PROTECTED]> To: "r-help" <[EMAIL PROTECTED]> Sent: 4/15/08 3:23 PM Subject: [R] heavy graphs Dear R community,I am creating large graphs with hundreds of thousands of datapoints. My u

[R] Including Java files in R Package

2008-04-15 Thread Hongshu Chen
Hi, I am building a package which contains some Java class files. I am planning to create a subdirectory "inst/Java/" in the source directory and put Java files in it, therefore after installing the package, those files will be in the "Java/" subdirectory in where the package is installed. My ques

Re: [R] Transposing Data Frame does not return numeric entries

2008-04-15 Thread Rolf Turner
RML: *** Data frames are NOT matrices!!! *** On 16/04/2008, at 10:35 AM, stephen sefick wrote: > x <- read.table("LittleGarvin.csv", sep=",", header=TRUE) > y <- t(x) > str(y) > > chr [1:193, 1:288] "oligocha" "0" " 0" " 0" " 0" "0" ... > - attr(*, "dimnames")=List of 2 > ..$ : chr [1:193]

Re: [R] = vs. ==?

2008-04-15 Thread Gad Abraham
Linn wrote: > Hi > Could anyone please explain to me the difference between the = and the ==? > I'm quite new to R and I've tried to find out but didn't get any wiser... "=" is the assignment operator as in > x = 3 > x [1] 3 (but use the "<-" operator instead, see a post by Bill Venables a few

[R] Transposing Data Frame does not return numeric entries

2008-04-15 Thread stephen sefick
I have a species as rows and sites as columns matrix. I would like to tranpose this matrix so that I can do an NMDS analysis with the vegan package. I have used y <- t(x) and it indeed transposes the matrix, but it changes the whole make up chr [1:193, 1:288] "oligocha" "0" " 0" " 0" " 0" "0"

Re: [R] Predicting ordinal outcomes using lrm{Design}

2008-04-15 Thread Frank E Harrell Jr
jayhegde wrote: > Dear List, > I have two questions about how to do predictions using lrm, specifically > how to predict the ordinal response for each observation *individually*. > I'm very new to cumulative odds models, so my apologies if my questions are > too basic. > > I have a datas

Re: [R] boxplot tick locations

2008-04-15 Thread Sherri Heck
Hi Peter- that worked wonderfully! I am having a hard time adding "labels" to the tick marks. I've tried a myriad of things. I just want to label the ticks 1- 23. any thoughts? thanks again for your help! sheck Peter Alspach wrote: > Sherri > > Is this what you want? > > sherri <- data.fr

[R] Transposing Data Frame does not return numeric entries

2008-04-15 Thread stephen sefick
x <- read.table("LittleGarvin.csv", sep=",", header=TRUE) y <- t(x) str(y) chr [1:193, 1:288] "oligocha" "0" " 0" " 0" " 0" "0" ... - attr(*, "dimnames")=List of 2 ..$ : chr [1:193] "X" "upwd1201" "upwd0502" "upwd0702" ... ..$ : NULL x is a data frame with a whole bunch of numeric vectors I

[R] Displaying Grahics to the X Window when calling R from command line

2008-04-15 Thread Pologruto, Thomas
Hi, I am running an R script from the command line by calling: > R --vanilla < test.R My terminal is part of the Xwin (Xterm) and there is a plot(1:10) command in the test.R script. This will not produce a grahic though. When I start R by calling R then plotting from the R command in the sam

Re: [R] heavy graphs

2008-04-15 Thread Duncan Murdoch
On 15/04/2008 5:22 PM, Georg Ehret wrote: > Dear R community,I am creating large graphs with hundreds of > thousands of datapoints. My usual way for output was pdf, but now I am > getting file sizes of >30Mb that do not open well (or at all) in Adobe. Is > there a way to reduce the resoluti

Re: [R] SVD of a variance matrix

2008-04-15 Thread Ravi Varadhan
Let me correct my reply a bit. U and V will differ by a factor of (-1) corresponding to negative eigenvalues (if any) of a general symmetric A. However, for symmetric positive-definite matrices (e.g. variance-covariance matrix), they will be identical. Ravi.

Re: [R] looking for a string

2008-04-15 Thread [Ricardo Rodriguez] Your XEN ICT Team
Thanks Mark! [EMAIL PROTECTED] wrote: >> From: "[Ricardo Rodriguez] Your XEN ICT Team" <[EMAIL PROTECTED]> >> Date: 2008/04/15 Tue PM 04:48:12 CDT >> To: [EMAIL PROTECTED], r-help@r-project.org >> Subject: Re: [R] looking for a string >> > > Hi Ricardo: you can use the idea you > found below

Re: [R] heavy graphs

2008-04-15 Thread Bert Gunter
But you also might have the additional problem that too many data points just produce an incoherent solid blob, no matter the format. Lots of folks have written about this. Check out JCGS and computer graphics literature for ideas. Also,this is one arena where fancy, dynamic, interactive software

Re: [R] SVD of a variance matrix

2008-04-15 Thread Ravi Varadhan
Yes. SVD of any symmetric (which is, of course, also square) matrix will always have U = V. Also, SVD is the same as spectral decomposition, and the columns of U and V are the eigenvectors, but the singular values will be the absolute value of eigenvalues. Ravi.

Re: [R] a question of alphabetical order

2008-04-15 Thread [Ricardo Rodriguez] Your XEN ICT Team
Almost done... Sys.setlocale(category = "LC_ALL", locale = "es_ES.ISO8859-15") The order is now correct, but it renders incorrectly most of the non-ASCII characters, both in console: 1 √\201guilas de mantenimiento 1.97 NA 1.72 2 √\201ngeles de la CONAGUA 1.77 1.97 1.94 And in quartz(): http:/

Re: [R] looking for a string

2008-04-15 Thread [Ricardo Rodriguez] Your XEN ICT Team
Thanks all, [EMAIL PROTECTED] wrote: >> From: "[Ricardo Rodriguez] Your XEN ICT Team" <[EMAIL PROTECTED]> >> Date: 2008/04/14 Mon PM 07:43:23 CDT >> To: Henrique Dallazuanna <[EMAIL PROTECTED]>, r-help@r-project.org >> Subject: Re: [R] looking for a string >> > > henrique means to use his com

[R] SVD of a variance matrix

2008-04-15 Thread Giovanni Petris
Hello! I suppose this is more a matrix theory question than a question on R, but I will give it a try... I am using La.svd to compute the singular value decomposition (SVD) of a variance matrix, i.e., a symmetric nonnegative definite square matrix. Let S be my variance matrix, and S = U D V' be

Re: [R] how to write a table to pdf

2008-04-15 Thread jebyrnes
As a followup, what about wrting ANOVA tables and such to files? I keep getting odd errors converting an ANOVA object to a data frame and such. Mark Wardle wrote: > > I would look at Sweave, particularly outputting to LaTeX. Then have a > look at the xtable or Hmisc's latex() functions. > > I

Re: [R] heavy graphs

2008-04-15 Thread Roger Peng
It's probably best to choose a different format like PNG or jpeg. -roger On Tue, Apr 15, 2008 at 5:22 PM, Georg Ehret <[EMAIL PROTECTED]> wrote: > Dear R community,I am creating large graphs with hundreds of > thousands of datapoints. My usual way for output was pdf, but now I am > gett

Re: [R] a question of alphabetical order

2008-04-15 Thread [Ricardo Rodriguez] Your XEN ICT Team
Tricky question, this order issue :-( Thank you so much for the detailed explanation. Thus, please, must I conclude that I will have to survive with this ASCII order while working in Mac OS X 10.5.2 until Mac people fix this bug? You spoke about es_ES.ISO8859-15 in Mac. Will it do the trick? Y

Re: [R] how to write a table to pdf

2008-04-15 Thread Georg Ehret
Dear Stanley, Alternatively you can also look at textplot from the gregmisc package. Cheers, Georg. Georg Ehret Johns Hopkins Baltimore, US On Tue, Apr 15, 2008 at 4:11 PM, Mark Wardle <[EMAIL PROTECTED]> wrote: > I would look at Sweave, particularly outputting to LaTeX

[R] heavy graphs

2008-04-15 Thread Georg Ehret
Dear R community,I am creating large graphs with hundreds of thousands of datapoints. My usual way for output was pdf, but now I am getting file sizes of >30Mb that do not open well (or at all) in Adobe. Is there a way to reduce the resolution or get rid of overlaying datapoints? Any other

Re: [R] How can I import user-defined missings from Spss?

2008-04-15 Thread Christine Christmann
Ok, if I have to make the spss file available, then I hope an attachment is fine. I really would appreciate if any 'kind soul' would give me a push into the right direction to solve this problem. The spss file contains only two variables and five cases. For one case both values are defined as

Re: [R] glht with a glm using a Gamma distribution

2008-04-15 Thread jebyrnes
To reply, in case anyone reads this, the problem was of course in the setup of the matrix, and there are two possible solutions. The first, for a model with only a single set of groupings, is to use mcp. So, even with this contrast matrix contra<-rbind("A v. B" = c(-1,1,0,0),

Re: [R] R, VR, and Debian

2008-04-15 Thread Roger Leigh
On Sun, Apr 06, 2008 at 07:30:48PM -0500, Dirk Eddelbuettel wrote: > > On 6 April 2008 at 23:58, (Ted Harding) wrote: > | Hi Folks, > | A while ago (September 2007) I set up an experimental > | Debian 4.0 Etch installation, and installed R on it, > | along with several packages -- including e1071

Re: [R] Weibull

2008-04-15 Thread Prof Brian Ripley
On Tue, 15 Apr 2008, Matthew B. wrote: > Thank you > > I don't know anything about survival regressions. Where should I start ? > (anything to read ?) MASS, same as for fitdistr. > > Maybe it is better or easier for me to write my own functions. > > 2008/4/15, Prof Brian Ripley <[EMAIL PROTECTED

[R] Predicting ordinal outcomes using lrm{Design}

2008-04-15 Thread jayhegde
Dear List, I have two questions about how to do predictions using lrm, specifically how to predict the ordinal response for each observation *individually*. I'm very new to cumulative odds models, so my apologies if my questions are too basic. I have a dataset with 4000 observations. E

Re: [R] how to write a table to pdf

2008-04-15 Thread Mark Wardle
I would look at Sweave, particularly outputting to LaTeX. Then have a look at the xtable or Hmisc's latex() functions. I believe one can write to OpenOffice file formats too which may be an alternative solution. Best wishes, Mark On 14/04/2008, Ng Stanley <[EMAIL PROTECTED]> wrote: > Hi, > > I

Re: [R] Weibull

2008-04-15 Thread Matthew B.
Thank you I don't know anything about survival regressions. Where should I start ? (anything to read ?) Maybe it is better or easier for me to write my own functions. 2008/4/15, Prof Brian Ripley <[EMAIL PROTECTED]>: > > For (possibly) censored data, survreg() in package survival can be used > (

Re: [R] R memory issue for writing out the file

2008-04-15 Thread jim holtman
What are you going to do with the table after you write it out? Are you just going to read it back into R? If so, have you tried using 'save'? On Tue, Apr 15, 2008 at 12:12 PM, Xiaojing Wang <[EMAIL PROTECTED]> wrote: > Hello, all, > > First thanks in advance for helping me. > > I am now handlin

Re: [R] Weibull

2008-04-15 Thread Prof Brian Ripley
For (possibly) censored data, survreg() in package survival can be used (just regress on a constant). The parametrization is slightly different from [dpqr]weibull, but it is easy to do the translation. On Tue, 15 Apr 2008, Ben Bolker wrote: > Matthew B. gmail.com> writes: > >> >> Dear R users

Re: [R] Weibull

2008-04-15 Thread Cleber Nogueira Borges
Ben Bolker wrote: > Matthew B. gmail.com> writes: > > >> Dear R users, >> >> This is a basic question. >> >> I want to fit a Weibull distribution. fitdistr(data, "weibull") works and it >> is a maximum likelihood fitting. Is it a good method ? Or is it better to >> write a function for the log-

Re: [R] sign() in R ?

2008-04-15 Thread Peter Dalgaard
Martin Maechler wrote: > Ok, > thanks a lot, everyone! > > Yes, I should rather have started thinking a bit more myself, > before going the easy route to R-help > > Anyway, the most obvious algorithm, > just putting things into place by swapping elements, > and counting how many times you have

Re: [R] Weibull

2008-04-15 Thread Ben Bolker
Matthew B. gmail.com> writes: > > Dear R users, > > This is a basic question. > > I want to fit a Weibull distribution. fitdistr(data, "weibull") works and it > is a maximum likelihood fitting. Is it a good method ? Or is it better to > write a function for the log-likelihood and the gradient

Re: [R] R memory issue for writing out the file

2008-04-15 Thread Henrik Bengtsson
Try to write the data.frame to file in blocks of rows by calling write.table() multiple times - see argument 'append' for write.table(). That will probably require less memory. /Henrik On Tue, Apr 15, 2008 at 6:12 PM, Xiaojing Wang <[EMAIL PROTECTED]> wrote: > Hello, all, > > First thanks in ad

Re: [R] R memory issue for writing out the file

2008-04-15 Thread Martin Morgan
Hi Xiaojing, That's a big table! You might try 'write' (you'll have to work harder to get your data into an appropriate format). You might also try the R-2.7 release candidate, which I think is available here http://r.research.att.com/ for the mac. There was a change in R-2.7 that will make

Re: [R] plotmath "overstrikes" in output on a Linux system

2008-04-15 Thread Paul Johnson
On Tue, Apr 8, 2008 at 1:23 PM, Paul Johnson <[EMAIL PROTECTED]> wrote: > On Tue, Apr 8, 2008 at 4:29 AM, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > > Looks likes the the laptop is using different fonts with incorrect font > > metrics. This could happen because it has a different screen reso

Re: [R] glht with a glm using a Gamma distribution

2008-04-15 Thread Charles C. Berry
On Mon, 14 Apr 2008, Jarrett Byrnes wrote: Quick question about the usage of glht. I'm working with a data set from an experiment where the response is bounded at 0 whose variance increases with the mean, and is continuous. A Gamma error distribution with a log link seemed like the logical cho

Re: [R] Format regression result summary

2008-04-15 Thread Paul Johnson
On Fri, Apr 11, 2008 at 11:05 AM, Thiemo Fetzer <[EMAIL PROTECTED]> wrote: > Hello to the whole group. > > I am a newbie to R, but I got my way through and think it is a lot easier to > handle than other software packages (far less clicks necessary). > [snip] > However, my wish is the output to

Re: [R] plot data with a colour scale

2008-04-15 Thread Mike Prager
"merca duria" <[EMAIL PROTECTED]> wrote: > I have a two dimensional data (X,Y) that I want to represent with different > colours, > > I want to make a plot with a graduate color scale at right, or below Take a look at the levelplot function in the lattice package. require(lattice) ?levelplot

Re: [R] sign() in R ?

2008-04-15 Thread Martin Maechler
Ok, thanks a lot, everyone! Yes, I should rather have started thinking a bit more myself, before going the easy route to R-help Anyway, the most obvious algorithm, just putting things into place by swapping elements, and counting how many times you have to swap, is easy and quite efficient.

Re: [R] Vegan R^2 and tau values for metaMDS

2008-04-15 Thread Gavin Simpson
On Mon, 2008-04-14 at 17:00 -0400, Sarah Goslee wrote: > On Mon, Apr 14, 2008 at 4:47 PM, Gavin Simpson <[EMAIL PROTECTED]> wrote: > > > Note that the default is to produce a bray-curtis dissimilarity matrix > > from the input species data. As such, I reproduce this dissimilarity > > matrix as

[R] R memory issue for writing out the file

2008-04-15 Thread Xiaojing Wang
Hello, all, First thanks in advance for helping me. I am now handling a data frame, dimension 11095400 rows and 4 columns. It seems work perfect in my MAC R (Mac Pro, Intel Chip with 4G RAM) until I was trying to write this file out using the command: write.table(all,file="~/Desktop/alex.lgen",s

Re: [R] codes for MCMC

2008-04-15 Thread Henrique Dallazuanna
See MCMCpack package On Tue, Apr 15, 2008 at 12:59 PM, <[EMAIL PROTECTED]> wrote: > I look for codes sources of R (examples of application) to implement > examples on Monte Carlo, MCMC and Gibbs sampling. > > > -- > Dr. P. NGOM, > Faculté des Sciences et Techniques > Département de Mathématiques

[R] sign() in R ?

2008-04-15 Thread Martin Maechler
I am looking for an algorithm (written in R (preferably) or C, but even pseudo-code in a text book maybe fine) to determine the sign of a permutation. What is that? Well, a permutation is either even or odd, the sign is +1 or -1, respectively, see, e.g., http://en.wikipedia.org/wiki/Signature_

Re: [R] Text-based graphics/plots

2008-04-15 Thread Greg Snow
When I first started using an early port of S, the main way to create graphs was with the "printer" graphics device which created plots like this (back then that was impressive). S-PLUS does still have the printer graphics device to do things like this, but I don't think that anyone has ever imple

[R] codes for MCMC

2008-04-15 Thread pngom
I look for codes sources of R (examples of application) to implement examples on Monte Carlo, MCMC and Gibbs sampling. -- Dr. P. NGOM, Faculté des Sciences et Techniques Département de Mathématiques et Informatique Université Cheikh Anta Diop Dakar - Sénégal -

Re: [R] plotmath

2008-04-15 Thread Tobias Verbeke
Emmanuel Birdling wrote: > I like to find out more about plotmath See the extensive help page ?plotmath and the article referenced therein Murrell, P. and Ihaka, R. (2000) An approach to providing mathematical annotation in plots. _Journal of Computational and Graphical Statistics_, *9*,

[R] plotmath

2008-04-15 Thread Emmanuel Birdling
I like to find out more about plotmath [[alternative HTML version deleted]] __ 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 provid

[R] Weibull

2008-04-15 Thread Matthew B.
Dear R users, This is a basic question. I want to fit a Weibull distribution. fitdistr(data, "weibull") works and it is a maximum likelihood fitting. Is it a good method ? Or is it better to write a function for the log-likelihood and the gradient and to use a numerical routine ? Fitdistr works

Re: [R] a question of alphabetical order

2008-04-15 Thread Prof Brian Ripley
This is a known Mac OS X bug, nothing to do with R which uses the system functions (strcoll/wcscoll) for such things. If you look at the help for sort, it refers you to ?Comparison. Which says Comparison of strings in character vectors is lexicographic within the strings using the

[R] Text-based graphics/plots

2008-04-15 Thread Karl Ove Hufthammer
When discussing statistics in e-mail based discussion groups, or in newsgroups, it is sometimes useful to include simple, text-based statistical graphics. Here is an example, a histogram (only useful with a fixed-width font, obviously). :.

[R] a question of alphabetical order

2008-04-15 Thread [Ricardo Rodriguez] Your XEN ICT Team
Hi all, In Spanish vowels with accent like á, é, ... doesn't affect to the alphabetical order of vector of strings. I mean, a or á don't matter for establishing the alphabetical order. Nevertheless, while working with R order, here is what I get. Given a file transport.txt medio#variable avió

Re: [R] read.table and column class

2008-04-15 Thread Johannes Graumann
Thanks for your inputs. colClasses will be learned. Joh Prof Brian Ripley wrote: > On Tue, 15 Apr 2008, jim holtman wrote: > >> Define those columns as being character with colClasses and then use >> 'ifelse' to change it to boolean: >> >>> x <- c("", "", "+", "", "+") >>> x >> [1] "" "" "+"

Re: [R] p-values always identical for t.test of certain group of samples, why ?

2008-04-15 Thread Eik Vettorazzi
Why should it not be the same? Its the same dataset (up to scaling) you are testing on. Your effect (mean difference) will be different, but not your (standardized) t-statistic and df and therefore not your p-value. You will get the same result for the first if you simply test t.test(a,b) hth.

Re: [R] reusing custom functions, how to ?

2008-04-15 Thread Duncan Murdoch
Ng Stanley wrote: > Hi, > > I have created a number of custom functions, and hope to reuse them in other > source files. How should I go about doing that ? > > The best way is to create a package to hold them, then just use library(MyPackage) to attach them. See Writing R Extensions for instr

Re: [R] = vs. ==?

2008-04-15 Thread Ted Harding
On 15-Apr-08 12:28:53, Linn wrote: > > Hi > Could anyone please explain to me the difference between > the = and the ==? > I'm quite new to R and I've tried to find out but didn't > get any wiser... > > Thanks While these are indeed documented in ?"=" and ?"==", as Gabor Csardi has pointed out,

[R] reusing custom functions, how to ?

2008-04-15 Thread Ng Stanley
Hi, I have created a number of custom functions, and hope to reuse them in other source files. How should I go about doing that ? Thanks Stanley [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mai

[R] p-values always identical for t.test of certain group of samples, why ?

2008-04-15 Thread Ng Stanley
Hi, Given the following, a <- rnorm(5) b <- rnorm(5) c <- rnorm(5) a.1g.scale <- scale(c(a,b,c))[1:5] b.1g.scale <- scale(c(a,b,c))[6:10] c.1g.scale <- scale(c(a,b,c))[11:15] a.2g.scale <- scale(c(a,b))[1:5] b.2g.scale <- scale(c(a,b))[6:10] c.2g.scale <- scale(c) a.3g.scale <- scale(a) b.3g.scal

Re: [R] = vs. ==?

2008-04-15 Thread Pedro de Barros
Hi. = means assignment (like a=2, may be used instead of a <- 2, although I prefer to always use <-); It is also used to pass values to arguments in named argument lists, or to set default argument values). == is the boolean (logical) operator for testing whether two values are equal e.g. a <-

Re: [R] = vs. ==?

2008-04-15 Thread Gabor Csardi
I'm sure you'll get a friendlier answer, but... see ?"=" ?"==" Introduction to R G. On Tue, Apr 15, 2008 at 05:28:53AM -0700, Linn wrote: > > Hi > Could anyone please explain to me the difference between the = and the ==? > I'm quite new to R and I've tried to find out but didn't get any wiser

[R] = vs. ==?

2008-04-15 Thread Linn
Hi Could anyone please explain to me the difference between the = and the ==? I'm quite new to R and I've tried to find out but didn't get any wiser... Thanks -- View this message in context: http://www.nabble.com/%3D-vs.-%3D%3D--tp16700216p16700216.html Sent from the R help mailing list archiv

Re: [R] bootstrapping and penalizing regression

2008-04-15 Thread Frank E Harrell Jr
DAVID ARTETA GARCIA wrote: > Dear list, > > sorry for asking a more statistical question. I have been reading on > penalyzing estimates of regression and bootstrapping regression, > trying to include both or either in my analysis. But it is not clear > to me (mainly due to my non-statistics

Re: [R] glm syntax question

2008-04-15 Thread Henrique Dallazuanna
Try On Tue, Apr 15, 2008 at 6:07 AM, maud <[EMAIL PROTECTED]> wrote: > Hello, > > I'm new to R and have a very basic syntax question for the > functionglm. I am using the function glm() to do a regression on a > data set. I want to run this function in a while loop, so I need to be > able to do t

Re: [R] Non-linearity with Parametric data

2008-04-15 Thread Matthieu Stigler
Hello Are you working with parametric (your title) or non-parametric (your text) data? And what type of data (time series?)? Finally what kind of non-linearities are you interested in? Non-linear regression models (threshold autoregression, smooth transition, ANN) are avalaible in package tsDyn

[R] by inconsistently strips class - with fix

2008-04-15 Thread Alex Brown
summary: The function 'by' inconsistently strips class from the data to which it is applied. quick reason: tapply strips class when simplify is set to TRUE (the default) due to the class stripping behaviour of unlist. quick answer: This can be fixed by invoking tapply with simplify=FALSE,

[R] plot data with a colour scale

2008-04-15 Thread merca duria
Please, one question I have a two dimensional data (X,Y) that I want to represent with different colours, I want to make a plot with a graduate color scale at right, or below Can you help me, please? Thank you very much [[alternative HTML version deleted]]

Re: [R] read.table and column class

2008-04-15 Thread Prof Brian Ripley
On Tue, 15 Apr 2008, jim holtman wrote: > Define those columns as being character with colClasses and then use > 'ifelse' to change it to boolean: > >> x <- c("", "", "+", "", "+") >> x > [1] "" "" "+" "" "+" >> y <- ifelse(x == "", FALSE, TRUE) >> y > [1] FALSE FALSE TRUE FALSE TRUE Or defi

Re: [R] [R-SIG-Mac] language

2008-04-15 Thread Prof Brian Ripley
On Tue, 15 Apr 2008, [Ricardo Rodriguez] Your XEN ICT Team wrote: Thanks. Prof Brian Ripley wrote: Which messages? R.app and R itself handle this differently for their messages. You will find a discussion in the 'R Installation and Administration' manual. You don't give an address, but

Re: [R] sampsize in Random Forests

2008-04-15 Thread Federico
... On 10 mar, 17:00, "Liaw, Andy" <[EMAIL PROTECTED]> wrote: > Are you sure there are 100 sites in your data? Here's an example: > > R> library(randomForest)randomForest4.5-23 > Type rfNews() to see new features/changes/bug fixes. > R> f <- factor(sample(1:4, nrow(iris), replace=TRUE)) > R> rf1

Re: [R] sampsize in Random Forests

2008-04-15 Thread Federico
Dear Naiara and Andy, My strategy in cases with unbalanced data is: tmp <- as.vector(table(factors)); num_clases <- length(tmp); min_size <- tmp[order(tmp,decreasing=FALSE)[1]]; vector_for_sampsize <- rep(min_size,num_clases); Then: randomForest(..., y=factors, sampsize=vector_for_sampsize) I h

Re: [R] read.table and column class

2008-04-15 Thread jim holtman
Define those columns as being character with colClasses and then use 'ifelse' to change it to boolean: > x <- c("", "", "+", "", "+") > x [1] "" "" "+" "" "+" > y <- ifelse(x == "", FALSE, TRUE) > y [1] FALSE FALSE TRUE FALSE TRUE > On Tue, Apr 15, 2008 at 5:10 AM, Johannes Graumann <[EMAIL

Re: [R] why does regexpr not work with '.'

2008-04-15 Thread jim holtman
In a regular expression, '.' matches any character, which will be the first one. If you want to match a period, you have to escape it: > f="a,[EMAIL PROTECTED]:" #define an arbitrary test string > regexpr('.',f) [1] 1 attr(,"match.length") [1] 1 > regexpr('\\.',f) [1] 4 attr(,"match.length") [1]

[R] why does regexpr not work with '.'

2008-04-15 Thread Jonathan Williams
Dear R Helpers, I am running R 2.6.2 on a Windows XP machine. I am trying to use regexpr to locate full stops in strings, but, without success. Here an example:- f="a,[EMAIL PROTECTED]:" #define an arbitrary test string regexpr(',',f) #find the occurrences of ',' in f - should be one at locatio

Re: [R] [R-SIG-Mac] language

2008-04-15 Thread [Ricardo Rodriguez] Your XEN ICT Team
Thanks. Prof Brian Ripley wrote: > > Which messages? R.app and R itself handle this differently for their > messages. > > You will find a discussion in the 'R Installation and Administration' > manual. You don't give an address, but I suspect you are in a > Spanish-speaking locale. I believe

Re: [R] How can I import user-defined missings from Spss?

2008-04-15 Thread Prof Brian Ripley
You have already had a reply to a version of this (posted from another address) at https://stat.ethz.ch/pipermail/r-help/2008-April/159342.html . 'Kind souls' are likely to get exasperated when their help is unacknowledged. You need SPSS and Windows to reproduce this, and this is the R forum.

[R] How can I import user-defined missings from Spss?

2008-04-15 Thread Christine Christmann
Hi, It works for me to import spss datasets via library(foreign) with read.spss or via library Hmisc by (spss.get). But no matter which way I do import the data, user-defined missings from Spss are always lost. (it makes no difference if there are a single value, a range, or any combination of

  1   2   >