Re: [R] lines on plot

2010-05-20 Thread Anthony Lopez
al Message- > > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > > project.org] On Behalf Of Anthony Lopez > > Sent: Friday, 21 May 2010 5:39 a.m. > > To: R-help@r-project.org > > Subject: [R] lines on plot > > > > Is there an easier wa

Re: [R] lines on plot

2010-05-20 Thread Anthony Lopez
quot;,"3","4","5","6","7"), tck=1) > > should do it? See tck in help("par"). > > Hope this helps. > > Allan. > > > On 20/05/10 18:38, Anthony Lopez wrote: > >> Is there an easier way to make this graph

[R] lines on plot

2010-05-20 Thread Anthony Lopez
Is there an easier way to make this graph *without* having to specify all of the separate segment arguments at the end? > x <- c(1,2) > off <- c(4,5.5) > def <- c(5.5,5.9) > par(fg="lightblue4") > plot(x,off,type="o",col="dodgerblue4",ylim=c(2,7),xlim=c(0.7,2.3),axes=F,xlab="Labor Condition",ylab=

Re: [R] how to save multiple plots in one PDF file?

2010-05-17 Thread Anthony Lopez
one way: x <- rnorm(100) y <- x+rnorm(100) par(mfrow=c(2,2)) # this sets up the graphics window to expect a 2x2 layout plot(x,y) boxplot(x,y,names=c("var1","var2")) hist(x) hist(y) mtext("fourplots on same page",side=3,outer=T,line=-1.5) and you can adjust as needed to put more or less plots o

Re: [R] categorical variable in scatterplot (car)

2010-04-25 Thread Anthony Lopez
oducible example seems >> applicable here. >> >> Regards, >> John >> >> >> John Fox >> Senator William McMaster >> Professor of Social Statistics >> Department of Sociology >> McMaster University >> Ha

[R] categorical variable in scatterplot (car)

2010-04-24 Thread Anthony Lopez
Hello R folks, I am encountering a problem with the following scatterplot function from the car package: > scatterplot(y~x|z) where y and x are continuous (interval) random variables and z is a categorical variable. When z is a categorical variable coded 1 or 2, I (appropriately) get a scatterp

[R] contradictory output between ncv.test() and gvlma()

2010-04-05 Thread Anthony Lopez
Can anyone tell me why the ncv.test output and the gvlma output would be contradictory on the question of heteroscedasticity? Below, the ncv.test output reveals a problem with heteroscedasticity, but the gvlma output says that the assumptions are acceptable. How is this reconciled? > ncv.test(de

[R] summated scale

2010-03-20 Thread Anthony Lopez
hello, I am new to R (convert from Stata) and I am wondering if there is an R command/function for generating a summated scale from, for example, four separate variables in a data set. In other words, I want to transform the variables x1, x2, x3, and x4 (which have high inter-item reliability) in