[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

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

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

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

[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

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

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

[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

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

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

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

[R] Print table in lme

2010-02-19 Thread Daniel
Hello, I'm trying to add lme results in a table with lm coef results, but as I know, estout or xtabel cannot support lme objects. I'm a new in R and I'll appreciate some helpful comments. -- Daniel Marcelino Phone: (647) 8910939 [[alternative HTML version deleted]]

[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] Omitting members of a sequence

2010-02-19 Thread Gabor Grothendieck
See ?Syntax noting from the list of operators there that : is of lower precedence than [. On Fri, Feb 19, 2010 at 4:33 PM, Stuart Luppescu wrote: > Hello, this is just a point of curiosity with me. I want a sequence of > numbers from 64 to 70, omitting the 2nd and 4th numbers. I can do it > these

Re: [R] plot circular histogram

2010-02-19 Thread Greg Snow
Look at the circular and CircStats packages. Look at the kernel density plots. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project

Re: [R] plot circular histogram

2010-02-19 Thread Sarah Goslee
You can probably adapt stars() to give something similar to what you want. Otherwise, you need to give us examples of what you've tried and how it diverges from what you need. Sarah On Fri, Feb 19, 2010 at 4:34 PM, T.D. Rudolph wrote: > > In conducting studies of animal orientation and displace

Re: [R] Omitting members of a sequence

2010-02-19 Thread Sarah Goslee
Order of operations. Since you didn't specify the order you wanted by using parentheses, R chose, and it wasn't what you wanted. > 64:70[-c(2, 4)] # what you said [1] 64 65 66 67 68 69 70 > (64:70)[-c(2, 4)] # what you thought you said [1] 64 66 68 69 70 > 64:(70[-c(2, 4)]) # what R thought you

Re: [R] retrieve from function

2010-02-19 Thread Dennis Murphy
Hi: Perhaps you want this: f <- function(nbr){ y<-rnorm(nbr) y1 <- mean(y) plot(y) list(y1 = y1) } f(100) prints out the mean and executes the plot w <- f(100) executes the plot > w$y1 [1] 0.06965205 returns the mean as a component of the object w. HTH, Dennis On Fri, Feb 19,

[R] plot circular histogram

2010-02-19 Thread T.D. Rudolph
In conducting studies of animal orientation and displacement, I need to produce circular histograms of angles (bearings in radians 0-2pi) where the centre of the circle indicates very few observations for a given bin of angles and outwardly concentric circles indicate greater frequencies of observ

[R] Omitting members of a sequence

2010-02-19 Thread Stuart Luppescu
Hello, this is just a point of curiosity with me. I want a sequence of numbers from 64 to 70, omitting the 2nd and 4th numbers. I can do it these ways: > seq(64, 70)[-c(2, 4)] [1] 64 66 68 69 70 > foo <- 64:70 > foo[-c(2, 4)] [1] 64 66 68 69 70 But how come this doesn't work? > 64:70[-c(2, 4)] [

Re: [R] What is the difference between expression and quote whenused with eval()?

2010-02-19 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of blue sky > Sent: Friday, February 19, 2010 12:11 PM > To: Peter Dalgaard > Cc: r-h...@stat.math.ethz.ch > Subject: Re: [R] What is the difference between expression > and quote w

[R] is GEE2 for continuous outcome implemented in R?

2010-02-19 Thread COURVOISIER Delphine
hi, surprisingly, I haven't found an implementation of GEE2 in R, except in the orth package but only for binary outcome. There was a post in 2004 that asked the same question: is there any package in R can do the GEE2? thanks in advance, delphine __

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

2010-02-19 Thread Tim Clark
Dear List, I am having a problem with dates and I would like to understand what is going on. Below is an example. I can produce a date/time using as.POSIXct, but I am trying to combine two as.POSIXct objects and keep getting strange results. I thought I was using the wrong origin, but accord

Re: [R] Error of Stepwise Regression with number of rows in use has changed: remove missing values?

2010-02-19 Thread Greg Snow
Have you considered the implications of that solution? -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Kum-Ho

Re: [R] Checking the assumptions for a proper GLM model

2010-02-19 Thread Greg Snow
The best validation of assumptions is a good knowledge of the origin of your data. And with 18 bullet points below, if you do all of these every time you are going to end up with a lot of false positives when all your assumptions are met. Understanding your data so that you know which assumpti

[R] Running R scripts via Java R Interface (JRI)

2010-02-19 Thread Ralf B
Hi R enthusiasts, I am using JRI which is great to run R commands from Java. (Please let me know if this is the wrong forum for those questions). Its straightforward to run single R commands via JRI, but what I really would like to do is running existing R scripts from that interface. Does any of

Re: [R] What is the difference between expression and quote when used with eval()?

2010-02-19 Thread blue sky
On Fri, Feb 19, 2010 at 12:39 PM, Peter Dalgaard wrote: > blue sky wrote: >> >> I made the following example to see what are the difference between >> expression and quote. But I don't see any difference when they are >> used with eval()? Could somebody let me know what the difference is >> betwee

[R] ggplot2 X axis levels

2010-02-19 Thread Felipe Carrillo
Hi all: I've done this before with factors but can't figure how to do it with a continuous variable. I am trying to reorder the sequence of my weeks along the X axis. I want to start with week 27 to 52 and then 1 to 26. I guess I could use levels along with seq() but doesn't seem to work for me. Th

Re: [R] "legend" question

2010-02-19 Thread Sarah Goslee
I still can't tell exactly what you want, but maybe something like this? > legend(30,0.08, c("Normal density","Kernel > density"),col=c("red","blue"),lty=1:1,lwd=1:1,bty="n") > legend(30,0.06, c(paste("Mean =",round(mean(CDR3),1)),paste("Median > =",median(CDR3))),col=c("red","black"),pch=19:19,

[R] "legend" question

2010-02-19 Thread Lu Wang
Hi, Sorry to forget providing the data before. I want to get a histogram with the legend for my data. I drew a normal density curve and kernel density curve in the histogram, and I also label mean and median in the X axis. From the code, I got two legend: One shows "Normal Density" and "Kernel De

Re: [R] What is the difference between expression and quote whenusedwith eval()?

2010-02-19 Thread William Dunlap
I think of quote(something) as being equivalent to expression(something)[[1]]. eval() goes through the outermost expression layer > eval(expression(expression(noSuchFunction(noSuchValue expression(noSuchFunction(noSuchValue)) > eval(eval(expression(expression(noSuchFunction(noSuchValue))

Re: [R] What is the difference between expression and quote when usedwith eval()?

2010-02-19 Thread Bert Gunter
> as.list(expression( 2*3)) [[1]] 2 * 3 > as.list(quote( 2*3)) [[1]] `*` [[2]] [1] 2 [[3]] [1] 3 > identical(as.list(expression( 2*3))[[1]],quote(2*3)) [1] TRUE expression() wraps the call into an expression object (as pointed out to me by Gabor Grothendieck). Bert Gunter Genentech Nonclinica

[R] "Legend" question

2010-02-19 Thread Lu Wang
Hi, I want to get a histogram with the legend for my data. I drew a normal density curve and kernel density curve in the histogram, and I also label mean and median in the X axis. From the code, I got two legend: One shows "Normal Density" and "Kernel Density" and their corresponding lines, the

Re: [R] Replicating output from a function

2010-02-19 Thread Greg Snow
The replicate function will run code multiple times and return the output as a list (or possibly something simplified). You can then use lapply, sapply, or other tools to summarize those results. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.o

Re: [R] how to make R plot under Linux

2010-02-19 Thread Vojtěch Zeisek
On Linux You can use Rkward http://rkward.sourceforge.net/ - very nice and good graphical user interface for R. Dne Pá 19. února 2010 19:39:53 xin...@stat.psu.edu napsal(a): > Hi, I am using R in Linux environment. How can i make plot in Linux just > like in windows? > > thanks > >

Re: [R] multi-argument returns

2010-02-19 Thread Randall Wrong
Thanks to Patrick Burns, Bert Gunter, Steve Lianoglou, and Professor Brian Ripley. 2010/2/17 Prof Brian Ripley > On Wed, 17 Feb 2010, Randall Wrong wrote: > > Dear R users, >> >> I have multi-argument returns in a function and I am warned by the program >> they are deprecated. >> > > Defunct as

Re: [R] how to make R plot under Linux

2010-02-19 Thread Ista Zahn
On 02/19/10 xin...@stat.psu.edu wrote: > Hi, I am using R in Linux environment. How can i make plot in Linux just > like in windows? There shouldn't be much difference, but we're going to need a lot more information. What version of linux, what version of R, what exactly is the problem you are h

[R] how to make R plot under Linux

2010-02-19 Thread xinwei
Hi, I am using R in Linux environment. How can i make plot in Linux just like in windows? thanks __ 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.ht

Re: [R] What is the difference between expression and quote when used with eval()?

2010-02-19 Thread Peter Dalgaard
blue sky wrote: I made the following example to see what are the difference between expression and quote. But I don't see any difference when they are used with eval()? Could somebody let me know what the difference is between expression and quote? Expressions are vectors of unevaluated express

Re: [R] Use of R in clinical trials

2010-02-19 Thread John Sorkin
Marc, A thoughtful, well reasoned discussion. I welcome this kind of analysis. (I was not criticizing Bert, I was using his post as an example of an unreasonable statement made to, but not by him, that can serve as an object lesson for all of us.) I feel unhappy about posts which attack SAS, R o

Re: [R] retrieve from function

2010-02-19 Thread Henrique Dallazuanna
Try this: nbr <- 30 lapply(body(x), eval)[[grep("y1", body(x))]] On Fri, Feb 19, 2010 at 3:39 PM, threshold wrote: > > Hi, say I got the function: >> x=function(nbr){y<-rnorm(nbr);y1 <- mean(y);plot(y)} > > how can I retrieve value of y1, when I need it. > > I don't want: >> x=function(nbr){y<-r

Re: [R] Accessing values of a matrix

2010-02-19 Thread Sarah Goslee
Hi Colin, You'll get a better answer if you provide an actual example, including what you tried that didn't work. It looks to me like you want to subset a data frame based on column names, though I'm not sure what A(i, J) is supposed to be. if so, then this is one approach: > A <- data.frame(A =

Re: [R] retrieve from function

2010-02-19 Thread threshold
Thank you for response. The problem is that using return(y1) in my function formula always returns y1, but what I want is to return it only when I wish, like p.value in t.test(rnorm(100),rnorm(100))$p.value robert -- View this message in context: http://n4.nabble.com/retrieve-from-function-tp15

Re: [R] Use of R in clinical trials

2010-02-19 Thread Bert Gunter
Gentlemen: Thankyou for your comments. I know I promised not to respond, but I just wanted to clarify something that Dieter mentioned below, not defend my remarks. I understand "validate code" per 21 CFR part 11 complance to mean that for **ANY** code that is written, be it in SAS, R, VB, or what

[R] Accessing values of a matrix

2010-02-19 Thread statquant
hello all, thank you for taking the time I have a matrix A that have column names (let say n columns), I want to reduce the matrix to have just a few of those column (p colums, this is trivial), but for the lines I want only the lines such that A(i,J) is part of a list (J is fixed and known) I a

Re: [R] Use of R in clinical trials

2010-02-19 Thread Marc Schwartz
On Feb 19, 2010, at 6:56 AM, John Sorkin wrote: > Bert, > There is a lesson here. Just as intolerance of any statistical analysis > program (or system) other than SAS should lead to our being drive crazy, so > to should intolerance of > any statistical analysis program (or system) other than R.

Re: [R] retrieve from function

2010-02-19 Thread Ista Zahn
Hi Robert, You need to modify your function to return a value. Something like x <- function(nbr){ y<-rnorm(nbr) y1 <- mean(y) plot(y) return(y1) } -Ista __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help P

Re: [R] retrieve from function

2010-02-19 Thread Ista Zahn
__ 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 provide commented, minimal, self-contained, reproducible code.

Re: [R] inverse lexicographical ordering

2010-02-19 Thread Daniel Malter
Hi, see the code below. Next time, please provide self-contained code to generate the matrix (read the posting guide) so that we can just copy-paste it into R to get the matrix. x=rep(c(0,1),4) y=rep(c(0,0,1,1),2) z=rep(c(0,1),each=4) m=cbind(z,y,x) w=rowSums(m) m=cbind(m,w) m m[order(w,x,y,z

[R] What is the difference between expression and quote when used with eval()?

2010-02-19 Thread blue sky
I made the following example to see what are the difference between expression and quote. But I don't see any difference when they are used with eval()? Could somebody let me know what the difference is between expression and quote? expr=expression(2*3) quo=quote(2*3) eval(expr) str(expr) class(

[R] retrieve from function

2010-02-19 Thread threshold
Hi, say I got the function: > x=function(nbr){y<-rnorm(nbr);y1 <- mean(y);plot(y)} how can I retrieve value of y1, when I need it. I don't want: > x=function(nbr){y<-rnorm(nbr);y1 <<- mean(y);plot(y)} > y1 I want someting like: "x$y1" and then I get the value Many thanks, robert -- View

[R] inverse lexicographical ordering

2010-02-19 Thread Evgenia
Dear users, I have a matrix b as [,1] [,2] [,3] [,4] [1,]0000 [2,]0011 [3,]0101 [4,]0112 [5,]1001 [6,]1012 [7,]1102 [8,]1113 with last column the rowSums(b) I w

Re: [R] crhon compile directive faul in version x64, in Intel i7?

2010-02-19 Thread Uwe Ligges
On 17.02.2010 22:13, Juan Santiago Ramseyer wrote: ==> CRASH INSTALLING PACKAGES CHRON IN: Intel(R) Core(TM) i7 CPU 860 @ 2800GHz ==> IT'S COMPILED DIRECTIVE WRONG? REGARD YOUR ATENTION ==> I RUN: SO:Linux 2.6.31.12-174.2.19.fc12.x86_64 x86_64 Fedora release 12 (Constantine) ==> AND RE

Re: [R] tiff() and antialias option

2010-02-19 Thread Uwe Ligges
On 19.02.2010 17:44, Andrew Yee wrote: I was wondering if someone could help with the antialias option in tiff(). I'm running R 2.9.2 on a Linux machine. I'm working on creating a tiff file and have tried different antialias parameters, e.g. default, none, gray, and subpixel, but don't seem

Re: [R] R-commands for MDS

2010-02-19 Thread Uwe Ligges
On 18.02.2010 11:24, Oduor Olande wrote: Hello I am using the following command but not able to text the values on the graph can someone please make suggestions for improvement Perhaps dist.r does not have row.names(dist.r) nor colnames(dist.r)? We cannot know since we do not have dist.r.

Re: [R] svm and RMSE

2010-02-19 Thread Uwe Ligges
On 19.02.2010 01:29, Amy Hessen wrote: Hi Thank you very much for your reply. I meant I got different RMSE with different runs to the same program without any change for the dataset or the parameters of SVM. This is my code: library(e1071) readingmydata<- as.matrix(read.delim("mydataset.tx

[R] tiff() and antialias option

2010-02-19 Thread Andrew Yee
I was wondering if someone could help with the antialias option in tiff(). I'm running R 2.9.2 on a Linux machine. I'm working on creating a tiff file and have tried different antialias parameters, e.g. default, none, gray, and subpixel, but don't seem to be seeing a difference in the output. Or

Re: [R] Update RMySQL and ... it's no more running

2010-02-19 Thread Gabor Grothendieck
If you only need it while in R you can use the RENVIRON file or the .Rprofile or Rprofile.site file. Use help in R to find more on this. environment variables can also be set through the control panel. Google to get instructions. Another possibility is the free command line Windows utility seten

Re: [R] popbio and stochastic lambda calculation

2010-02-19 Thread Shawn Morrison
That is a big help Chris - thank you very much for your assistance. I also ran your code (below) for the example in Caswell (2001, ~p300) and got matching results. I'd like to add my vote for including this method in the next version of popbio - I think it would be a very useful addition. Th

Re: [R] lty dots pdf issue

2010-02-19 Thread RKoenker
Thanks Ken, that was it. I've updated to R version 2.11.0 Under development (unstable) (2010-02-18 r51149) x86_64-apple-darwin9.8.0 and everything looks fine now. Thanks too to Simon for sorting this out! Roger -- View this message in context: http://n4.nabble.com/lty-dots-pdf-issue-tp1561

Re: [R] order two dataframes by an integer column from either data frame

2010-02-19 Thread Paul Rigor (gmail)
Thanks, I ended up using that method! On Fri, Feb 19, 2010 at 7:53 AM, Dieter Menne wrote: > > > Paul Rigor (ucla) wrote: > > > > I have two data frames that share a common column, data1.name and > > data2.name. > > How would I be able to order the other based on an integer column from > > eithe

[R] Generate Univariate Normal Mixtures???

2010-02-19 Thread vaibhav dua
Hi, I'm trying to generate a mixture from 2 univariate normal distributions and would like to put a constrained on the means (Equal) of the two distributions. Here is my shot at the code: library(nor1mix) X <- norMix(mu=c(50, 60 ), sig2=c(5,10), w=c(0.5, 0.5)) mixData <- rnorMix(1000, X) p

Re: [R] order two dataframes by an integer column from either data frame

2010-02-19 Thread Dieter Menne
Paul Rigor (ucla) wrote: > > I have two data frames that share a common column, data1.name and > data2.name. > How would I be able to order the other based on an integer column from > either data frame? > > For example, how do I order data2 based on data1.age? Or data1 based on > data2.salary

[R] order two dataframes by an integer column from either data frame

2010-02-19 Thread Paul Rigor (ucla)
Hi, I'm an R nooob! So please pardon this easy question! I have two data frames that share a common column, data1.name and data2.name. How would I be able to order the other based on an integer column from either data frame? For example, how do I order data2 based on data1.age? Or data1 based

Re: [R] Bind field of a list

2010-02-19 Thread Colin.Umansky
Hello, Thank you but I think not what I would like to get as an answer is the list ("x","v","n","m") + what you gave me could work for 2 fields but if I have 200... What I want is a vectorize way to do bindlists <- function(x){ output = c(); for (i in 1:length(x)) {

Re: [R] Set Colour of Histogram Bars (lattice)

2010-02-19 Thread Dieter Menne
DarioAustralia wrote: > > > I have a bunch of histogram bars that I'd like the first to be a certain > colour, second to be another colour, third to be a third colour, and > repeat for all my 39 bars. > >> levels(forPlot$type) > [1] "Blah" "Blah 2" "Blah 3" > > trellis.par.set("plot.polygon$

Re: [R] Bind field of a list

2010-02-19 Thread statquant
Bravo baptiste it works what does do.call do exactly ?? -- View this message in context: http://n4.nabble.com/Bind-field-of-a-list-tp1561676p1561745.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list htt

Re: [R] Bind field of a list

2010-02-19 Thread David Winsemius
On Feb 19, 2010, at 9:49 AM, statquant wrote: Hello, Thank you but I think not what I would like to get as an answer is the list ("x","v","n","m") + what you gave me could work for 2 fields but if I have 200... What I want is a vectorize way to do bindlists <- function(x){ outpu

Re: [R] Bind field of a list

2010-02-19 Thread baptiste auguie
Hi, Try this, unlist(test) or do.call(c, test) HTH, baptiste On 19 February 2010 15:19, statquant wrote: > > Hello all > I am new in R and so easy stuff are difficult... > let say that I have a list > test <- list(a=c("x","v"),b=c("n","m")) > how can I without a loop get test$a bind with te

Re: [R] Bind field of a list

2010-02-19 Thread statquant
Hello, Thank you but I think not what I would like to get as an answer is the list ("x","v","n","m") + what you gave me could work for 2 fields but if I have 200... What I want is a vectorize way to do bindlists <- function(x){ output = c(); for (i in 1:length(x)) {

Re: [R] Date label lost while inverting y axis.

2010-02-19 Thread David Winsemius
On Feb 19, 2010, at 2:20 AM, Jeremie Smaga wrote: Good morning, I am currently displaying a time series with the time on the Y axis, and the values on the X axis. The problem is that I wanted to reverse the Y axis (that is, to have the latest date the closest to the X axis). So I looked

Re: [R] lty dots pdf issue

2010-02-19 Thread Ken Knoblauch
Roger Koenker uiuc.edu> writes: > I'm trying to redo an old plot with: > > sessionInfo() > R version 2.11.0 Under development (unstable) (2010-02-09 r51113) > x86_64-apple-darwin9.8.0 > When I do: > > pdf("lty.pdf",height = 6, width = 8) > u <- 1:100/100 > y <- matrix(rep(1:10,each = 100),100)

Re: [R] Update RMySQL and ... it's no more running

2010-02-19 Thread PtitBleu
Just to say that I found the place to set the environment variables (Computer/Properties/Advanced/Environment variables). The warning is still there but the connection seems ok. Concerning the warning, do you think I have to install an older version of mysql ? By the way, I also copied RMySQL.dl

Re: [R] Confused about appending to list behavior...

2010-02-19 Thread Dieter Menne
JustADude wrote: > > > ... > > By any chance is there more documentation out there on lists and this > behavior, as I would like to try to better understand what is really going > on and why one approach works and another doesn't. > > ... > Example reproduced below > You forgot an assig

Re: [R] Bind field of a list

2010-02-19 Thread Philipp Rappold
is this what you're looking for? test <- data.frame(a=c("x","v"),b=c("n","m")) test statquant wrote: Hello all I am new in R and so easy stuff are difficult... let say that I have a list test <- list(a=c("x","v"),b=c("n","m")) how can I without a loop get test$a bind with test$b (obviously in

[R] lty dots pdf issue

2010-02-19 Thread Roger Koenker
I'm trying to redo an old plot with: > sessionInfo() R version 2.11.0 Under development (unstable) (2010-02-09 r51113) x86_64-apple-darwin9.8.0 When I do: pdf("lty.pdf",height = 6, width = 8) u <- 1:100/100 y <- matrix(rep(1:10,each = 100),100) matplot(u,y,lwd = 2,type ="l") dev.off() the l

[R] Bind field of a list

2010-02-19 Thread statquant
Hello all I am new in R and so easy stuff are difficult... let say that I have a list test <- list(a=c("x","v"),b=c("n","m")) how can I without a loop get test$a bind with test$b (obviously in real life their would be many fields) Cheers and thanks -- View this message in context: http://n4.na

Re: [R] Update RMySQL and ... it's no more running

2010-02-19 Thread PtitBleu
Hello again, After 'googling', I set the environment variable MYSQL_HOME value to the path to MYSQL with the command below. I get a warning (is it a problem or not ???) but I managed to connect to my databases. But when I close and open again R, the connection is lost. I have to run the command

[R] eha aftreg performance

2010-02-19 Thread Philipp Rappold
Göran, thanks for the update, I'm just about to install it! Just wanted to drop you a short line about performance (as you once requested): aftreg takes ages on my windows machine to calculate a small set of 7 observations which are not even grouped together by "id". To be a bit more precise, it

Re: [R] Rgui.exe cannot be set as default program under Vista wtih R2.10.1

2010-02-19 Thread Dieter Menne
Schmitt, H. (Heike) wrote: > > .. > Trying to associate Rgui.exe with the Rdata files via control panel / > default programs does not work - Rgui is not added to the list of > recommended programs. > .. > When your right-click/Open With on an rdata-file in Explorer, there is a "Search" (Duch

Re: [R] Rgui.exe cannot be set as default program under Vista wtih R2.10.1

2010-02-19 Thread Dieter Menne
-- View this message in context: http://n4.nabble.com/Rgui-exe-cannot-be-set-as-default-program-under-Vista-wtih-R2-10-1-tp1561598p1561649.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat

[R] BMDP and SAS (was R in clinical trials)

2010-02-19 Thread Terry Therneau
I used both BMDP and SAS in my earlier years, side by side. At that time the BMDP statistical methods were much more mature and comprehensive: we treated them as the standard when the two packages disagreed. (It was a BMDP manual that clearly explained to me what the hypothesis of "Yate's weigh

Re: [R] problem with multiple plots (mfrow, mar)

2010-02-19 Thread Peter Neuhaus
Jim Lemon wrote: Hi Peter, The two par arguments "fin" and "pin" allow a solution. What you want is for the second values in "pin" (Plot dimensions in INches) to be the same for all your plots. You can get an approximation by using the layout function instead of mfrow and setting the height v

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

2010-02-19 Thread lith
> 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). You might also be interested in other thread regarding this problem: http://groups.google.com/group/r-help-archive/msg/5c6ea5eb593337b4

[R] Rgui.exe cannot be set as default program under Vista wtih R2.10.1

2010-02-19 Thread Schmitt, H. (Heike)
Dear moderators, when I installed the latest version of R (R2.10.1) under Microsoft Vista (service pack 2), I ran into problems associating Rgui.exe with .RData files. On doubleckicking such files in explorer, they open in a Rterm window. Trying to associate Rgui.exe with the Rdata files via co

Re: [R] Use of R in clinical trials

2010-02-19 Thread John Sorkin
Bert, There is a lesson here. Just as intolerance of any statistical analysis program (or system) other than SAS should lead to our being drive crazy, so to should intolerance of any statistical analysis program (or system) other than R. John >>> Dieter Menne 2/19/2010 3:46 AM >>> Bert, I

Re: [R] Extracting values from a list

2010-02-19 Thread Paul Hiemstra
chipmaney wrote: Thanks, as a follow-up, how do i extract the list element name (ie, 4-2 or 44-1) Look at names(your_list) cheers, Paul thanks, chipper Date: Thu, 18 Feb 2010 11:56:45 -0800 From: ml-node+1560750-540257540-69...@n4.nabble.com To: chipma...@hotmail.com Subject: Re: Extracti

[R] Confused about appending to list behavior...

2010-02-19 Thread Jason Rupert
Through help from the list and a little trial and error (mainly error) I think I figured out a couple of ways to append to a list. Now I am trying to access the data that I appended to the list. The example below shows where I'm trying to access that information via two different methods. I

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

2010-02-19 Thread Paul Hiemstra
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 rules governing situations like: f1<-function(x,y,...){ print(x) }

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

2010-02-19 Thread Gabor Grothendieck
It likely has to do with the fact that barchart uses unevaluated arguments. Look at its source by entering its name without arguments: barchart This does work: library(lattice) f.barchart2 <- function(...) eval.parent(substitute(barchart(...))) x <- data.frame(a = c(1,1,2,2), b = c(1,2,3,4), d

Re: [R] Plotting multiple table automatically

2010-02-19 Thread KennyL
Thanks to you both, Both methods work, I was trying to do what you have suggested earlier Paul, but got in a mess, thanks for the code I can see why it was all going wrong now! Kenny -- View this message in context: http://n4.nabble.com/Plotting-multiple-table-automatically-tp1561478p1561507.

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

2010-02-19 Thread Jyotirmoy Bhattacharya
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 rules governing situations like: f1<-function(x,y,...){   print(x) } f2<-function(...){   f1(...) }

Re: [R] Plotting multiple table automatically

2010-02-19 Thread Paul Hiemstra
KennyL wrote: Hi All, I have a slight issue getting R to plot a series of tables automatically. Essentially I have a series of tables that I wish to plot. They are named on_2, on_3 etc. based on the file name when they were read in. I have filelist <- list.files() to give me list of the table na

Re: [R] Underlay Mapoutlines with Googlemapspictures

2010-02-19 Thread Roger Bivand
(Note that you did not follow the posting guide - please always start a new thread/question by creating a new message - do not simply reply to an existing posting erasing the subject; such a message stays in the old thread and is hard to find in the archives) See package RgoogleMaps on your neare

Re: [R] Plotting multiple table automatically

2010-02-19 Thread Jim Lemon
On 02/19/2010 10:32 PM, KennyL wrote: Hi All, I have a slight issue getting R to plot a series of tables automatically. Essentially I have a series of tables that I wish to plot. They are named on_2, on_3 etc. based on the file name when they were read in. I have filelist<- list.files() to give

[R] Plotting multiple table automatically

2010-02-19 Thread KennyL
Hi All, I have a slight issue getting R to plot a series of tables automatically. Essentially I have a series of tables that I wish to plot. They are named on_2, on_3 etc. based on the file name when they were read in. I have filelist <- list.files() to give me list of the table names. I wish to

Re: [R] ellipsis-related error: used in an incorrect context, no ... to look in

2010-02-19 Thread Felix Andrews
The problem is related to the processing of the 'groups' argument, which is subject to non-standard evaluation. The groups argument is substitute()d and evaluated in a special context ('data' etc). But this gets messed up if you are not passing the symbol directly. The work-around is to rewrite the

  1   2   >