Re: [R] help_transformation

2008-06-26 Thread Moshe Olshansky
Let F be the distribution function of Y, PSI the standard normal distribution anf IPSI it's inverse. Let f(x) = IPSI(F(x)). It is not difficult to see that f(Y) has standard normal distribution. So you can replace F with the empirical distribution and IPSI is the qnorm function of R. --- On

Re: [R] help_transformation

2008-06-26 Thread Prof Brian Ripley
On Wed, 25 Jun 2008, Moshe Olshansky wrote: Let F be the distribution function of Y, PSI the standard normal distribution anf IPSI it's inverse. Let f(x) = IPSI(F(x)). It is not difficult to see that f(Y) has standard normal distribution. So you can replace F with the empirical distribution

[R] Point size problem

2008-06-26 Thread Marcin Kozak
Hi all, I have a simple question and couldn't find any post on this. When plotting simple scatterplots (other plots as well), e.g., x-rnorm(30, 10, 1) y-rnorm(30, 10, 1) plot(x, y, pch = 15, cex = 1), the points, even those close to each other, may have visibly different sizes. Do you know

Re: [R] expression, strsplit, ...

2008-06-26 Thread baptiste Auguié
On 25 Jun 2008, at 19:45, Gabor Grothendieck wrote: Try this: plot(1, xlab = ~ alpha / V * m^-3 * kg ^-2 * l^4) Thanks, I would never have expected this code to work, this is a mystery to me! Actually, I thought xlab wanted an expression, but it seems to be happy with a formula. Also,

[R] Double for loop

2008-06-26 Thread sigalit mangut-leiba
Hi, I'm trying to do a double for loop like this: for (k in 1:1000){ for (i in 1:200){ y[i]-rbinom(1,1,0.8) x1[i]-ifelse(y[i]==1,rnorm(1,mean=20, sd=2),rnorm(1,mean=16, sd=2.2)) } for (j in 1:300){ } } Does anyone know a good reference about double loops? Thank you, Sigalit

Re: [R] Double for loop

2008-06-26 Thread jim holtman
You can at least get rid of the for (i in 1:200){ y[i]-rbinom(1,1,0.8) x1[i]-ifelse(y[i]==1,rnorm(1,mean=20, sd=2),rnorm(1,mean=16, sd=2.2)) loop with the following y - rbinom(200, 1, 0.8) y.1 - y == 1 # get logical vector of y == 1 x1 - numeric(200) # allocate the vector x1[y.1] -

Re: [R] Double for loop

2008-06-26 Thread sigalit mangut-leiba
Thank you for your help On 6/26/08, jim holtman [EMAIL PROTECTED] wrote: You can at least get rid of the for (i in 1:200){ y[i]-rbinom(1,1,0.8) x1[i]-ifelse(y[i]==1,rnorm(1,mean=20, sd=2),rnorm(1,mean=16, sd=2.2)) loop with the following y - rbinom(200, 1, 0.8) y.1 - y == 1 #

Re: [R] Point size problem

2008-06-26 Thread Prof Brian Ripley
On Thu, 26 Jun 2008, Marcin Kozak wrote: Hi all, I have a simple question and couldn't find any post on this. When plotting simple scatterplots (other plots as well), e.g., x-rnorm(30, 10, 1) y-rnorm(30, 10, 1) plot(x, y, pch = 15, cex = 1), the points, even those close to each other, may

Re: [R] logistic regression

2008-06-26 Thread Mikhail Spivakov
oh, I'm sorry... here's my affiliation: Mikhail Spivakov, PhD [EMAIL PROTECTED] Interdisciplinary Postdoctoral Fellowhttp://www.ebi.ac.uk/~spivakov/ European Bioinformatics Institute Tel: +44 1223 492660 (office) Wellcome Trust Genome Campus+44 7985 09 6675 (mob) Cambridge CB10

Re: [R] help_transformation

2008-06-26 Thread Indermaur Lukas
Thanks for getting back to me. i meant that i am seeking for a transformation of an s-shaped response (continuous data) to assure normally distributed residuals of the response. however, i am unsure if the Let F be the distribution... is now the correct thing for me to do. if this is the

Re: [R] xyplot questions - axis and plotting two things in same panel

2008-06-26 Thread Karin Lagesen
Deepayan Sarkar [EMAIL PROTECTED] writes: On 6/25/08, Franz Mueter [EMAIL PROTECTED] wrote: As for your first problem, try: xyplot(numbers~breaks|moltype, groups = type, data = alldata, type = l) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf

[R] write.table a df with specific column order

2008-06-26 Thread juli pausas
Hi I'd like to write.table a dataframe, but with an specific order of columns. Is there a direct way to do it? or I have to generate a new dataframe as follows: t - data.frame(c=1:10, b=11:20, a=letters[1:10]) t2 - data.frame(a=t$a, b=t$b, c=t$c) write.table(t2, row.names=F) Thanks for any

Re: [R] expression, strsplit, ...

2008-06-26 Thread Gabor Grothendieck
bquote is used like this: alpha - 5 xlab - bquote(.(alpha) / V * m^-3 * kg ^-2 * l^4) plot(1, xlab = xlab) On Thu, Jun 26, 2008 at 4:21 AM, baptiste Auguié [EMAIL PROTECTED] wrote: On 25 Jun 2008, at 19:45, Gabor Grothendieck wrote: Try this: plot(1, xlab = ~ alpha / V * m^-3 * kg ^-2 *

Re: [R] write.table a df with specific column order

2008-06-26 Thread Henrique Dallazuanna
Try: write.table(t[c(a, b, c)], row.names=F) On Thu, Jun 26, 2008 at 6:28 AM, juli pausas [EMAIL PROTECTED] wrote: Hi I'd like to write.table a dataframe, but with an specific order of columns. Is there a direct way to do it? or I have to generate a new dataframe as follows: t -

Re: [R] help with cube3d cube size

2008-06-26 Thread Duncan Murdoch
Mark Kimpel wrote: Thanks for the pointers. I think the package is great, just want to use it to its full potential without driving the list crazy with questions. Below is my output to help and sessionInfo(). I don't see the scaling functions, although I now see that they can be retrieved with

Re: [R] expression, strsplit, ...

2008-06-26 Thread Prof Brian Ripley
On Thu, 26 Jun 2008, baptiste Auguié wrote: On 25 Jun 2008, at 19:45, Gabor Grothendieck wrote: Try this: plot(1, xlab = ~ alpha / V * m^-3 * kg ^-2 * l^4) Thanks, I would never have expected this code to work, this is a mystery to me! Actually, I thought xlab wanted an expression, but

[R] plot multiple xYplots

2008-06-26 Thread eesteves
Dear All, I'm having trouble ploting multiple xYplots (Hmisc) within the same pg although I've done it before w/ xyplots. I've produced 4 similar plots e.g. rna.h-xYplot(Cbind(RNA,Lo,Up)~HO|factor(MO,labels=c(April, May,June)),data=diel.data,method=bars,type=b,

[R] geoR : Passing arguments to optim when using likfit

2008-06-26 Thread Mzabalazo Ngwenya
Hi everyone !   I'm am trying to fit a kriging model to a set of data. When I just run the likfit command I can obtain the results. However when I try to pass additional arguements to the optimization function optim I get errors. That is I want to obtain the hessian matrix so matrix

[R] bug in nls?

2008-06-26 Thread Petr PIKAL
Dear all Nobody responded to my previous post so far so I try with more offending subject. I just encountered a strange problem with nls formula. I tried to use nls in cycle but I was not successful. I traced the problem to some parse command. Here is an example DF-data.frame(x=1:10,

Re: [R] bug in nls?

2008-06-26 Thread Katharine Mullen
Dear Petr, I think it's a feature. the formula interface also won't let you specify the slots of S4 objects in the model spec. How about coef(nls(y~a*x^b, data=list(x=DF[,1], y=DF[,2]), start=list(a=3, b=.7))) ? On Thu, 26 Jun 2008, Petr PIKAL wrote: Dear all Nobody responded to my

Re: [R] Is this sapply behaviour normal?

2008-06-26 Thread Kenn Konstabel
On Thu, Jun 26, 2008 at 12:14 AM, Wacek Kusnierczyk [EMAIL PROTECTED] wrote: sapply(dats,function(x){sapply(x,min)}) you can achieve the same with sapply(dats, sapply, min) Did you actually try it? dats - data.frame(1:10,2:11) sapply(dats,sapply,min) X1.10 X2.11 [1,]

Re: [R] bug in nls?

2008-06-26 Thread Gabor Grothendieck
Try this and note, in particular, that the model: line in the output has the correct variables substituted: nm - names(DF) eqn - sprintf(%s ~ a * %s, nm[2], nm[1]) nls(eqn, DF, start = c(a = 1)) Nonlinear regression model model: y ~ a * x data: DF a 1.133 residual sum-of-squares:

Re: [R] geoR : Passing arguments to optim when using likfit]

2008-06-26 Thread Rubén Roa-Ureta
Mzabalazo Ngwenya wrote: Hi everyone ! I'm am trying to fit a kriging model to a set of data. When I just run the likfit command I can obtain the results. However when I try to pass additional arguements to the optimization function optim I get errors. That is I want to obtain the hessian

Re: [R] Point size problem

2008-06-26 Thread Marcin Kozak
Sorry. I'm using Windows XP and R 2.7.0, and the same problem occurred for various graphics devices (windows, pdf, jpeg). Marcin On Thu, Jun 26, 2008 at 11:54 AM, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Thu, 26 Jun 2008, Marcin Kozak wrote: Hi all, I have a simple question and

Re: [R] expression, strsplit, ...

2008-06-26 Thread baptiste Auguié
OK, thanks to both of you for the clarifications. I guess part of my confusion came from the numerous functions and concepts involved in producing such labels: - call vs string vs formula vs expression ... - substitute, bquote, expression, ~, .(), ... I take it as a good thing once you

[R] Gettting barchart titles as numbers not characters

2008-06-26 Thread Elizabeth Webb
Hi, I wonder if you could help me with my barcharts, I am using the barchart function from the lattice library. I have data like this: Complex,Organisms,Percentage 130,0,50 130,1,10 130,2,20 130,3,15 130,4,5 133,0,10 133,1,15 133,2,20 133,3,50 133,4,5 I draw barcharts using this command...

Re: [R] Point size problem

2008-06-26 Thread Prof Brian Ripley
On Thu, 26 Jun 2008, Marcin Kozak wrote: Sorry. I'm using Windows XP and R 2.7.0, and the same problem occurred for various graphics devices (windows, pdf, jpeg). I don't see it for pdf -- that's probably a viewer artefact and you need to look at higher resolution. For windows() and jpeg()

Re: [R] Gettting barchart titles as numbers not characters

2008-06-26 Thread jim holtman
try: barchart(Percentage~Organisms|factor(Complex),data=data,layout=c(1,2),col=rainbow(5),box.ratio=3,horizontal=FALSE,xlim=c( 0 , 1 , 2 , 3 , 4 ),ylim=c(1,100),xlab=) On Thu, Jun 26, 2008 at 8:55 AM, Elizabeth Webb [EMAIL PROTECTED] wrote: Hi, I wonder if you could help me with my barcharts,

Re: [R] Is this sapply behaviour normal?

2008-06-26 Thread Wacek Kusnierczyk
Kenn Konstabel wrote: On Thu, Jun 26, 2008 at 12:14 AM, Wacek Kusnierczyk [EMAIL PROTECTED] wrote: sapply(dats,function(x){sapply(x,min)}) you can achieve the same with sapply(dats, sapply, min) Did you actually try it? dats - data.frame(1:10,2:11)

[R] Confidence intervals for non-lm curve

2008-06-26 Thread Irene Mantzouni
Hi all! I would like to estimate confidence intervals for a non lm model. For example, I use a mixed model of the form: md=lme(y~x1+I(x1^2)+x2 ...) Parameters x1+I(x1^2) are fixed effects and I would like to plot the predicted (partial) curve corresponding to these ones, along with 90% CI

[R] Confidence intervals for non-lm curve

2008-06-26 Thread Irene Mantzouni
Hi all! I would like to estimate confidence intervals for a non lm model. For example, I use a mixed model of the form: md=lme(y~x1+I(x1^2)+x2 ...) Parameters x1+I(x1^2) are fixed effects and I would like to plot the predicted (partial) curve corresponding to these ones, along with 90%

[R] Connecting lines across missing data points, xyplot

2008-06-26 Thread David Afshartous
All, I have data across 5 time points that I am graphing via xyplot, along with error bars. For one of the variables I have missing data for two of the time points. The code below is okay but I can't seem to get the lines to connect across the missing time points. Does anyone now how to

Re: [R] write.table a df with specific column order

2008-06-26 Thread Don MacQueen
Minor correction -- omitted comma. Should be: write.table(t[ , c(a, b, c)], row.names=FALSE) Also, using the name t should be avoided, because t is a built-in function: t() -Don At 8:02 AM -0300 6/26/08, Henrique Dallazuanna wrote: Content-Type: text/plain Content-Disposition: inline

[R] Unsqueezing Stacked Figures

2008-06-26 Thread Gundala Viswanath
Hi, I have two figures where I stacked together as one PNG. Top - scatter plot Bottom - density plot. However these two figures are squeezed together as rectangle figures each. (i.e. the y axes are compressed) Is there a way I can resize the figure? So that it can show proportional and

[R] help

2008-06-26 Thread mohammed alawa
hi,   I'm student doing Msc in operational research and applied statistics in Salford university ,now I'm doing my project which is conducting meta-analysis in R , i was wondering how i can evaluate continuous outcome using rmeta package, i really appreciate if you can help me in that matter.  

[R] density and jpeg

2008-06-26 Thread Georg Ehret
Dear R community, I am using densityplot (lattice package) for a large dataset and wish to print it to a jpeg (the pdf is huge). R crashes consistently. Am I doing it wrong or is densityplot incompatible with jpeg? I work on a Mac, R 2.7.0. require(lattice) jpeg(test.jpeg) d[1:10] [1]

Re: [R] help with cube3d cube size

2008-06-26 Thread Ben Bolker
One way to get at all the functions (although not as easy as help() is library(rgl); ls(pos=2) which literally lists the available functions. As Duncan said, there are multiple functions documented in each page and only the page definitions show up (e.g. matrices is the page for work[ing]

Re: [R] Is this sapply behaviour normal?

2008-06-26 Thread Kenn Konstabel
Sorry, my mistake, - it works both ways with a correct example and neither way with the wrong example. k On Thu, Jun 26, 2008 at 4:25 PM, Wacek Kusnierczyk [EMAIL PROTECTED] wrote: sapply(dats,function(x){sapply(x,min)}) you can achieve the same with sapply(dats, sapply, min)

Re: [R] help

2008-06-26 Thread stephen sefick
looks like you need to have a look at the package description. If you want help from this list you probably need to look at the posting guidelines, and then do a little poking around to figure out what your specific problems are. Stephen On Thu, Jun 26, 2008 at 10:19 AM, mohammed alawa [EMAIL

Re: [R] Connecting lines across missing data points, xyplot

2008-06-26 Thread Doran, Harold
Maybe approx() will work? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Afshartous Sent: Thursday, June 26, 2008 10:26 AM To: r-help@r-project.org Subject: [R] Connecting lines across missing data points, xyplot All, I have data

Re: [R] help with cube3d cube size

2008-06-26 Thread Mark Kimpel
Duncan Ben, Thanks for giving me some tips as to how I can best investigate packages. Ive been using ESS-Emacs and the help pages are HTML. Looks like I need to figure out how to enable HTML help. As for a draft vignette, sure, I would be happy (and honored) to contribute as best I can. I would

[R] xyplot: tick marks inside panel

2008-06-26 Thread GOUACHE David
Hello all, Working with a typical xyplot figure (for example the first from example(lattice) ) I would like to place the tick marks inside the panels instead of outside. I believe working with the axis argument might be the way to do it, but do not see how? Could anyone help me out in doing

[R] constructing arbitrary (positive definite) covariance matrix

2008-06-26 Thread Mizanur Khondoker
Dear list, I am trying to use the 'mvrnorm' function from the MASS package for simulating multivariate Gaussian data with given covariance matrix. The diagonal elements of my covariance matrix should be the same, i.e., all variables have the same marginal variance. Also all correlations between

Re: [R] density and jpeg

2008-06-26 Thread milton ruser
Hi Geord, I run the code bellow without problem on R R version 2.6.2 (2008-02-08) i386-pc-mingw32 require(lattice) setwd(c:\\temp) jpeg(test.jpeg) d-runif(10) d[1:10] densityplot(~d[1:10]) dev.off() Good luck with Mac! miltinho On 6/26/08, Georg Ehret [EMAIL PROTECTED] wrote: Dear R

[R] create new column with colnames resulting from paste()

2008-06-26 Thread Dong-hyun Oh
Dear UseRs, I would like to know the way to create a new column by naming it simultaneously. For example, in for() loop I want to create columns named as paste(test, i, sep = ), as shown below. dt - data.frame(a = c(1, 2, 3), b = c(3, 2, 2), c = c(1, 3, 5))

Re: [R] xyplot: tick marks inside panel

2008-06-26 Thread Gabor Grothendieck
Try this: xyplot(rivers ~ rivers, scale = list(x = list(tck = -1))) On Thu, Jun 26, 2008 at 12:02 PM, GOUACHE David [EMAIL PROTECTED] wrote: Hello all, Working with a typical xyplot figure (for example the first from example(lattice) ) I would like to place the tick marks inside the

Re: [R] create new column with colnames resulting from paste()

2008-06-26 Thread jim holtman
Is this what you want dt - data.frame(a = c(1, 2, 3), b = c(3, 2, 2), c = c(1, 3, 5)) for (i in 1:2){ + dt[[paste('test',i,sep=)]] - rep(i,3) + } dt a b c test1 test2 1 1 3 1 1 2 2 2 2 3 1 2 3 3 2 5 1 2 On Thu, Jun 26, 2008 at 12:23 PM, Dong-hyun Oh [EMAIL

Re: [R] create new column with colnames resulting from paste()

2008-06-26 Thread Jorge Ivan Velez
Dear Dong-hyun, What about dt - data.frame(a = c(1, 2, 3), b = c(3, 2, 2), c = c(1, 3, 5)) test=matrix(rep(c(1,2),each=3),ncol=2) colnames(test)=paste('test',1:2,sep=) cbind(dt,test) ? HTH, Jorge On Thu, Jun 26, 2008 at 12:23 PM, Dong-hyun Oh [EMAIL PROTECTED] wrote: Dear UseRs, I would

Re: [R] create new column with colnames resulting from paste()

2008-06-26 Thread Dong-hyun Oh
Hi, Fortunately, I found a way. -- dt - data.frame(a = c(1, 2, 3), b = c(3, 2, 2), c = c(1, 3, 5)) for(i in 1:2){ dt[, paste(test, i, sep = )] - rep(i, 3) } - Thanks. Best, Dong-hyun Oh On Jun 26, 2008, at 6:34 PM, Jorge Ivan Velez wrote:

[R] lmer model with continuos non normal response variable, transformation needed?

2008-06-26 Thread arams
Hi. I want to do an lmer model but have doubts of what family I should use. My response variable was originally a proportion, however I standarized it for each year of data collection (20 in total). After standarizing it I checked for normality with the Kolmogorov-Smirnov test, and it turns out

Re: [R] [SPAM] - constructing arbitrary (positive definite) covariance matrix - Found word(s) list error in the Text body

2008-06-26 Thread davidr
Well, if you think about the geometry, all correlations equal usually won't work. Think of the SDs as the sides of a simplex and the correlations as the cosines of the angles between the sides (pick one variable as the 'origin'.) Only certain values will give a valid covariance or correlation

[R] Problems loading an S-Plus object

2008-06-26 Thread Morten Hønsen
I have inherited some S-Plus code and objects that I am trying to get to work in R. The object files (3 __i files and one ___nonfi file) are stored in a folder (named _Model), but when I try to use attach(c:/_Model) I get an error saying Error in readChar(con, 5L, useBytes = TRUE) :

Re: [R] density and jpeg

2008-06-26 Thread Prof Brian Ripley
Yes, *but* (because you keep on reporting misleadingly), jpeg() on Windows is a completely different device to jpeg() on Mac OS X. jpeg() on Mac OS X with R 2.7.0 is based on Quartz, so this is a Mac OS-specific issue, for r-sig-mac and not here. Folks, please do remember that there are lots

Re: [R] [SPAM] - constructing arbitrary (positive definite) covariance matrix - Found word(s) list error in the Text body

2008-06-26 Thread Patrick Burns
To make David's approach a little more concrete: You can always have correlations all equal to 1 -- the variables are all the same, except for the names you've given them. You can have two variables with correlation -1, but you can't get a third variable that has -1 correlation to both of the

Re: [R] data frame manipulation - splitting monitoring interval and assigning stage

2008-06-26 Thread Jessi Brown
I'd like to thank those who contacted me with ideas on how to solve this little problem. I learned something from looking through each snippet of code, even if it wasn't doing quite what I'd hoped it would do. Mark Leeds deserves special thanks, for helping me debug my several attempts to improve

Re: [R] Problems loading an S-Plus object

2008-06-26 Thread Prof Brian Ripley
On Thu, 26 Jun 2008, Morten Hønsen wrote: I have inherited some S-Plus code and objects that I am trying to get to work in R. The object files (3 __i files and one ___nonfi file) are stored in a folder (named _Model), but when I try to use attach(c:/_Model) I get an error saying Error in

[R] Layout() coordinates and drawing lines / segments

2008-06-26 Thread maria
Hello, I am trying to wrap my head around the coordinates systems associated with the layout() function ...with the end goal of simply drawing a decorative line in the upper margin of my figure, which is composed of three plots. My output is defined as this:

[R] using contour() with x,y,z data?

2008-06-26 Thread Bob and Deb
Hello list, I'm new to R and I have a problem :-) Below is what my data file that looks like. I tried to import and contour this data by doing this: cv_data - read.table(cv_data.csv,sep=,,header=TRUE) attach(cv_data) contour(x,y,z) I get the error Error in contour.default(x,y,z) :

Re: [R] lmer model with continuos non normal response variable, transformation needed?

2008-06-26 Thread Bert Gunter
If I understand you correctly, then to paraphrase what Brian Ripley has stated in recent posts, it is not the (possibly transformed) response that you want to be normal, but rather the error distributions. Your response presumably contains systematic variation due to your covariates (your model).

[R] Loading an S-Plus object, database

2008-06-26 Thread Leandro Marino
Hi I am changing my databases from S-plus to R. I want to know how can I use that? May I only attach the folder _Data equal I do in S-plus? Thanks! Best Regards, Leandro Marino __ R-help@r-project.org mailing list

[R] Data matrix of all possible response patterns

2008-06-26 Thread SARAH A DEPAOLI
I am looking for a way to generate a data matrix that contains all possible response patterns for 10 binary items. This should produce a matrix with 10 rows (representing 10 items) and 1024 columns (representing 2^10 possible response patterns). Does anyone know of code that would produce such

[R] a question regarding package building

2008-06-26 Thread Tao Shi
Hi List, In Windows, if I do R CMD build mypkg, then I'll get 'mypkg_1.0.tar.gz'. Any option in R CMD build lets me to change the version, i.e. gives me 'mypkg_2.0.tar.gz? It seems -version option doesn't do anything for me. Is it OK if I just change the version number in the file name

Re: [R] Data matrix of all possible response patterns

2008-06-26 Thread Daniel Folkinshteyn
this is probably a cludge, and there may be a neater way to do this, but... here's one: a = 0:1 for (i in 1:9){ a= merge(unname(a), 0:1) } a = t(a) after the for loop, 'a' will contain a 1024 row by 10 col dataframe. putting it through a transpose, gives you the 10 rows by 1024 cols

Re: [R] a question regarding package building

2008-06-26 Thread Henrique Dallazuanna
Change the version on DESCRIPTION file On Thu, Jun 26, 2008 at 3:36 PM, Tao Shi [EMAIL PROTECTED] wrote: Hi List, In Windows, if I do R CMD build mypkg, then I'll get 'mypkg_1.0.tar.gz'. Any option in R CMD build lets me to change the version, i.e. gives me 'mypkg_2.0.tar.gz? It seems

[R] stuck on making a line graph across time, with 4 categories

2008-06-26 Thread Christopher W. Ryan
I can't seem to find just what I'm looking for in R help, Everitt and Hothorn HSAUR, Murrell's book, or the R graphics gallery at http://addictedtor.free.fr/graphiques/. Probably not looking efficiently, but anyway, If my data look like this: head(data) cat startyear studentid 1 other

Re: [R] Data matrix of all possible response patterns

2008-06-26 Thread Henrique Dallazuanna
Try this also: t(expand.grid(rep(list(0:1), 10))) On Thu, Jun 26, 2008 at 3:18 PM, SARAH A DEPAOLI [EMAIL PROTECTED] wrote: I am looking for a way to generate a data matrix that contains all possible response patterns for 10 binary items. This should produce a matrix with 10 rows

Re: [R] using contour() with x,y,z data?

2008-06-26 Thread Bert Gunter
Please **READ** ?contour. x and y are the location of grid lines, z must be a matrix. Your data are **not** of that form. Bert Gunter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bob and Deb Sent: Thursday, June 26, 2008 11:01 AM To:

Re: [R] a question regarding package building

2008-06-26 Thread Tao Shi
Got it! Thank you very much! ...Tao Date: Thu, 26 Jun 2008 20:41:29 +0200 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: r-help@r-project.org Subject: Re: [R] a question regarding package building Tao Shi wrote: Hi List, In Windows,

Re: [R] using contour() with x,y,z data?

2008-06-26 Thread Bob and Deb
I have read the contour help. I guess what I am asking is how to transform my data into a form that contour (or maybe some other functions?) so I can contour my x,y,z data. I know I can do it in SyStat. I'm hoping that R would allow me to do something like this. Bob On Thu, Jun 26, 2008 at

Re: [R] a question regarding package building

2008-06-26 Thread Uwe Ligges
Tao Shi wrote: Hi List, In Windows, if I do R CMD build mypkg, then I'll get 'mypkg_1.0.tar.gz'. Any option in R CMD build lets me to change the version, i.e. gives me 'mypkg_2.0.tar.gz? It seems -version option doesn't do anything for me. Is it OK if I just change the version number

Re: [R] using contour() with x,y,z data?

2008-06-26 Thread tyler
Bob and Deb [EMAIL PROTECTED] writes: I'm new to R and I have a problem :-) Below is what my data file that looks like. I tried to import and contour this data by doing this: cv_data - read.table(cv_data.csv,sep=,,header=TRUE) attach(cv_data) contour(x,y,z) I get the error

Re: [R] Data matrix of all possible response patterns

2008-06-26 Thread Charles C. Berry
mat - outer( 0:9, 0:(1024-1), function(x,y) y %/% (2^x) %% 2 ) On Thu, 26 Jun 2008, Daniel Folkinshteyn wrote: this is probably a cludge, and there may be a neater way to do this, but... here's one: a = 0:1 for (i in 1:9){ a= merge(unname(a), 0:1) } a = t(a) after the for loop, 'a'

Re: [R] stuck on making a line graph across time, with 4 categories

2008-06-26 Thread Ben Bolker
Christopher W. Ryan cryan at binghamton.edu writes: I can't seem to find just what I'm looking for in R help, Everitt and Hothorn HSAUR, Murrell's book, or the R graphics gallery at http://addictedtor.free.fr/graphiques/. Probably not looking efficiently, but anyway, If my data look

Re: [R] bug in nls?

2008-06-26 Thread Berwin A Turlach
G'day Petr, On Thu, 26 Jun 2008 13:57:39 +0200 Petr PIKAL [EMAIL PROTECTED] wrote: I just encountered a strange problem with nls formula. I tried to use nls in cycle but I was not successful. I traced the problem to some parse command. [...] I am not sure if this behaviour is a bug or

Re: [R] stuck on making a line graph across time, with 4 categories--SOLVED

2008-06-26 Thread Christopher W. Ryan
Ben-- worked perfectly. Thank you. My first real experience with lattice graphics. --Chris Christopher W. Ryan, MD SUNY Upstate Medical University Clinical Campus at Binghamton 40 Arch Street, Johnson City, NY 13790 cryanatbinghamtondotedu PGP public keys available at

[R] Read sas7bdat

2008-06-26 Thread Leandro Marino
Hi, I was reading e-mail about one doubt that you were when you read files .sas7bdat in R. Now, I am with the same problem. But I don´t know how can i do that. I have download de Sas Viewer and i am using this sintax in r: read.ssd(X:\\users\\Anresc07,que0411.sas7bdat) SAS failed. SAS program

Re: [R] Layout() coordinates and drawing lines / segments

2008-06-26 Thread Paul Murrell
Hi Take a look at ... http://www.stat.auckland.ac.nz/~paul/R/basegraphics.pdf ... it's getting old, but a lot of what it says should still hold, especially the stuff about coordinate systems and what you can draw where. Paul [EMAIL PROTECTED] wrote: Hello, I am trying to wrap my head

[R] RODBC, sqlFetch error when accessing Excel

2008-06-26 Thread Al Pöhi
This is about R 2.7.0 and related packages on windows NT. I have a mixture of numeric and character data and empty cells in an Excel spreadsheet with several tabs that I'm trying to read with sqlFetch from RODBC. The data that is returned by sqlFetch is unfortunately not identical to the source

[R] Relative mortality function

2008-06-26 Thread José Ignacio Bustos Melo
Hi everyone, I'm looking for some function using R to do the relative mortality function (Klein Moechberger EXAMPLE 6.3) Im working with this datas, from 26 psychiatric patients. Someone can help with this? O__ José Bustos M. c/ /'_ --- Master Apllied Stat Program (*) \(*) --

Re: [R] RODBC, sqlFetch error when accessing Excel

2008-06-26 Thread Gabor Grothendieck
You could try read.xls or xls2csv in the gdata package and see how that works. On Thu, Jun 26, 2008 at 4:44 PM, Al Pöhi [EMAIL PROTECTED] wrote: This is about R 2.7.0 and related packages on windows NT. I have a mixture of numeric and character data and empty cells in an Excel spreadsheet

[R] stationary terminology time series question

2008-06-26 Thread markleeds
This is not exactly an R question but the R code below may make my question more understandable. If one plots sin(x) where x runs from -pi to pi , then the curve hovers around zero obviously. so , in astationary in the mean sense, the series is stationary. But, clearly if one plots the acf,

Re: [R] Read sas7bdat

2008-06-26 Thread Prof Brian Ripley
You need to specify the path to SAS, not Sas viewer. From the help page: sascmd: character string giving full path to SAS executable. I don't think you have done that. On Thu, 26 Jun 2008, Leandro Marino wrote: Hi, I was reading e-mail about one doubt that you were when you read files

Re: [R] Read sas7bdat

2008-06-26 Thread Peter Dalgaard
Prof Brian Ripley wrote: You need to specify the path to SAS, not Sas viewer. From the help page: sascmd: character string giving full path to SAS executable. I don't think you have done that. Or, put differently, it is not going to work unless you have SAS itself, not just the viewer.

Re: [R] Connecting lines across missing data points, xyplot

2008-06-26 Thread Deepayan Sarkar
On 6/26/08, David Afshartous [EMAIL PROTECTED] wrote: All, I have data across 5 time points that I am graphing via xyplot, along with error bars. For one of the variables I have missing data for two of the time points. The code below is okay but I can't seem to get the lines to

[R] Date Time Sequence

2008-06-26 Thread stephen sefick
I would like a sequence of dates with a time step of 15 minutes starting: 1/1/2006 00:00:00 - 12/31/2006 23:45:00 function(x) { chron(sub( .*, , x), gsub(.* (.*), \\1:00, x)) } this is the piece of code I use to read in zoo objects for any help I would be grateful I have tried sequence and I

[R] multiple xYplots

2008-06-26 Thread eesteves
Dear All, I'm having trouble ploting multiple xYplots (Hmisc) within the same pg although I've done it before w/ xyplots. I've produced 4 similar plots e.g. rna.h-xYplot(Cbind(RNA,Lo,Up)~HO|factor(MO,labels=c(April, May,June)),data=diel.data,method=bars,type=b,

[R] Compilation error during package installation

2008-06-26 Thread wanding ZHOU
Hi, I am a Newbie for R. I just installed R-base on my notebook with openSuSE 11. However, I always got compilation errors in installing add-on packages. For example, when installing igraph I got the following error: ___ * Installing

Re: [R] Date Time Sequence

2008-06-26 Thread Gabor Grothendieck
Try this: library(chron) t1 - chron(1/1/2006, 00:00:00) t2 - chron(12/31/2006, 23:45:00) deltat - times(00:15:00) tt - seq(t1, t2, by = times(00:15:00)) Note that if you have some data and your intention is simply to create the index for it so you can create a zoo or zooreg object then the

[R] Question about Constraint Optimization

2008-06-26 Thread HNie
Dear All, I am having trouble in using R function constrOptim to do constraint optimization. It seems that constrOptim calls function optim when it does the optimization, and optim allows us to set method to be SANN if we want to use simulated annealing. In optim, the function allows us to

Re: [R] Date Time Sequence

2008-06-26 Thread stephen sefick
Gabor this is better than using x = seq(ISOdate(2006,1,1, 0, 0, 0), by = 15 min, length.out=35040) this works but your code below is exactly what I needed instead of almost. thankyou very much Stephen On Thu, Jun 26, 2008 at 6:06 PM, Gabor Grothendieck [EMAIL PROTECTED] wrote: Try this:

Re: [R] Read sas7bdat

2008-06-26 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Leandro Marino Sent: Thursday, June 26, 2008 12:50 PM To: r-help@r-project.org Subject: [R] Read sas7bdat Hi, I was reading e-mail about one doubt that you were when you read files .sas7bdat in

[R] Survey questions

2008-06-26 Thread Farley, Robert
First the R question. I have the results of a rather large survey (thousands of forms, each with dozens of questions) with some existing weights and expansion factors. I wish to add additional weighting factors, based on new information that elements of certain variables should appear in certain

Re: [R] constructing arbitrary (positive definite) covariance matrix

2008-06-26 Thread Gabor Grothendieck
Not sure if this is sufficient but nearcor in the sfsmisc package will find the nearest correlation matrix to a given matrix. On Thu, Jun 26, 2008 at 12:11 PM, Mizanur Khondoker [EMAIL PROTECTED] wrote: Dear list, I am trying to use the 'mvrnorm' function from the MASS package for

Re: [R] [SPAM] - constructing arbitrary (positive definite) covariance matrix - Found word(s) list error in the Text body

2008-06-26 Thread Moshe Olshansky
If the main diagonal element of matrix A is 1 and the off diagonal element is a then for any vector x we get that t(x)*A*x = (1-a)*sum(x^2) +a*(sum(x))^2 . If we want A to be positive (semi)definite we need this expression to be positive (non-negative) for any x!= 0. Since sum(x)^2/sum(x*2) = n

[R] Problems exporting graphs

2008-06-26 Thread Sam Albers
I have trying to figure this out all day so hopefully the answer isn't too obvious. I am able to view a graph in the viewer window. However, I need to export graph outside of the viewer window. Here is the script I am using: png(Compare.png) plot(compare$DepthSLI, compare$DischargeSLI,

Re: [R] Problems exporting graphs

2008-06-26 Thread Daniel Folkinshteyn
not sure why it doesn't work, but try the following: first, plot to a regular window, then run: dev.copy(device=png, file=yourfilename.png) dev.off() see if that produces a file you want. another note: what do you mean you can't just copy and paste the graph in ubuntu? doesn't pressing

[R] glm problem

2008-06-26 Thread david einhorn
Hi, this is my code: model-glm(Risk ~ Status + Duration + Credit_History + Credit_amount + Savings + Employment + Inst_rate + Residence + Property + Age + plans +

[R] Problem in applying if statment

2008-06-26 Thread Nadeem Shafique
Respected All, I am writing a program in R and facing some problem with applying if statment. Program first draw random numbers from bivariate normal distribution then compute variable say Pi and Pij from that sample and then further computation .. . . In some samples Pij is

Re: [R] Problem in applying if statment

2008-06-26 Thread Gabor Grothendieck
Try: RSiteSearch(rejection sampling) On Thu, Jun 26, 2008 at 11:52 PM, Nadeem Shafique [EMAIL PROTECTED] wrote: Respected All, I am writing a program in R and facing some problem with applying if statment. Program first draw random numbers from bivariate normal distribution then

[R] question on affylmGUI / oneChannelGUI

2008-06-26 Thread Bogdan Tanasa
Hi everyone. I installed affylmGUI and oneChannelGUI package on R 2.7.1 with the latest version of BioC. After I start R, I do get an error that says Error in loadNamespace(name) : there is no package called 'affylmGUI' and a pop-up window with a message fatal error : unable to restore saved

  1   2   >