Re: [R] How to: highlight R syntax on webpages ?

2009-11-21 Thread David Hajage
Hello, ascii package provides a alternative to org-babel/R. it allows to use Sweave with org files (many thanks to Erik and his blog for this...). http://eusebe.github.com/ascii/#_other_outputs http://eusebe.github.com/ascii/org.html#undefined david 2009/11/20 Thomas S. Dye t...@tsdye.com Hi

Re: [R] subset or condition as argument to a function

2009-11-21 Thread Bernardo Rangel Tura
On Fri, 2009-11-20 at 17:40 -0800, Santosh wrote: Dear Rxperts! I was wondering if it is possible to write a function which can take in argument of a subset or condition.. Of course, I am aware of the alternate methods like coplot, par.plot, xyplot etc... I am specifically interested in

Re: [R] AKIMA: z values at a set coordinate

2009-11-21 Thread Paul Hiemstra
Hi Anonymous, (Maybe next time include your name) There are data objects in R that are designed for spatial data, look at the sp package. Casting them into this format gives you an enormous increase in flexibility with analyzing spatial data. See the example below using your example:

Re: [R] how to draw image of a data distribution? Thanks

2009-11-21 Thread Jim Lemon
Senlin Liang wrote: I have a file with 3 cols as: xyvalue 110.5000 121.8333 134. 210.7500 220.7500 234 310.7500 321.4167 335.1667 I read them in using p - read.table(data.txt, header=TRUE) My questoin: how to

Re: [R] How to put x-axis labels vertically?

2009-11-21 Thread Jim Lemon
On 11/21/2009 10:15 AM, Peng Yu wrote: image(array,axes=F) axis(side=1,at=seq(from=par()$usr[1],to=par()$usr[2],length=size),labels=some_labels) I have the above code to plot a heatmap. But I want to make the labels on the x-axis vertical. Could somebody let me know how to do it?

Re: [R] How to change the label font size?

2009-11-21 Thread Jim Lemon
On 11/21/2009 12:23 PM, Peng Yu wrote: The labels on the axis overlap. Is there a way to change their font size smaller? m=100 n=100 X=replicate(n,rnorm(m)) image(X,axes=F) axis(side=1,at=seq(from=par()$usr[1],to=par()$usr[2],length=(m+1))[1:m],labels=replicate(m, 'A'),las=2)

Re: [R] Classification

2009-11-21 Thread Chris Li
Thanks to both of you. Problem's solved. Greatly appreciated. :] Chris Chris Li wrote: Hi all, I have got a dataset like the following: 3 5 7 3 9 7 i.e. random numbers with some repeats. I want R to classify them for me. E.g. every row that has a value of 3 will be asigned

[R] Choleski and Choleski with pivoting of matrix fails

2009-11-21 Thread simona.racio...@libero.it
Hi Everyone, I need to take the square root of the following matrix: [,1] [,2][,3] [1,] 0.5401984 -0.3998675 -1.3785897 [2,] -0.3998675 1.0561872 0.8158639 [3,] -1.3785897 0.8158639 1.6073119 I tried Choleski which fails. I then tried Choleski

[R] how to download the package omegahat SJava?

2009-11-21 Thread thierry CHEKOUO T.
I tried to follow instruction given by this webpage: http://www.omegahat.org/RSJava/ . but I cant download. Is there another way to download this package in R. Thank you for your help [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] Calculating the percentage of explained deviance in lmer

2009-11-21 Thread willow1980
Hi, Fabio, I only have an idea on how to calculate deviance explained by the fixed effects. If you remove fixed effects and introduce one null model such as m2-lmer(response-var ~ 1+(1|Site/Area/Transect),family=binomial). Then, (deviance(m2)-deviance(m1))/deviance(m2) will represent deviance

[R] deviance from lmer model: deviance(model) and sum(resid(model)^2), which one is correct?

2009-11-21 Thread willow1980
Dear R users, I am frustrated by the residual sum of squares calculation. From Statistical Medhods by Snedecor Cochran, I know sum(resid(model)^2) should be one method. However, there is a automatic code in R for this operation: deviance(model). When I compare the results from these two methods,

Re: [R] how to download the package omegahat SJava?

2009-11-21 Thread David Winsemius
On Nov 21, 2009, at 7:46 AM, thierry CHEKOUO T. wrote: I tried to follow instruction given by this webpage: http://www.omegahat.org/RSJava/ . but I cant download. Is there another way to download this package in R. How did you try? What error do you get? -- David Winsemius, MD Heritage

[R] compiling addons

2009-11-21 Thread stephen sefick
I am trying to compile the r.stream* set of addons. Ubuntu 9.10 64 bit I have installed the grass packages from the repositories I have also compiled grass 6.5 from source. I have taken the r.stream* from the addons svn and placed the sources in the grass source tree - in the raster file I run

[R] EBImage do not read an Image: requested image not found or could not be loaded

2009-11-21 Thread Cleber Borges
Hello all, I am trying to use the EBImage package, (EBImage 3.2.0 and ImageMagick 6.5.7-9 2009-11-19 Q8 (dinamic linked) with R 2.10.0 winXP) but I get the following error: #- library(EBImage) Loading required package: abind ?readImage ## Reads

[R] p.value OR F.value?

2009-11-21 Thread bbslover
Hi,all friends, Please help me understand this sentence below: “From this set, 858 columns not significantly correlated with the response variable TBG at the 5% level were removed, leaving a set of 390 columns.” and “ the F-test's value for the one-parameter correlation with the descriptor

[R] python

2009-11-21 Thread Jean Legeande
Dear R users, I would like to make my R code for MCMC faster. It is possible to integrate C code into R but I think C is too complicated for me. I would need a C introduction only for MCMC and I do not know if such a thing exists. I was thinking of Python (and scipy). Where could I read about

Re: [R] Problem with Numerical derivatives (numDeriv) and mvtnorm

2009-11-21 Thread Ravi Varadhan
This is not a problem of numDerv. The problem is that the function PP1 is stochastic, i.e. it gives different values for the same argument p. This is due to the function pmvnorm(), which I presume uses some kind of Monte Carlo sampling to compute the integral of a multivariate normal.

Re: [R] p.value OR F.value?

2009-11-21 Thread David Winsemius
On Nov 21, 2009, at 8:03 AM, bbslover wrote: Hi,all friends, Please help me understand this sentence below: “From this set, 858 columns not significantly correlated with the response variable TBG at the 5% level were removed, leaving a set of 390 columns.” and “ the F-test's value for

Re: [R] python

2009-11-21 Thread Paul Hiemstra
Hi Jean, You can integrate R and Python using RSPython or Rpy. But why would Python be faster than R? Both are interpreted languages and probably about as fast (please someone correct me if I'm wrong). It probably only help if there is a C mcmc implementation linked to python (that you link

Re: [R] python

2009-11-21 Thread Barry Rowlingson
On Sat, Nov 21, 2009 at 2:29 PM, Jean Legeande jean.legea...@gmail.com wrote: Dear R users, I would like to make my R code for MCMC faster. It is possible to integrate C code into R but I think C is too complicated for me. I would need a C introduction only for MCMC and I do not know if such

Re: [R] Calculating the percentage of explained deviance in lmer

2009-11-21 Thread willow1980
Sorry for making a mistake! It should be, (m...@deviance[wrss]...@deviance[wrss])/m...@deviance[wrss] willow1980 wrote: Hi, Fabio, I only have an idea on how to calculate deviance explained by the fixed effects. If you remove fixed effects and introduce one null model such as

Re: [R] Need help for graphical representation

2009-11-21 Thread Juliet Hannah
Check out examples in the lattice package and ggplot2 package. For example let's say you plot points and confidence intervals. These packages will then allow you to plot these values by group and by combinations of groups. Look up conditioning and faceting in these packages. On Wed, Nov 18, 2009

Re: [R] Need help for graphical representation

2009-11-21 Thread Sunita Patil
Hello Thanks I will surely look into it Regards Our Thoughts have the Power to Change our Destiny. Sunita On Sat, Nov 21, 2009 at 9:22 PM, Juliet Hannah juliet.han...@gmail.comwrote: Check out examples in the lattice package and ggplot2 package. For example let's say you plot points and

[R] title problem

2009-11-21 Thread carol white
Hi, I got problem in using title function to create a title for multiple plots presented together by par. As can be seen in the attached file, the title is displayed truncated and the subtitle doesn't get displayed. Here is the code: par(mfrow = c(1,2)) plot(c(1,2,3), c(9,8,7))

Re: [R] title problem

2009-11-21 Thread Gary
Hi Carol, Try this par(oma=c(2,2,2,2)) par(mfrow = c(1,2)) plot(c(1,2,3), c(9,8,7)) plot(c(1,2,3), c(9,8,7)) title(main = Main title, sub =Sub title,outer = TRUE, cex.main=1.5, cex.sub = 1.5) par(oma=c(2,2,2,2)) -- can be used to define outline of the plot. Arguments here are for

Re: [R] title problem

2009-11-21 Thread David Winsemius
On Nov 21, 2009, at 11:39 AM, Gary wrote: Hi Carol, Try this par(oma=c(2,2,2,2)) par(mfrow = c(1,2)) plot(c(1,2,3), c(9,8,7)) plot(c(1,2,3), c(9,8,7)) title(main = Main title, sub =Sub title,outer = TRUE, cex.main=1.5, cex.sub = 1.5) I'm curious about what you are seeing with that

[R] chol( neg.def.matrix ) WAS: Re: Choleski and Choleski with pivoting of matrix fails

2009-11-21 Thread Charles C. Berry
On Sat, 21 Nov 2009, simona.racio...@libero.it wrote: Hi Everyone, I need to take the square root of the following matrix: [,1] [,2][,3] [1,] 0.5401984 -0.3998675 -1.3785897 [2,] -0.3998675 1.0561872 0.8158639 [3,] -1.3785897 0.8158639

Re: [R] python

2009-11-21 Thread Patrick Burns
One little thing that I think Barry meant to say. If the bottleneck is in your code, you may be able to improve the situation enough by merely rewriting the R code of your function. If that doesn't work, then you can move to C. Patrick Burns patr...@burns-stat.com +44 (0)20 8525 0696

Re: [R] title problem

2009-11-21 Thread carol white
subtitle still doesn't get displayed --- On Sat, 11/21/09, Gurmeet gurm...@email.unc.edu wrote: From: Gurmeet gurm...@email.unc.edu Subject: Re: [R] title problem To: carol white wht_...@yahoo.com Cc: r-help@r-project.org Date: Saturday, November 21, 2009, 8:30 AM Hi Carol, Try this  

Re: [R] title problem

2009-11-21 Thread Gary
You are right David/Carol. It seems outer=T does not work for Sub title. I'm not sure what Carol is looking for, but in case you need separate sub titles for each graph, then you may want to use more than one title statement. Like: par(oma=c(2,2,2,2)) par(mfrow = c(1,2)) plot(c(1,2,3), c(9,8,7))

Re: [R] title problem

2009-11-21 Thread carol white
Thanks Gary. No I want one subtitle for all plots below the main title. subtitle should work but if doesn't at the worst case I could do as follows: title(main = Main title\nSub title,outer = TRUE, cex.main=1.5,...) --- On Sat, 11/21/09, Gary mail2garymil...@gmail.com wrote: From: Gary

Re: [R] chol( neg.def.matrix ) WAS: Re: Choleski and Choleski with pivoting of matrix fails

2009-11-21 Thread Peter Dalgaard
Charles C. Berry wrote: On Sat, 21 Nov 2009, simona.racio...@libero.it wrote: Hi Everyone, I need to take the square root of the following matrix: [,1] [,2][,3] [1,] 0.5401984 -0.3998675 -1.3785897 [2,] -0.3998675 1.0561872 0.8158639 [3,]

Re: [R] title problem

2009-11-21 Thread Gabor Grothendieck
Try the line= argument on title() opar - par(oma = 4 * c(1, 1, 1, 1), no.readonly = TRUE) par(mfrow = 1:2) plot(1:3, 9:7) plot(1:3, 7:9) for(i in 1:3) title(main = i, line = i, outer = TRUE) par(opar) On Sat, Nov 21, 2009 at 12:47 PM, carol white wht_...@yahoo.com wrote: Thanks Gary. No I want

Re: [R] title problem

2009-11-21 Thread David Winsemius
On Nov 21, 2009, at 12:57 PM, Gabor Grothendieck wrote: Try the line= argument on title() opar - par(oma = 4 * c(1, 1, 1, 1), no.readonly = TRUE) par(mfrow = 1:2) plot(1:3, 9:7) plot(1:3, 7:9) for(i in 1:3) title(main = i, line = i, outer = TRUE) par(opar) I was not sure what Carol was

[R] Fw: Re: title problem

2009-11-21 Thread carol white
It seems that there is a problem in displaying subtitle in general, independently from multi-plot display. when I do plot (c(1,2,3), c(9,8,7), type = l) title(main = Main title, sub =Sub title,cex.main=2, cex.sub = 2) subtitle doesn't get displayed --- On Sat, 11/21/09, David

Re: [R] python

2009-11-21 Thread Jean Legeande
Thank you Paul, Barry and Patrick. I will do what you recommand (the profiling). I have heard several times that for example Matlab would be faster than R... This is why I thought of switching to Python, though it is also interpreted. I thought it would be faster. Best, Jean 2009/11/21 Patrick

Re: [R] EBImage do not read an Image: requested image not found or could not be loaded

2009-11-21 Thread Uwe Ligges
Cleber Borges wrote: Hello all, I am trying to use the EBImage package, (EBImage 3.2.0 and ImageMagick 6.5.7-9 2009-11-19 Q8 (dinamic linked) with R 2.10.0 winXP) but I get the following error: #- library(EBImage) Loading required package:

Re: [R] title problem

2009-11-21 Thread Gary
I think Gabor suggestion works. Adding line= option in title makes it work. Here is a little modification of what Gabor suggested, Carol you may try this code: par(oma=c(3,1,4,1)) par(mfrow = c(1,2)) plot(c(1,2,3), c(9,8,7)) plot(c(1,2,3), c(9,8,7)) title(main = Main title line1\nMain title

Re: [R] Fw: Re: title problem

2009-11-21 Thread Gabor Grothendieck
Your code works for me on Windows Vista using R version 2.10.0 Patched (2009-11-16 r50456) Try it starting from a fresh session. On Sat, Nov 21, 2009 at 1:19 PM, carol white wht_...@yahoo.com wrote:  It seems that there is a problem in  displaying subtitle in general, independently from  

Re: [R] Fw: Re: title problem

2009-11-21 Thread Uwe Ligges
carol white wrote: It seems that there is a problem in displaying subtitle in general, independently from multi-plot display. when I do plot (c(1,2,3), c(9,8,7), type = l) title(main = Main title, sub =Sub title,cex.main=2, cex.sub = 2) You do not know that you have to look at the

Re: [R] title problem

2009-11-21 Thread David Winsemius
On Nov 21, 2009, at 1:19 PM, Gary wrote: I think Gabor suggestion works. Adding line= option in title makes it work. Here is a little modification of what Gabor suggested, Carol you may try this code: par(oma=c(3,1,4,1)) par(mfrow = c(1,2)) plot(c(1,2,3), c(9,8,7)) plot(c(1,2,3),

Re: [R] python

2009-11-21 Thread Whit Armstrong
We have been using pymc as an alternative to WinBUGS, and have been very pleased with it. I've begun working on an R2Pymc package, but don't have anything ready for sharing yet. Here's the pymc page: http://code.google.com/p/pymc/ and the repo is here: http://github.com/pymc-devs/pymc I've

Re: [R] EBImage do not read an Image: requested image not found or could not be loaded

2009-11-21 Thread Cleber Borges
Thanks Uwe for your reply. I can open the lena-color.png file with several programs: firefox, M$ Picture Manager, IMDisplay (GUI of ImageMagick) I converted lena-color.png in lena2.jpeg using M$ Picture Manager. With a old version of rimage package, I can read JPEG files (only) with

[R] Export to SPSS without truncating variable names

2009-11-21 Thread dadrivr
I am trying to export a data frame to SPSS. I am using write.foreign to export the .txt data file and the .sps SPSS syntax file to read the .txt file into SPSS. I am running into problems because my data set includes variable names that are longer than 8 characters, and the write.foreign

[R] how to ignore NA when using cumsum?

2009-11-21 Thread Tracy Bowerman
I would like to cumulatively sum rows in a matrix, in which each row has 1 NA value. The usual na.rm=TRUE does not seem to work with the command cumsum. Is there another way to ignore the NAs or do I need to figure out a different way to do this? Here's an example matrix of title proportion:

Re: [R] title problem

2009-11-21 Thread Gurmeet
Hi Carol, Try this par(oma=c(2,2,2,2)) par(mfrow = c(1,2)) plot(c(1,2,3), c(9,8,7)) plot(c(1,2,3), c(9,8,7)) title(main = Main title, sub =Sub title,outer = TRUE, cex.main=1.5, cex.sub = 1.5) par(oma=c(2,2,2,2)) -- can be used to define outline of the plot. Arguments here are for

[R] consecutive numbering of elements in a matrix

2009-11-21 Thread Jim Bouldin
Within a very large matrix composed of a mix of values and NAs, e.g, matrix A: [,1] [,2] [,3] [1,]1 NA NA [2,]3 NA NA [3,]3 10 17 [4,]4 12 18 [5,]6 16 19 [6,]6 22 20 [7,]5 11 NA I need to be able to consecutively number, in new

Re: [R] Problem with Numerical derivatives (numDeriv) and mvtnorm

2009-11-21 Thread SL
Thanks for you comment. There is certainly some Monte Carlo sampling involved in mvtnorm but why derivatives could not be computed? In theory, the derivatives exist (eg. bivariate probit). Moreover, when used with optim, there are some numerical derivatives computed... does it mean that mvtnorm

[R] BMA package MC3.REG question

2009-11-21 Thread solaris
Hi guys, would like to ask a question about mc3.reg, I am new to R however I have spent many hours understanding and getting all other functions to work except this one. I am running mc3.reg and after getting the results would like to do 2 things that are definitely possible, and managed to do

Re: [R] consecutive numbering of elements in a matrix

2009-11-21 Thread Dimitris Rizopoulos
if I understand what you want correctly, then one approach is: A - matrix(sample(50, 21), 7, 3) A[sample(21, 5)] - NA A row(A) - apply(is.na(A), 2, cumsum) I hope it helps. Best, Dimitris Jim Bouldin wrote: Within a very large matrix composed of a mix of values and NAs, e.g, matrix A:

[R] 3-D Plotting of predictions from GAM/GAMM object

2009-11-21 Thread Paul Simonin
Hello all, Thank you for the previous assistance I received from this listserve! My current question is: How can I create an appropriate matrix of values from a GAM (actually a GAMM) to make a 3-D plot? This model is fit as a tensor product spline of two predictors and I have used it to make

Re: [R] how to ignore NA when using cumsum?

2009-11-21 Thread Ista Zahn
Hi Tracy, What do you want the program to do with the missing values? If you want to treat them as zeros, you could use cum.na - function(x) { x[which(is.na(x))] - 0 return(cumsum(x)) } cumsums - apply(proportion, 1, cum.na) -Ista On Sat, Nov 21, 2009 at 2:34 PM, Tracy Bowerman

[R] how to ignore NA when using cumsum WHILE retaining NAs?

2009-11-21 Thread Tracy Bowerman
I would like to cumulatively sum rows in a matrix, in which each row has 1 NA value, which I do NOT want to treat as 0s. The NAs are placeholders where there is actually no data, which is not the same as a 0. The usual na.rm=TRUE does not seem to work with the command cumsum. Is there another

Re: [R] consecutive numbering of elements in a matrix

2009-11-21 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Jim Bouldin Sent: Saturday, November 21, 2009 10:34 AM To: r-help@r-project.org Subject: [R] consecutive numbering of elements in a matrix Within a very large matrix

Re: [R] 3-D Plotting of predictions from GAM/GAMM object

2009-11-21 Thread Duncan Murdoch
On 21/11/2009 3:11 PM, Paul Simonin wrote: Hello all, Thank you for the previous assistance I received from this listserve! My current question is: How can I create an appropriate matrix of values from a GAM (actually a GAMM) to make a 3-D plot? This model is fit as a tensor product spline

Re: [R] how to ignore NA when using cumsum WHILE retaining NAs?

2009-11-21 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Tracy Bowerman Sent: Saturday, November 21, 2009 12:19 PM To: r-help Subject: [R] how to ignore NA when using cumsum WHILE retaining NAs? I would like to cumulatively sum rows

Re: [R] consecutive numbering of elements in a matrix

2009-11-21 Thread David Winsemius
On Nov 21, 2009, at 3:25 PM, William Dunlap wrote: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Jim Bouldin Sent: Saturday, November 21, 2009 10:34 AM To: r-help@r-project.org Subject: [R] consecutive numbering of elements in

Re: [R] how to ignore NA when using cumsum?

2009-11-21 Thread Henrique Dallazuanna
Try this: apply(proportion, 1, function(x)cumsum(na.exclude(x))) On Sat, Nov 21, 2009 at 5:34 PM, Tracy Bowerman tracy.bower...@aggiemail.usu.edu wrote: I would like to cumulatively sum rows in a matrix, in which each row has 1 NA value.  The usual na.rm=TRUE does not seem to work with the

Re: [R] consecutive numbering of elements in a matrix

2009-11-21 Thread Jim Bouldin
Thank you and apologies--I did not make it clear that there are no NAs mixed in with the valid values. Rather, they all occur consecutively, either toward the beginning of end of the column. Jim I didn't know what you wanted to do if there were NA's in the middle of a column. Bill Dunlap

[R] changing plot symbol and/or size in plot(cox.zph)

2009-11-21 Thread cryan
Is there a way to make the plot(cox.zph(model)) use some other symbol than open circles? plot(cox.zph(model), pch=whatever) seems to have no effect. Thanks. --Chris Ryan __ R-help@r-project.org mailing list

Re: [R] python

2009-11-21 Thread Jean Legeande
Thank you Whit. So you have experience with both R and Python ? How do they compare ? Best, Jean 2009/11/21 Whit Armstrong armstrong.w...@gmail.com We have been using pymc as an alternative to WinBUGS, and have been very pleased with it. I've begun working on an R2Pymc package, but don't

Re: [R] optim(.. ,SANN,..)

2009-11-21 Thread Nikhil Kaza
I think the issue is in the function fr, ?apply apply returns a vector or array or list of values So if the inner apply returns a list (this happens when different number of elements in y are positive in different rows) then outer apply cannot coerce it into the correct format to apply the

Re: [R] python

2009-11-21 Thread Stefan Evert
My hunch is that Python and R run at about the same speed, and both use C libraries for speedups (Python primarily via the numpy package). That's not necessarily true. There can be enormous differences between interpreted languages, and R appears to be a particularly slow one (which

Re: [R] changing plot symbol and/or size in plot(cox.zph)

2009-11-21 Thread David Winsemius
On Nov 21, 2009, at 4:28 PM, cr...@binghamton.edu wrote: Is there a way to make the plot(cox.zph(model)) use some other symbol than open circles? Yes, but after looking at the code, the points call does not have trailing ... so, not without modifying the function: library(survival)

Re: [R] title problem

2009-11-21 Thread Peter Ehlers
David Winsemius wrote: On Nov 21, 2009, at 1:19 PM, Gary wrote: I think Gabor suggestion works. Adding line= option in title makes it work. Here is a little modification of what Gabor suggested, Carol you may try this code: par(oma=c(3,1,4,1)) par(mfrow = c(1,2)) plot(c(1,2,3), c(9,8,7))

[R] MASS loading error

2009-11-21 Thread Erin Hodgess
Dear R People: I just installed R-2.10.0 on Karmic Koala Ubuntu, via the sudo apt-get install r-base, etc. However, when I try to install an Rcmdr Plugin package, I get the following: install.packages(RcmdrPlugin.qual,depen=TRUE) Warning in install.packages(RcmdrPlugin.qual, depen = TRUE) :

[R] Help with indexing

2009-11-21 Thread Dana Sevak
Dear R Helpers, I am missing something very elementary here, and I don't seem to get it from the help pages of the ave, seq and seq_along functions, so I wonder if you could offer a quick help. To use an example from an earlier post on this list, I have a dataframe of this kind: dat =

Re: [R] Help with indexing

2009-11-21 Thread jim holtman
try this: # create a factor and then convert back to numeric x$nb - as.integer(factor(x$name, levels=unique(x$name))) + 99 x name freq nb 1 Mary1 100 2 Mary2 100 3 Mary3 100 4 Sam1 101 5 Sam2 101 6 John1 102 7 John2 102 8 John3 102 9 John4 102 On Sat,

Re: [R] Help with indexing

2009-11-21 Thread William Dunlap
Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Dana Sevak Sent: Saturday, November 21, 2009 4:00 PM To: r-help@r-project.org Subject: [R] Help with indexing Dear

Re: [R] python

2009-11-21 Thread Jean Legeande
Thank you Stefan. That's really interesting. My guess is that Python is not much more complicated to program than R, and that we can integrate some codes into R. If it can be 10 times faster, that's great ! Best, Jean 2009/11/21 Stefan Evert stefan.ev...@uos.de My hunch is that Python and R

[R] how to read BRFSS file

2009-11-21 Thread chloe yoon
hello, I am trying to do exploratory factor analysis with BRFSS dataset ( http://www.cdc.gov/brfss/technical_infodata/surveydata/2008.htm) for a couple of days, but I was not able to do that and got frustrated. Can anybody help me with step by step guide? BRFSS dataset provides ASCII or SAS

Re: [R] python

2009-11-21 Thread Gabor Grothendieck
There is work going on on two byte compilers for R: http://www.stat.uiowa.edu/~luke/R/compiler/ http://www.milbo.users.sonic.net/ra You could check whether running under either of those speeds up your R code sufficiently that you don't need to rewrite it. On Sat, Nov 21, 2009 at 9:29 AM, Jean

Re: [R] Problem with Numerical derivatives (numDeriv) and mvtnorm

2009-11-21 Thread Ravi Varadhan
Go back to your calculus text and review the definition of derivative: f'(x) = lim h - 0 [f(x+h) - f(x)] / h when f(x) and f(x + h) are random variables, the above limit does not exist. In fact, f'(x) is also a random variable. Now, if you want the derivative you have to use a multivariate

[R] glmmPQL random effects model

2009-11-21 Thread dm dm
Dear R-helpers, I'd like to use glmmPQL to predict binary responses based on a data.frame data1 containing N entries (N1000): target covariate1 covariate2 covariate3 ...covariateM cluster 1341311 -0.30031885 0 0-2.886870e-07 1 38370

Re: [R] how to read BRFSS file

2009-11-21 Thread jim holtman
Exactly what have you tried and what did not work? I downloaded the '.asc' (text) version of the data and it appears to be fixed format with 1294 characters per line; there are about 414K lines of data in the file. How much of the data do you need to extract? You can read in a portion of the

[R] How to reproduce heatmap.2()'s result?

2009-11-21 Thread Peng Yu
I want to understand what heatmap.2() is exactly doing. So I tried the following program. But the results by image() is still not the same as the result by heatmap.2(). Could somebody let me know how to make both results the same (in terms of the x and y axis label orders)?

Re: [R] how to read BRFSS file

2009-11-21 Thread David Winsemius
On Nov 21, 2009, at 7:58 PM, chloe yoon wrote: hello, I am trying to do exploratory factor analysis with BRFSS dataset ( http://www.cdc.gov/brfss/technical_infodata/surveydata/2008.htm) for a couple of days, but I was not able to do that and got frustrated. Can anybody help me with step by

[R] Sample size calculation for paired proportion testing?

2009-11-21 Thread xiaojun ma
I would appreciate any help on this problem. I need to perform a sample size analysis for a study comparing the performances of 2 different methods of diagnostic classification. Assume that method 1 has an accuracy of p1 against known truths (a reference classification, as multiple categories),

[R] Input file format to Anova from car package

2009-11-21 Thread Marcelo Laia
Dear list member, My question is related to input file format to an Anova from car package. Here is an example of what I did: My file format is like this (and I dislike the idea that I will need to recode it): Hormone day Block Treatment Plant Diameter High N.Leaves SH 23 1 1 1 3.19 25.3 2 SH

Re: [R] how to read BRFSS file

2009-11-21 Thread David Winsemius
On Nov 21, 2009, at 8:41 PM, David Winsemius wrote: On Nov 21, 2009, at 7:58 PM, chloe yoon wrote: hello, I am trying to do exploratory factor analysis with BRFSS dataset ( http://www.cdc.gov/brfss/technical_infodata/surveydata/2008.htm) for a couple of days, but I was not able to do

[R] what do i do to fix missing packages...see error

2009-11-21 Thread frenchcr
exampledata - rnorm(1) summary(exampledata) Min. 1st Qu.Median Mean 3rd Qu. Max. -4.03 -0.666200 -0.023390 -0.009384 0.664700 4.092000 desc - function(mydata) { +require(e1071) +quantls - quantile(x=mydata, probs=seq(from=0, to=1, by=0.25)) +

[R] How to trim the front of a string?

2009-11-21 Thread rok90
Hey everybody! I have a problem with triming a string. I can get rid of the blank space in front and at the back of a string and even trim a string at the back. But I don't know how to do it in the front. For Example: I have a string Blackberry and i want to delete the first 5 characters to get

[R] other decriptive stats packages

2009-11-21 Thread frenchcr
i just found the following list, i wondered if anybody could add to this as i have to characterize a large data set and am new to R...the list below was so helpfulcan you add to this??? Just to forestall confusion amongst those who would like to use one of the functions called describe...

[R] GAM plots

2009-11-21 Thread Joe Trubisz
Hello all... I'm attempting to write my own GAM plot function, so I can overlay it on top of an already existing plot. Problem is that after I do the gam, e.g. m-gam(...), I cannot match the graph that gam.plot outputs when I attempt to plot the values from m$residuals,

[R] how to tell if its better to standardize your data matrix first when you do principal

2009-11-21 Thread masterinex
Hi guys , Im trying to do principal component analysis in R . There is 2 ways of doing it , I believe. One is doing principal component analysis right away the other way is standardizing the matrix first using s = scale(m)and then apply principal component analysis. How do I tell what

Re: [R] EBImage do not read an Image: requested image not found or could not be loaded --- RESOLUTION

2009-11-21 Thread Cleber Borges
Hi, with intention of to make register of a workaround... I uninstalled the ImageMagick Q8 and installed a Q16 version and works fine! :-) example(EBImage) run for every demos!!! Thanks Cleber N. Borges C:\Documents and Settings\Cleberconvert -version Version: ImageMagick 6.5.7-9

Re: [R] Input file format to Anova from car package

2009-11-21 Thread Peter Ehlers
Marcelo Laia wrote: Dear list member, My question is related to input file format to an Anova from car package. Here is an example of what I did: My file format is like this (and I dislike the idea that I will need to recode it): Hormone day Block Treatment Plant Diameter High N.Leaves SH

Re: [R] what do i do to fix missing packages...see error

2009-11-21 Thread Peter Ehlers
You need to install pkg e1071. Surely the phrase there is no package called 'e1071' is a pretty strong clue. -Peter Ehlers frenchcr wrote: exampledata - rnorm(1) summary(exampledata) Min. 1st Qu.Median Mean 3rd Qu. Max. -4.03 -0.666200 -0.023390 -0.009384

Re: [R] Input file format to Anova from car package

2009-11-21 Thread Peter Ehlers
Sorry, minor fix at end. Peter Ehlers wrote: Marcelo Laia wrote: Dear list member, My question is related to input file format to an Anova from car package. Here is an example of what I did: My file format is like this (and I dislike the idea that I will need to recode it): Hormone day

[R] Metaplot Axis Annotation

2009-11-21 Thread Ishwar Bridgelal
Hello, We are looking to adjust the font size of the axis annotation on the graph that results from use of the metaplot() function. Metaplot seems to respond to cex and cex.lab to change those graphical parameters, but it doesn't respond to cex.axis. Is there a way to work around this by creating

[R] Adding columns to lower level of list

2009-11-21 Thread Tim Clark
Dear List, I have very little experience with lists and am having some very basic problems. I don't know how to add columns to the lower levels of a list, or how to take something from the upper level and add it as a column to the lower level. I am analyzing animal movement data in the

Re: [R] How to trim the front of a string?

2009-11-21 Thread Jorge Ivan Velez
Hi Ivansek, Here is a suggestion using substr(): x - 'Blackberry' substr(x, 6, nchar(x)) [1] berry HTH, Jorge On Sat, Nov 21, 2009 at 4:05 PM, rok90 wrote: Hey everybody! I have a problem with triming a string. I can get rid of the blank space in front and at the back of a string and

Re: [R] How to trim the front of a string?

2009-11-21 Thread Gabor Grothendieck
Here are three ways: substring(blackberry, 6) [1] berry sub(^black, , blackberry) [1] berry sub(.{5}, , blackberry) [1] berry On Sat, Nov 21, 2009 at 4:05 PM, rok90 ivansek.lab...@gmail.com wrote: Hey everybody! I have a problem with triming a string. I can get rid of the blank space in

[R] Over-coloring facets on persp() plot

2009-11-21 Thread Marc Chiarini (Tufts)
Dear R Community: Recently, I have managed to plot some really useful graphs of my research data using persp(). I have even figured out how to overplot rectangular regions (corresponding to submatrices) with a different color. This is accomplished by using par(new=T). I am now searching