[R] [R-pkgs] ggplot2: version 0.8.6

2010-02-19 Thread Hadley Wickham
ggplot2 ggplot2 is a plotting system for R, based on the grammar of graphics, which tries to take the good parts of base and lattice graphics and avoid bad parts. It takes care of many of the fiddly details that make plotting a hassle (l

Re: [R] Rscript question

2010-02-19 Thread Jinfeng Liu
OS gmail.com> writes: > Hi, > I have some code I run interactively through the R interpreter and it works > fine. I then run it as a script with Rscript and I get an error. The error > is coming when Rscript builds a model matrix. > > Output from Rscript with the error: > running > '/usr/lib/R/

Re: [R] r help date format changes with c() vs. rbind()

2010-02-19 Thread jim holtman
I have used the following function to convert to POSIXct from a numeric without any problems: > unix2POSIXct <- function (time) structure(time, class = c("POSIXt", "POSIXct")) > > unix2POSIXct(946764000) [1] "2000-01-01 17:00:00 EST" > On Fri, Feb 19, 2010 at 4:07 PM, Tim Clark wrote: > Dear

Re: [R] r help date format changes with c() vs. rbind()

2010-02-19 Thread Tim Clark
Glad to know it isn't just me! I couldn't use Phil's data.frame method since my real problem went from a POSIXct object to a large matrix where I used rbind and then back to POSIXct. Jim's function worked great on converting the final product back to the proper date. Thanks! Tim Tim Clark

[R] Error Bars in lattice- barcharts

2010-02-19 Thread Sam Albers
Hello, I am attempting to write a script that adds error bars to a barchart. I basing my attempt heavily on the following thread: http://tolstoy.newcastle.edu.au/R/e2/help/06/10/2791.html I can't seem to get around the problem that was discussed in the thread. The following example should illust

[R] Add lines (contours) to lattice wireframe plot

2010-02-19 Thread Andrej
Hi, I draw a surface corresponding to bivariate density of independent variables (rho=0) using persp(). Then I add a contour line (i.e., circle in my case) at a particular density. Below is a minimal example of what I have so far. # Bivariate density dnorm2d <- function(x, y, rho = 0) { xoy = (

[R] Problem with installing "genetics" package

2010-02-19 Thread myrmail
I have tried to install the "genetics" package and am getting and error. The log is below. For information, I am using R 2.10.1 on the Windows XP operating system. The mirror site I'm using is Michigan Technological University. Your help in this matter will be greatly appreciated. Murray M Coope

[R] LaTeX/R/Sweave Problems

2010-02-19 Thread tudor
Dear All: For a few days now I have struggled with recreating a stable LaTeX/R/Sweave environment on a new Windows XP SP3 machine. Unfortunately it seems that I ran out of good ideas and I would like your expert opinion on how I should approach this task and be successful. In essence, I install

Re: [R] retrieve from function

2010-02-19 Thread S Ellison
Try f <- function(nbr){ y<-rnorm(nbr) y1 <- mean(y) plot(y) invisible( y1) } That will return y1 invisibly, so f(100) plots but returns nothing visible but w<-f(100) plots and places the return value in w >>> Dennis Murphy 02/19/10 9:33 PM >>> Hi: Perhaps you want this: f <-

Re: [R] dot-dot-dot as an actual argument

2010-02-19 Thread Deepayan Sarkar
On Fri, Feb 19, 2010 at 4:44 AM, Paul Hiemstra wrote: > Jyotirmoy Bhattacharya wrote: >> >> I could not find any documentation of how dot-dot-dot works when used >> as an argument in a function call (rather than as a formal argument in >> a definition). I would appreciate some references to the ru

[R] plot.logistic.fit.fnc

2010-02-19 Thread Leslie Roche
Hello All, I am learning mixed effects logistic regression (lmer in lme4), and I am having problems deciphering the goodness of fit function plot.logistic.fit.fnc (languageR package). The only information I can find is that this function plots observed proportions against mean predicted probabiliti

[R] How to store an array like this?

2010-02-19 Thread song song
maybe its not an array like m[1]=matrix(1:4,2,2) m[2]=matrix(1:9,3,3) . . . m[k]=matrix(1:k^2,k,k) likes for (k in 1:n){ s=matrix(1:k^2,k,k) } how to store s like s[1], s[2] ... so that I can use it in other place? thanks! [[alternative HTML version deleted]] _

Re: [R] Rscript question

2010-02-19 Thread Prof Brian Ripley
On Fri, 19 Feb 2010, Jinfeng Liu wrote: OS gmail.com> writes: Hi, I have some code I run interactively through the R interpreter and it works fine. I then run it as a script with Rscript and I get an error. The error is coming when Rscript builds a model matrix. Output from Rscript with the e

Re: [R] How to store an array like this?

2010-02-19 Thread Linlin Yan
It's not an array, but a list: lapply(2:n, function(x) matrix(1:x^2,x)) On Sat, Feb 20, 2010 at 3:17 PM, song song wrote: > maybe its not an array > > like > > m[1]=matrix(1:4,2,2) > m[2]=matrix(1:9,3,3) > . > . > . > m[k]=matrix(1:k^2,k,k) > > likes > > for (k in 1:n){ >  s=matrix(1:k^2,k,k) > }

[R] SEM error

2010-02-19 Thread Dan Edgcumbe
I'm trying to do some confirmatory factor analysis on some data. My SEM model solves in 22 iterations, but when I try to look at the modification indices, using mod.indices, I get the following error message: Error in solve.default(hessian) : system is computationally singular: reciprocal condit

<    1   2