Re: [R] orthogonal/perpendicular distance from regression line

2009-02-21 Thread Mark Difford
Hi Jeff, You could do this with [1], but if you are hoping to learn something statistical by doing this you should probably reconsider, because the regression line residuals are minimized along the dependent variable axis, It should be said that there are valid forms of linear regression

Re: [R] [package-car:Anova] extracting residuals from Anova for Type II/III Repeated Measures ?

2009-02-21 Thread Tal Galili
Dear John. Thank you so much for the patience and time, you have just answered my question! I was so used to the mean ss term from the aov table, that I didn't stop to look and realize that the values you added in the Error SS and den Df columns in the summary tables are actually the residuals

Re: [R] 24 hour axis /time plots

2009-02-21 Thread Jim Lemon
somewhereondearth wrote: Hi, i have a data with values against time and date. for plotting against date i used axis.Date() option. but I need a 24hr time plot as well. i have extracted and plotted, but not being able to put the time ticks ( eg. 6am, 7 am etc) on the x-axis. Im new to R, any

[R] errors

2009-02-21 Thread Jonge de, HJM
Dear Sir/Madam, I was trying to upload my data in BRB array tools (R version 2.8.0). The following errors occured: Error: package/namespace load failed for 'affy' Error occured while executing the following R command: try(library(affy)). Could you please tell me what this means (and how

[R] variable/model selction (step/stepAIC) for biglm ?

2009-02-21 Thread Tal Galili
Hello dear R mailing list members. I have recently became curious of the possibility applying model selection algorithms (even as simple as AIC) to regressions of large datasets. I searched as best as I could, but couldn't find any reference or wrapper for using step or stepAIC to packages such

[R] [R-pkgs] new RcmdrPlugin.survival package

2009-02-21 Thread John Fox
Dear R users, I'd like to announce the RcmdrPlugin.survival package, which has just been made available on CRAN. The package provides an R Commander plug-in for the survival package, with dialogs for Cox models, parametric survival regression models, estimation of survival curves, and testing for

Re: [R] importing data to SQLite database with sqldf

2009-02-21 Thread Gabor Grothendieck
WARNING!!! Not a good idea to post code that deletes every object in your workspace! Other people may blindly copy and paste your code. I've added some verbiage to Example 12 on the home page: http://sqldf.googlecode.com that hopefully clarifies it a bit. On Sat, Feb 21, 2009 at 2:36 AM,

Re: [R] How to connect R and WinBUGS/OpenBUGS/LinBUGS in Linux in Feb. 2009

2009-02-21 Thread Paul Heinrich Dietrich
I just wanted to post in conclusion to this thread that I have had success running WinBUGS from R via R2WinBUGS, with the help of Gorjanc, Uwe, and Ben by email outside of this thread. I may have had a permissions problem, that was probably corrected by entering this in the terminal:

[R] difference between assignment syntax - vs =

2009-02-21 Thread Thomas Mang
Hi, Both operators - and = can be used to make an assignment. My question is: Is there a semantic difference between these two? Some time ago, I remember I have read that because of some reason, one should be given preference over the other - but I cannot remember the source, nor the

[R] Bold fonts and greek characters in lattice plots

2009-02-21 Thread Christos Argyropoulos
Hi, I am trying to convince lattice to use bold face in an expression containing Greek characters without any luck. Example code (without Greek characters, renders the expression in bold) library(lattice) data(Cars93,package==MASS)

Re: [R] Debian Power PC Compile R

2009-02-21 Thread Dirk Eddelbuettel
On 20 February 2009 at 22:40, stephen sefick wrote: | I have the libx11-dev package installed through the aptitude | application. This is on 5.0 power pc. What can I provide to help | with this? I don't know where to begin. Sorry, but what exactly is your question? Provide help with what? If

Re: [R] Python and R

2009-02-21 Thread Douglas Bates
Different methods of performing least squares calculations in R are discussed in @Article{Rnews:Bates:2004, author = {Douglas Bates}, title= {Least Squares Calculations in {R}}, journal = {R News}, year = 2004, volume = 4, number = 1, pages

Re: [R] difference between assignment syntax - vs =

2009-02-21 Thread Esmail Bonakdarian
Patrick Burns wrote: 'The R Inferno' page 78 is one source you can look at. Patrick Burns wow .. nice! .. thanks for posting this reference. Esmail __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] variable/model selction (step/stepAIC) for biglm ?

2009-02-21 Thread Charles C. Berry
On Sat, 21 Feb 2009, Tal Galili wrote: Hello dear R mailing list members. I have recently became curious of the possibility applying model selection algorithms (even as simple as AIC) to regressions of large datasets. Large in the sense of many observations, one assumes. But how large in

Re: [R] variable/model selction (step/stepAIC) for biglm ?

2009-02-21 Thread Tal Galili
Hi Chuck, Thanks for the guidelines. I was hoping someone in the group already experienced handling this type of task and have some handy code to share. I'll wait another day or two to see if someone responds with any more ideas or experience, and if nothing will come up, I might try my hand in

Re: [R] NOT an R problem: cannot install packages from distant repository

2009-02-21 Thread Renaud Lancelot
It turned out that the directory where I had installed contributed packages (as defined by the environment variable R_LIB) was damaged, though it was not revealed by the usual disk maintenance tools (chkdsk, etc). I deleted it and created a new one, and everything looks fine now. Renaud

Re: [R] Grouped bwplots?

2009-02-21 Thread hadley wickham
On Fri, Feb 20, 2009 at 3:57 PM, Fredrik Karlsson dargo...@gmail.com wrote: Dear list, I am sorry for asking you this, but I am trying to do again what I thought I have done before, although this time it does not work. So, given the data set: testdf -

[R] EM for Density Estimation

2009-02-21 Thread Lars Bishop
Hi, Which package would you recommend for an implementation of EM for density estimation (eg. mixture of Gaussian)? Thanks! Lars. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] Convert a list to matrix

2009-02-21 Thread Daren Tan
I would like to convert a list to matrix. This can be easily achieved via do.call. The only problem is each element of the list has different length, which causes the recycling of values. How can I have NA instead of recycled values ? m - list() m[[A]] - 1 m[[B]] - 2:3 do.call(rbind, m) [,1]

[R] How to reshape this data frame from long to wide ?

2009-02-21 Thread Daren Tan
I tried cast and melt in reshape package, but still can't convert this data frame m m [,1] [,2] [1,] A 1 [2,] A 2 [3,] B 3 to this form. m1 [,1] [,2] [1,] A B [2,] 1 3 [3,] 2 NA Please help. [[alternative HTML version deleted]]

Re: [R] Convert a list to matrix

2009-02-21 Thread jim holtman
This should do what you want: m - list() m[[A]] - 1 m[[B]] - 2:3 # get the maximum length maxLen - max(sapply(m, length)) # create a new list with elements padded out with NAs newM - lapply(m, function(.ele){ + c(.ele, rep(NA, maxLen))[1:maxLen] + }) do.call(rbind, newM) [,1] [,2] A

Re: [R] How to reshape this data frame from long to wide ?

2009-02-21 Thread Berwin A Turlach
G'day Darren, On Sun, 22 Feb 2009 11:23:27 +0800 Daren Tan darenta...@gmail.com wrote: I tried cast and melt in reshape package, but still can't convert this data frame m m [,1] [,2] [1,] A 1 [2,] A 2 [3,] B 3 from the output, this does not look like a data frame to me but like

[R] how to recover a list structure

2009-02-21 Thread mauede
I am experiencing some problems at working with lists at high level. In the following coef contains the original DWT coefficients organized in a list. Thorugh applying the following two commands: coef.abs - lapply(unlist(coef,recursive=FALSE,use.names =TRUE),abs) coef.abs.sorted -

Re: [R] How to reshape this data frame from long to wide ?

2009-02-21 Thread Gabor Grothendieck
Not completely clear what you want (it does not appear to be a conventional reshape) but try this: m - matrix(c(A, A, B, 1, 2, 3), 3, 2) structure(do.call(cbind, lapply(tapply(m[,2], m[,1], c), ts)), tsp = NULL, class = NULL) A B [1,] 1 3 [2,] 2 NA On Sat, Feb 21, 2009 at 10:23 PM,

Re: [R] how to recover a list structure

2009-02-21 Thread jim holtman
Here is one way that might work. x - list(a=runif(10), b=runif(30), c=runif(25)) # unlist and then construct a factor to put them back together x.u - unlist(x) x.f - unlist(mapply(rep, names(x), sapply(x, length))) # find the lowest 5 values and set to -1 x.u[order(x.u)[1:5]] - -1 # put back