Re: [R] changing number of axis

2009-09-30 Thread Deepayan Sarkar
On Wed, Sep 16, 2009 at 2:02 PM, Dan Kortschak dan.kortsc...@adelaide.edu.au wrote: Hi, I trying to produce a bar chart describing hits to specific bins by chromosome for a large data set (I am asking here because experimentation with options is precluded due to this - generating the figure

Re: [R] changing number of axis

2009-09-30 Thread Dan Kortschak
Hi Deepayan, Thanks for that, I had a think (a few hour too late) and came to the same conclusion. I had wanted to have vertical bars for each of the data points, I have gone to a straight xyplot and this shows other intersting information - maybe I want to be able to do both point and bar plots

Re: [R] Arial for pdf() on a Mac

2009-09-30 Thread Prof Brian Ripley
On Tue, 29 Sep 2009, Steve Bellan wrote: Hi, I'd like to use Arial for the font in the PDF's and TIFF's I produce in R As ever, it is helpful to explain why you want to do something. First, because there may be better solutions to the larger problem, and secondly because the answer may

Re: [R] JRI - get S4 objects from R and assign them again

2009-09-30 Thread Romain Francois
Hi, You should use this mailing list instead http://mailman.rz.uni-augsburg.de/mailman/listinfo/stats-rosuda-devel. ... where I just posted something that might help you. Romain On 09/28/2009 02:57 PM, ajoec...@gmx.de wrote: Hello, I am writing a Java frontend for a selfwritten R program

Re: [R] lattice: How to display no box but only a y-axis on the left + Thicker lines

2009-09-30 Thread Deepayan Sarkar
On Fri, Sep 18, 2009 at 6:06 AM, baptiste auguie baptiste.aug...@googlemail.com wrote: No box is easy, bwplot(y~x, data=data.frame(y=rnorm(10),x=sample(letters[1:3],10,repl=T)), par.settings=list(axis.line=list(col=NA))) but that seems to remove all axis lines and ticks as well. You may

Re: [R] changing number of axis

2009-09-30 Thread Deepayan Sarkar
On Tue, Sep 29, 2009 at 11:09 PM, Dan Kortschak dan.kortsc...@adelaide.edu.au wrote: Hi Deepayan, Thanks for that, I had a think (a few hour too late) and came to the same conclusion. I had wanted to have vertical bars for each of the data points, I have gone to a straight xyplot and this

Re: [R] Help with sub functions

2009-09-30 Thread Prof Brian Ripley
On Tue, 29 Sep 2009, edche...@gmail.com wrote: I have chances to work with both linux based and win based R codes. And as you all know in linux, the file directories use / and win uses \\. Is there a function like sub or gsub that could substitute those slashes automatically? See ?chartr,

Re: [R] reducing space between charts in lattice graphics

2009-09-30 Thread Deepayan Sarkar
On Sat, Sep 19, 2009 at 9:42 AM, Larry White ljw1...@gmail.com wrote: Hi, I'm trying to create a lattice plot with three xyplots in one vertical column. I would like to reduce the vertical space between the charts.  My code is below. There seems to be a between parameter for lattice.options,

Re: [R] Probability of data values form DENSITY function

2009-09-30 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Lina, check ?density (and do so carefully). R uses a kernel estimate, by default Gaussian if I remember correctly. Values in a certain grid can be found from the code I sent earlier. I didn't check, but these are most likely just linearly interpolated by plot.density, and as the grid is

Re: [R] Lattice: combine the same strip?

2009-09-30 Thread Deepayan Sarkar
On Sat, Sep 19, 2009 at 3:36 PM, di jianing jianin...@gmail.com wrote: Hello R helpers, I am producing a figure with dual strips, i.e., x~y | S1 + S2, where S1 and S2 are two strips. For example, in figure 2.1 at http://lmdvr.r-forge.r-project.org/figures/figures.html. In this case, I would

[R] fportfolio - help

2009-09-30 Thread Lara Shocron
Dear All, I have a .csv worksheet containing the following information - column A: dates (from 5/25/1999 to 5/26/2009, in chronological order) (in total there are 37 547 lines) - columns B to AH: numbers from approx -50 000 000 to 50 000 000, each representing a daily PL. Each column represents an

Re: [R] preformatted and '#' in manual pages

2009-09-30 Thread Gábor Csárdi
On Tue, Sep 29, 2009 at 6:47 PM, Duncan Murdoch murd...@stats.uwo.ca wrote: On 9/29/2009 11:57 AM, Gábor Csárdi wrote: On Tue, Sep 29, 2009 at 5:36 PM, Duncan Murdoch murd...@stats.uwo.ca wrote: Gábor Csárdi wrote: Dear All, I have the following in a .Rd file: ...     human readable

[R] bwplot scales in alphabetical order

2009-09-30 Thread Tim Clark
Dear List, I know this has been covered before, but I don't seem to be able to get it right. I am constructing a boxplot in lattice and can't get the scales in the correct alphebetical order. I have already read that this is due to the way factors are treated, and I have to redefine the

Re: [R] lattice: How to display no box but only a y-axis on the left + Thicker lines

2009-09-30 Thread lith
Yes. You can get back the tick marks with scaless$col: Thanks for the hint. May I kindly ask what would be the easiest way to draw a line on the left side? Thanks, Tom __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] Condition to factor (easy to remember)

2009-09-30 Thread Dieter Menne
Dear List, creating factors in a given non-default orders is notoriously difficult to explain in a course. Students love the ifelse construct given below most, but I remember some comment from Martin Mächler (?) that ifelse should be banned from courses. Any better idea? Not necessarily short,

Re: [R] Is there a R function that can do similar things like 'pdist' in Matlab?

2009-09-30 Thread Yihui Xie
That's not correlation. It's distance instead. See ?dist Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA On Tue, Sep 29, 2009 at 8:22 PM, RT Ye rty...@gmail.com wrote: Hi,

Re: [R] lattice: How to display no box but only a y-axis on the left + Thicker lines

2009-09-30 Thread baptiste auguie
2009/9/30 lith minil...@gmail.com: Yes. You can get back the tick marks with scaless$col: Thanks for the hint. May I kindly ask what would be the easiest way to draw a line on the left side? Try this, mpanel = function(...) { grid.segments(0,0,0,1) ; panel.bwplot(...) } bwplot(y~x,

Re: [R] dichromat, regexp, and grid objects

2009-09-30 Thread baptiste auguie
Replying to myself here, Hadley pointed out this website on the ggplot2 mailing list, http://colororacle.cartography.ch/ And this seems like a more straight-forward solution to my query (albeit not using R). It sort of makes sense to momentarily alter the computer display rather than parse the

[R] Compress (gzip) a pdf device

2009-09-30 Thread Daniele Amberti
I have not found an easy way to compress a file on filesystem. Especially I'd like to compress a pdf from pdf() function/device. Is it possible to compress It on the flight? I'd like to do something like: pdf(gzipconnection()) dev.off() If It is not possible, how can I create a gzip with the

Re: [R] Compress (gzip) a pdf device

2009-09-30 Thread Rainer M Krug
2009/9/30 Daniele Amberti daniele.ambe...@ors.it I have not found an easy way to compress a file on filesystem. Especially I'd like to compress a pdf from pdf() function/device. Is it possible to compress It on the flight? I'd like to do something like: pdf(gzipconnection()) dev.off() I

[R] fitting logistic model with constant harvesting

2009-09-30 Thread Rainer M Krug
Hi I am fitting simulated data to a logistic model usin SSlogis as follow: nls( cove ~ SSlogis(year, Asym, xmid, scal), data = dat, trace = TRUE, model = TRUE, ... ) This works niocely, but now I have a situation where I have constant harvesting, i.e. where p is the

[R] Odp: Regression line w/ residuals - tuning the plot

2009-09-30 Thread Petr PIKAL
Hi As you did not provide any piece of code I done some myself x-1:20 y-5*x+3+rnorm(20) plot(x,y) fit-lm(y~x) par(mfrow=c(2,1)) plot(x,y) abline(fit) plot(x, resid(fit)) I do not see any problem with this. If you want to set up margins use par(mar=) par(mar=c(0,4,4,1)) plot(x,y,

[R] Odp: how to draw a slope (using abline) with a specific starting point?

2009-09-30 Thread Petr PIKAL
Hi it is not clear what you want? If you want a line which does not stretch entire plot use segments. AFAIK abline does not have any argument restricting its length. Regards Petr r-help-boun...@r-project.org napsal dne 29.09.2009 20:04:05: plot(y~x, type='p', col=3, xlim=c(50,1000),

Re: [R] dichromat, regexp, and grid objects

2009-09-30 Thread Ken Knoblauch
baptiste auguie baptiste.auguie at googlemail.com writes: Replying to myself here, Hadley pointed out this website on the ggplot2 mailing list, http://colororacle.cartography.ch/ And this seems like a more straight-forward solution to my query (albeit not using R). It sort of makes sense

[R] R: How can I avoid a for-loop through sapply or lapply ?

2009-09-30 Thread mauede
Thank you very much. It works fine. Maura -Messaggio originale- Da: Steve Lianoglou [mailto:mailinglist.honey...@gmail.com] Inviato: mar 29/09/2009 18.08 A: mau...@alice.it Cc: r-h...@stat.math.ethz.ch Oggetto: Re: [R] How can I avoid a for-loop through sapply or lapply ? Hi, On Sep

Re: [R] PCA or CA

2009-09-30 Thread Bernardo Rangel Tura
On Tue, 2009-09-29 at 17:02 +, Paul Dennis wrote: Dear all I have a data set for which PCA based between group analysis (BGA) gives significant results but CA-BGA does not. I am having difficulty finding a reliable method for deciding which ordination technique is most appropriate.

[R] programming to calculate variance

2009-09-30 Thread marlene marchena
Dear R-user Suppose I have the following data y=c(2,1,5,8,11,3,1,7,50,21,33,7,60) x=data.frame(y) for(i in 4:nrow(x)) x[i,] =var(x[i-3:i-1,]) I'm trying to get a new variable with the variance of the 3 previous values (just an example) and with NA in the three first positions. I know that my

[R] Odp: programming to calculate variance

2009-09-30 Thread Petr PIKAL
Hi Try function rollapply from zoo.It can compute rolling results of functions. Make your y a zoo object and use rollapply(object, 3, var) Regards Petr r-help-boun...@r-project.org napsal dne 30.09.2009 12:37:36: Dear R-user Suppose I have the following data

[R] Rserve with java commands and examples

2009-09-30 Thread pragathichi
I am currently working in Rserve. I have trouble understanding the eval commands and when to use it? How to write java script for R commands? Is there any tutorial or documentation. Thanks in advance for your help. -- View this message in context:

[R] How do I do simple string concatenation in R?

2009-09-30 Thread Dr. Arie Ben David
Dear R gurus How do I do simple string concatenation in R? For example: A = klm B = jjj How can I assign a value to C such that C == klmjjj is True? Thank you Arie [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] help

2009-09-30 Thread Carolina Soto Navarro
Estoy haciendo un GLMM usando como variable aleatoria y una variable cualitativa con dos categorias. Cuando intento ajustar el modelo me devuelve el mensaje In mer_finalize(ans) : false convergence (8) a que es debido esto? y como puedo solucionarlo? Muchas gracias

Re: [R] programming to calculate variance

2009-09-30 Thread Matthias Gondan
I think it should be var(y[i-3:i-1,]) instead of var(x[i-3:i-1,]) otherwise the values of the vector are overwritten Best wishes, Matthias marlene marchena schrieb: Dear R-user Suppose I have the following data y=c(2,1,5,8,11,3,1,7,50,21,33,7,60) x=data.frame(y) for(i in

[R] Change directory to implement same programes

2009-09-30 Thread Tammy Ma
HI, R-Users, I have one problem: I have written the the programs which process all file in one directory: for example: setwd(C:/Documents and Settings/lma/My Documents/Vappu-saved/Log) as the start. .. But I have many folders like Vappu-saved and there are a lot of files in each

Re: [R] How do I do simple string concatenation in R?

2009-09-30 Thread Tobias Verbeke
Tobias Verbeke wrote: Hi Ari, How do I do simple string concatenation in R? For example: A = klm B = jjj How can I assign a value to C such that C == klmjjj is True? paste(A, B, collapse = ) Oops. paste(A, B, sep = ) Best, Tobias __

Re: [R] How do I do simple string concatenation in R?

2009-09-30 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
?paste -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Dr. Arie Ben David Sent: Mittwoch, 30. September 2009 10:22 To: r-help@r-project.org Subject: [R] How do I do simple string concatenation in R? Dear R gurus How do I

Re: [R] How do I do simple string concatenation in R?

2009-09-30 Thread Tobias Verbeke
Hi Ari, How do I do simple string concatenation in R? For example: A = klm B = jjj How can I assign a value to C such that C == klmjjj is True? paste(A, B, collapse = ) See ?paste HTH, Tobias __ R-help@r-project.org mailing list

Re: [R] Evaluating expresssions as parameter values

2009-09-30 Thread Deepayan Sarkar
On Tue, Sep 22, 2009 at 12:03 PM, Erich Neuwirth erich.neuwi...@univie.ac.at wrote: I need to play games with an expression similar to the following one: print(xyplot(DepVar ~ Group|Covar, groups=Othergroup,        data=mydf, pch = 18 ,main=Testcase,auto.key = TRUE)) The problem is that  

Re: [R] How do I do simple string concatenation in R?

2009-09-30 Thread Robert Kinley
see ?paste A -klm B - jjj C-paste(A,B,sep='') if(C==klmjjj) print(C) [1] klmjjj cheers Bob Dr. Arie Ben David hol_aben...@bezeqint.net Sent by: r-help-boun...@r-project.org 30/09/2009 09:22 To r-help@r-project.org cc Subject [R] How do I do simple string

Re: [R] Change directory to implement same programes

2009-09-30 Thread Tammy Ma
How do I source a bunch of files in different directories in R? From: metal_lical...@live.com To: r-help@r-project.org Date: Wed, 30 Sep 2009 13:45:34 +0300 Subject: [R] Change directory to implement same programes HI, R-Users, I have one problem: I have written the the programs

Re: [R] programming to calculate variance

2009-09-30 Thread marlene marchena
Hi Petr, Thanks for your suggestion. It woks, but now I have other problem the positions of the values changed. I need the NA values in the three first positions. y=c(2,1,5,8,11,3,1,7,50,21,33,7,60) x=as.zoo(y) x 1 2 3 4 5 6 7 8 9 10 11 12 13 2 1 5 8 11 3 1 7 50 21 33 7 60

Re: [R] Change directory to implement same programes

2009-09-30 Thread Henrique Dallazuanna
Perhaps Sys.glob can help you. See ?Sys.glob On Wed, Sep 30, 2009 at 8:19 AM, Tammy Ma metal_lical...@live.com wrote: How do I source a bunch of files in different directories in R? From: metal_lical...@live.com To: r-help@r-project.org Date: Wed, 30 Sep 2009 13:45:34 +0300 Subject: [R]

Re: [R] multiple lattice, xyplot levelplot on same page - solved

2009-09-30 Thread Ky Mathews
Felix, Thanks for your suggestions below and all the behind-the-scenes email help. For those who come after me on this issue. Option (1) worked best for my purpose as it retained the levelplot() legend, and meant the y-axis were exactly aligned. The trick was the following advice: If you are

[R] How to change e-mail address

2009-09-30 Thread Debabrata Midya
Hi! Thanks in advance. I know this is not the right place to send this message. But I have tried to do so by sending e-mail to the addresses r-help-requ...@r-project.org and r-announce-requ...@stat.math.ethz.ch. But no success. I am getting messages such as Your message to R-help awaits

Re: [R] programming to calculate variance

2009-09-30 Thread Petr PIKAL
marlene marchena marchenamarl...@gmail.com napsal dne 30.09.2009 13:28:16: Hi Petr, Thanks for your suggestion. It woks, but now I have other problem the positions of the values changed. I need the NA values in the three first positions. y=c(2,1,5,8,11,3,1,7,50,21,33,7,60)

[R] AsciiDoc and R

2009-09-30 Thread johannes rara
I would like to learn AsciiDoc. Is there any good examples how to use AsciiDoc with R? I know that there is packages called ascii to do this, but it would be nice to see some examples how AsciiDoc works with R. Is there an AsciiDoc distribution for Max OS X? -Johannes

Re: [R] programming to calculate variance

2009-09-30 Thread Eik Vettorazzi
Hi Marlene, x=data.frame(y,vr=NA) for(i in 4:nrow(x)) x[i,vr] =var(y[(i-3):(i-1)]) will do the trick, solving both problems with overwriting subsequent x-values and obeying the precedence of R operators. For the latter, see ?Syntax and compare i-5 i-3:i-1 (i-3):(i-1) hth. marlene marchena

Re: [R] AsciiDoc and R

2009-09-30 Thread David Hajage
Hello, There is a webpage showing examples of asciidoc and R here : http://eusebe.github.com/ascii/ The package works with Sweave() function : Sweave(yourfile.Rnw, driver = RweaveAsciidoc) where youfile.Rnw is a text file with asciidoc markup and embedded R code. About asciidoc markup, the

Re: [R] programming to calculate variance

2009-09-30 Thread marlene marchena
Thanks a lot, finally It works! I was wondering why my for() did not work. Now I now the difference between i-3 and (i-3) Thanks again for all your help. Marlene. x y vr 1 2 NA 2 1 NA 3 5 NA 4 8 4.33 5 11 12.33 6 3 9.00 7 1

Re: [R] Condition to factor (easy to remember)

2009-09-30 Thread David Winsemius
On Sep 30, 2009, at 3:43 AM, Dieter Menne wrote: Dear List, creating factors in a given non-default orders is notoriously difficult to explain in a course. Students love the ifelse construct given below most, but I remember some comment from Martin Mächler (?) that ifelse should be

Re: [R] R package for visualizing/analyzing accelerometry data?

2009-09-30 Thread Duncan Murdoch
On 9/29/2009 10:39 PM, Jen Maresh wrote: Hello All - Any recommendations or suggestions for neat ways to visualize data taken from a 3-axis accelerometer? My study species is aquatic, so I would be interested in movement in the 3 dimensions in addition to being able to incorporate the time

Re: [R] Condition to factor (easy to remember)

2009-09-30 Thread Dieter Menne
David Winsemius wrote: # Typical C-Programmer style factor(levs[as.integer(data 10)+1], levels=levs) In your code the as.integer function is superfluous Oops... done too much c# lately, getting invalid cast challenged. Dieter -- View this message in context:

Re: [R] How to compile R with command completion?

2009-09-30 Thread Peng Yu
On Tue, Sep 29, 2009 at 10:39 PM, Martin Morgan mtmor...@fhcrc.org wrote: Peng Yu wrote: On Tue, Sep 29, 2009 at 3:47 PM, Tobias Verbeke tobias.verb...@gmail.com wrote: Peng Yu wrote: I want to compile R with command completion. But I don't find such an option in configure. Can somebody let

[R] how to automatically set plot limits and plot scale?

2009-09-30 Thread amorphia
Hi all, I have two related questions about plot limits and plot sizes. R can automatically fit plot limits to your data if you plot the data in the first plot command. But if you add to the plot later (e.g. by drawing lines, as I must do), the original limits are not recalculated, even if you

Re: [R] How to change e-mail address

2009-09-30 Thread David Winsemius
On Sep 30, 2009, at 1:09 AM, Debabrata Midya wrote: Hi! Thanks in advance. I know this is not the right place to send this message. But I have tried to do so by sending e-mail to the addresses r-help-requ...@r-project.org and r-announce-requ...@stat.math.ethz.ch. But no success. I am

Re: [R] bwplot scales in alphabetical order

2009-09-30 Thread Peter Ehlers
Tim, Add the argument as.table=TRUE to your call: bwplot(y~x|id, horizontal=FALSE, as.table=TRUE) Peter Ehlers Tim Clark wrote: Dear List, I know this has been covered before, but I don't seem to be able to get it right. I am constructing a boxplot in lattice and can't get the scales in

Re: [R] AsciiDoc and R

2009-09-30 Thread David Winsemius
On Sep 30, 2009, at 7:57 AM, johannes rara wrote: I would like to learn AsciiDoc. Is there any good examples how to use AsciiDoc with R? I know that there is packages called ascii to do this, but it would be nice to see some examples how AsciiDoc works with R. Is there an AsciiDoc distribution

[R] Overview of error and warning messages for teaching + examples

2009-09-30 Thread joris meys
Dear all, The background: as I didn't find a manual specifically directed towards debugging R code on a novice and intermediate level, I decided to write a student manual myself. I have some basic examples of errors (the classical interpunction and writing mistakes), but have the feeling that I

[R] Read header csv file

2009-09-30 Thread Lucas Sevilla García
Hi R community, First of all, I want to thank everybody to share their time solving R questions, You are great. Ok, for my questions, I've been looking for a solutions by myself, in forums but I'm just a little bit desesperate so I hope somebody can help me. I have built a code to read files

Re: [R] How to compile R with command completion?

2009-09-30 Thread Martin Morgan
Peng Yu wrote: On Tue, Sep 29, 2009 at 10:39 PM, Martin Morgan mtmor...@fhcrc.org wrote: Peng Yu wrote: On Tue, Sep 29, 2009 at 3:47 PM, Tobias Verbeke tobias.verb...@gmail.com wrote: Peng Yu wrote: I want to compile R with command completion. But I don't find such an option in configure.

[R] Optim(...) estimate of stDev far too low

2009-09-30 Thread Luis Ridao Cruz
R-help, I'm just trying to find the ML (maximum likelihood) estimates of the mean and standard deviation of a set of observations: xx=c(2.5,3.5,4,6,6.5,7.5) fn-function(params,x=xx) { media-params[1] st -params[2] pdf=-sum(dnorm(log(xx),log(media),st,TRUE)) return(pdf) }

[R] rcs fits in design package

2009-09-30 Thread Hayes, Rachel M
Hi all, I have a vector of proportions (post_op_prw) such that summary(amb$post_op_prw) Min. 1st Qu. MedianMean 3rd Qu.Max.NA's 0. 0. 0. 0.3985 0.9134 0.9962 1. summary(cut2(amb$post_op_prw,0.0001)) [0.,0.0001) [0.0001,0.9962]

[R] R/PL : cannot build PL/R

2009-09-30 Thread Bunny, lautloscrew.com
Dear all, i am trying to get PL / R running on Mac OS X. PostgreSQL is already running and connects just smoothly to R via DBI / RPostgreSQL . Despite finding a couple of posts of people with the same problem (i.e. error message) i could not get it done for me. I use Mac OS 10.5.7 and

[R] How to calculate KMO?

2009-09-30 Thread Moumita Das
Hi All, How do i calculate KMO for a dataset? *Dataset:-* m1 m2 m3 m4 m5 m6 m7 m8 1 2 20 20 2 1 4 14 12 2 9 16 3 5 2 5 5 15 3 18 18 18 13 17 9 2 4 4 7 7 2 12 2 11 11 11 5 7 8 5 19 5 2 20 18 6 7 4 7 4 7 9 3 3 7

[R] k-modes (Huang) in package klaR?

2009-09-30 Thread Kim Vanselow
Dear R-Users and Developers, I want to calculate something like k-means clustering, but with ordinal data (Braun-Blanquet) to combine this classification technique with a NMDS-Ordination. I found an algorithm especially developed for categorical data: k-modes (Huang 1998). Is there a function

Re: [R] Change directory to implement same programes

2009-09-30 Thread Paul Hiemstra
Hi, You can use list.files() of Sys.glob to get a listing of all the files in a certain directory, e.g. to get all .R files and source them: for(f in Sys.glob(C:/Documents and Settings/lma/*.R)) source(f) cheers, Paul Tammy Ma wrote: How do I source a bunch of files in different

Re: [R] R/PL : cannot build PL/R

2009-09-30 Thread David Winsemius
Wrong mailing list. Suggest reposting on R-SIG-Mac but only after re- reading the Posting Guide. On Sep 30, 2009, at 10:03 AM, Bunny, lautloscrew.com wrote: Dear all, i am trying to get PL / R running on Mac OS X. PostgreSQL is already running and connects just smoothly to R via DBI /

Re: [R] Condition to factor (easy to remember)

2009-09-30 Thread Gabor Grothendieck
1. A common way of doing this is cut: cut(data, c(-Inf, 10, Inf), lab = levs, right = TRUE) [1] Pre Pre Pre Post Post Levels: Pre Post We don't actually need right=TRUE as its the default but if you omit it then it can be hard to remember whether the right end of intervals are included

Re: [R] k-modes (Huang) in package klaR?

2009-09-30 Thread Uwe Ligges
Kim Vanselow wrote: Dear R-Users and Developers, I want to calculate something like k-means clustering, but with ordinal data (Braun-Blanquet) to combine this classification technique with a NMDS-Ordination. I found an algorithm especially developed for categorical data: k-modes (Huang

Re: [R] Optim(...) estimate of stDev far too low

2009-09-30 Thread Peter Ehlers
Luis, I don't think that you want log() in fn. Try it with pdf=-sum(dnorm(x, media, st, TRUE)) (and note the x, rather than xx). -Peter Ehlers Luis Ridao Cruz wrote: R-help, I'm just trying to find the ML (maximum likelihood) estimates of the mean and standard deviation of a set of

[R] Re cursive regression

2009-09-30 Thread manta
Hi there, I'm in desperate need to figure out how to solve this issue. I need to estimate a recursive model for a time series data of asset returns. The dependent variable is the asset return and then I have a set of k variables, a lagged value of the dependent variable (plus an intercept) as

[R] Managing random number generating, while using Condor parallel computing

2009-09-30 Thread Tal Galili
Hello all, Recently I started playing with running R scripts on the Condor system in my institute. (For more on this, have a look at: Running Long R Jobs with Condor DAG by Xianhong Xie link: http://cran.r-project.org/doc/Rnews/Rnews_2005-2.pdf ) Might someone advice me about the following

Re: [R] k-modes (Huang) in package klaR?

2009-09-30 Thread Uwe Ligges
Uwe Ligges wrote: Kim Vanselow wrote: Dear R-Users and Developers, I want to calculate something like k-means clustering, but with ordinal data (Braun-Blanquet) to combine this classification technique with a NMDS-Ordination. I found an algorithm especially developed for categorical data:

Re: [R] AsciiDoc and R

2009-09-30 Thread Steve Lianoglou
Hi, On Sep 30, 2009, at 7:57 AM, johannes rara wrote: I would like to learn AsciiDoc. Is there any good examples how to use AsciiDoc with R? I know that there is packages called ascii to do this, but it would be nice to see some examples how AsciiDoc works with R. Is there an AsciiDoc

Re: [R] Read header csv file

2009-09-30 Thread Don MacQueen
Lucas, Although I can't answer all your questions, I can give some suggestions. I will assume you know how many years of data you have. Suppose it is 2004 through 2009. In each input file, the columns must have names, so I will assume there is a column named Month. I am not sure if you want

[R] Openning multiple (writing) connections to a single file - possible ?

2009-09-30 Thread Tal Galili
Hello members of the R-help group. I am trying to run multiple occurences of R (through the distributed computing of Condor), and have all of them write their output into one source. It is similar (I believe), to running R several time on the same machine, and running on each instance of R the

Re: [R] Overview of error and warning messages for teaching + examples

2009-09-30 Thread Tal Galili
Hi Joris. This is a wonderlful idea. I never came across such a document, but assembaling it sounds very good. What do you think about organizing the work of collecting (by R members and maybe your students) the error massages and code into some wiki page? (maybe on the R wiki) It could be a

Re: [R] Managing random number generating, while using Condor parallel computing

2009-09-30 Thread Dirk Eddelbuettel
On Wed, Sep 30, 2009 at 05:02:15PM +0200, Tal Galili wrote: Might someone advice me about the following question: How should I handle the RNG (random number generation) in the running of parallel instances of R on different machines. http://lmgtfy.com/?q=site%3Ar-project.org+parallel+RNG --

Re: [R] Overview of error and warning messages for teaching + examples

2009-09-30 Thread joris meys
Hi Tal, The Wiki is a great idea! Alas I'm not that familiar with setting up Wikis. Any idea how to practically approach this? I'm currently a bit in a hurry, as I have to give the introduction next monday. I'll have a first, basic introduction ready by the end of the week, but I'll continue to

Re: [R] Managing random number generating, while using Condor parallel computing

2009-09-30 Thread Tal Galili
Thanks/Sorry Dirk. After some more searches I found: http://cran.r-project.org/web/packages/rsprng/index.html With a nice explenation about it here: http://wiki.r-project.org/rwiki/doku.php?id=packages:cran:rsprng Thanks/Sorry again, Tal -- My

Re: [R] Scaling data

2009-09-30 Thread Dry, Jonathan R
Hello all I am manipulating some data and wish to expand/unmerge (i.e. do the opposite of aggregate) rows in a data matrix based on the values in a particular column and a seperator, e.g. Col1Col2 n1;n2 6 ...separating by ; becomes Col1Col2 num16 num26 Any ideas? Also

Re: [R] Macro variable substitution

2009-09-30 Thread Greg Snow
There was a rather in depth article on doing macros in R in the R newsletter a couple of years ago. There is also the defmacro function in the gtools package based on that article that can make the job easier for many cases. See fortune(236) before taking the assign route. -- Gregory (Greg)

[R] extract clusters from a hclusrt object without cutree

2009-09-30 Thread Larson, TR
Hello, I am generating an hclust() object and want to extract a subset of clusters WITHOUT using cutree(). I see this somehow involves using the $merge matrix to associate $labels into their appropriate clusters where clusters are split below a given $height threshold. Can anyone suggest

[R] error in function AMER

2009-09-30 Thread Marilia Gmail
Dear all, I am trying to reproduce the example in the vignette Using lme4 to fit Generalized Additive Mixed Models with my dataset. But... exemplo - read.table(exemplo.dat,header=T) mod - amer(pasvig ~ -1 + harvf + tp(dias,by=harvf) + (1 | pac), data=exemplo) Erro em if (from == to)

Re: [R] Scaling data

2009-09-30 Thread Henrique Dallazuanna
Try this: as.data.frame(sapply(sapply(DF, as.character, simplify = FALSE), strsplit, ;)) On Wed, Sep 30, 2009 at 1:18 PM, Dry, Jonathan R jonathan@astrazeneca.com wrote: Hello all I am manipulating some data and wish to expand/unmerge (i.e. do the opposite of aggregate) rows in a data

Re: [R] bwplot scales in alphabetical order

2009-09-30 Thread Tim Clark
Peter, Thanks, that did it! Tim Tim Clark Department of Zoology University of Hawaii --- On Wed, 9/30/09, Peter Ehlers ehl...@ucalgary.ca wrote: From: Peter Ehlers ehl...@ucalgary.ca Subject: Re: [R] bwplot scales in alphabetical order To: Tim Clark mudiver1...@yahoo.com Cc:

Re: [R] how to visualize gini coefficient in each node in RF?

2009-09-30 Thread Liaw, Andy
You can try to hunt for it in the findbestsplit Fortran subroutine. It uses some thing that's equivalent (but easier to compute), not exactly identical. Breiman uses whatever computational shortcuts he could find in his code. Best, Andy From:

[R] start a script directly under windows

2009-09-30 Thread Martin Batholdy
hi, I try to configure my system so when I click on an .R script, the script is executed in the R GUI. I tried to open .R files with different .exe files that I found in the bin-folder of the R folder (R.exe, Rcmd.exe, Rgui.exe ...). But I always get the message; ARGUMENT 'c:\...\...'

[R] change axis labels in persp

2009-09-30 Thread Bond, Stephen
I need to change one of the axis produced by persp by giving it labels for the tickmarks. The dimension has months (a factor) so the default decimals don't look good. The graph will finally become a pdf or emf file to be embedded in a document, so persp3d will not work, I think. Thank you

[R] Rounding error in seq(...)

2009-09-30 Thread Michael Knudsen
Hi, Today I was flabbergasted to see something that looks like a rounding error in the very basic seq function in R. a = seq(0.1,0.9,by=0.1) a [1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 a[1] == 0.1 [1] TRUE a[2] == 0.2 [1] TRUE a[3] == 0.3 [1] FALSE It turns out that the alternative a =

Re: [R] Rounding error in seq(...)

2009-09-30 Thread Duncan Murdoch
On 9/30/2009 2:40 PM, Michael Knudsen wrote: Hi, Today I was flabbergasted to see something that looks like a rounding error in the very basic seq function in R. a = seq(0.1,0.9,by=0.1) a [1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 a[1] == 0.1 [1] TRUE a[2] == 0.2 [1] TRUE a[3] == 0.3 [1]

Re: [R] Rounding error in seq(...)

2009-09-30 Thread Michael Knudsen
On Wed, Sep 30, 2009 at 8:44 PM, Duncan Murdoch murd...@stats.uwo.ca wrote: Why?  You asked for an increment of 1 in the second case (which is exactly represented in R), then divided by 10, so you'll get the same as 0.3 gives you.  In the seq() case you asked for an increment of a number close

Re: [R] Rounding error in seq(...)

2009-09-30 Thread Bert Gunter
Inline Below. Bert Gunter Nonclinical Biostatistics 467-7374 http://devo.gene.com/groups/devo/depts/ncb/home.shtml -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Michael Knudsen Sent: Wednesday, September 30, 2009 11:50 AM

Re: [R] Rounding error in seq(...)

2009-09-30 Thread Duncan Murdoch
On 9/30/2009 2:50 PM, Michael Knudsen wrote: On Wed, Sep 30, 2009 at 8:44 PM, Duncan Murdoch murd...@stats.uwo.ca wrote: Why? You asked for an increment of 1 in the second case (which is exactly represented in R), then divided by 10, so you'll get the same as 0.3 gives you. In the seq() case

Re: [R] Rounding error in seq(...)

2009-09-30 Thread Martin Batholdy
hum, can you explain that a little more detailed? Perhaps I miss the background knowledge - but it seems just absurd to me. 0.1+0.1+0.1 is 0.3 - there is no rounding involved, is there? why is x - 0.1 + 0.1 +0.1 not equal to y - 0.3 ? Am 30.09.2009 um 21:04 schrieb Duncan Murdoch: On

Re: [R] Rounding error in seq(...)

2009-09-30 Thread Michael Knudsen
On Wed, Sep 30, 2009 at 8:40 PM, Michael Knudsen micknud...@gmail.com wrote: a = seq(0.1,0.9,by=0.1) a [1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 a[1] == 0.1 [1] TRUE a[2] == 0.2 [1] TRUE a[3] == 0.3 [1] FALSE A friend of mine just pointed out a possible solution: a=seq(0.1,0.9,by=0.1)

Re: [R] Rounding error in seq(...)

2009-09-30 Thread Duncan Murdoch
On 9/30/2009 3:17 PM, Martin Batholdy wrote: hum, can you explain that a little more detailed? Perhaps I miss the background knowledge - but it seems just absurd to me. 0.1+0.1+0.1 is 0.3 - there is no rounding involved, is there? R uses a binary floating point storage format, which is

Re: [R] Rounding error in seq(...)

2009-09-30 Thread Rolf Turner
On 1/10/2009, at 8:17 AM, Martin Batholdy wrote: hum, can you explain that a little more detailed? Perhaps I miss the background knowledge - but it seems just absurd to me. 0.1+0.1+0.1 is 0.3 - there is no rounding involved, is there? why is x - 0.1 + 0.1 +0.1 not equal to y - 0.3 ? You

Re: [R] Rounding error in seq(...)

2009-09-30 Thread Peter Dalgaard
Martin Batholdy wrote: hum, can you explain that a little more detailed? Perhaps I miss the background knowledge - but it seems just absurd to me. 0.1+0.1+0.1 is 0.3 - there is no rounding involved, is there? why is x - 0.1 + 0.1 +0.1 not equal to y - 0.3 Remember that this is in BINARY

Re: [R] Condition to factor (easy to remember)

2009-09-30 Thread Ista Zahn
An extremely verbose, but (in my view) easy to understand approach is: data.f - data; data.f[which(data = 10)] - levs[1]; data.f[which(data 10)] - levs[2]; data.f - factor(data.f) -Ista On Wed, Sep 30, 2009 at 8:31 AM, Dieter Menne dieter.me...@menne-biomed.de wrote: David Winsemius

Re: [R] Rounding error in seq(...)

2009-09-30 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Martin Batholdy Sent: Wednesday, September 30, 2009 12:18 PM To: Duncan Murdoch Cc: r help Subject: Re: [R] Rounding error in seq(...) hum, can you explain that a little

  1   2   >