Re: [R] glm output format

2010-06-05 Thread Allan Engelhardt
Look at help(tryCatch) and help(try). Hope this helps a little Allan On 05/06/10 04:21, Bojuan Zhao wrote: Hello, I am running a loop to compare some residual deviances obtained from glm, with codes: OUT-NULL for (i in 1:10){ myglm-glm(mat ~X1+X2+X3,family = binomial, data

[R] rgl installation failure

2010-06-05 Thread khush ........
Hello, I am trying to install rgl package under R and getting some errors which is below. install.packages(rgl) Warning in install.packages(rgl) : argument 'lib' is missing: using '/usr/lib/R/library' trying URL 'http://cran.csie.ntu.edu.tw/src/contrib/rgl_0.91.tar.gz' Content type

Re: [R] rgl installation failure

2010-06-05 Thread Berwin A Turlach
G'day, On Sat, 5 Jun 2010 12:51:08 +0530 khush bioinfo.kh...@gmail.com wrote: I am trying to install rgl package under R and getting some errors which is below. install.packages(rgl) Warning in install.packages(rgl) : argument 'lib' is missing: using '/usr/lib/R/library'

Re: [R] rgl installation failure

2010-06-05 Thread khush ........
Hi, Thanks Berwin for your suggestions , sorry to mention but it was fedora 12 OS that I am using. Actually I was missing libraries png which I installed using yum and it work good now. Earlier png.h was missing in /usr/includes/ but its is showing . Thanks alot for your kind help. Cheers

[R] Greek letters and formatted text

2010-06-05 Thread Thomas Bschorr
Hi, I desperately try to do s.th. like m=1.23455 sig=0.84321 plot(1,1) text(0.8,1,sprintf(Sigma=%1.2f±%1.2f,m,sig)) where actually the greek letter should appear for Sigma. I have tried all sorts of combinations with expression and paste etc. but could not work it out. Maybe someone has an

Re: [R] plotting a dataset with median 0

2010-06-05 Thread Jim Lemon
On 06/05/2010 07:35 AM, Georg Ehret wrote: Dear R community, I am working on a dataset that has median 0 (due to many 0 entries) for my principal variable of interest (40 entries in total). I would like to plot a graph of this variable to show it visually, but have a hard time: boxplots

[R] variation

2010-06-05 Thread Adel ESSAFI
Hi list I am a new user of R. I ask for some beginner question I am searching if there is any function that computes the variation of some discrete values of a vector (mean() and sd() exists, but i have not find variation). Thanks in advance Adel -- PhD candidate in Computer Science Address

Re: [R] Greek letters and formatted text

2010-06-05 Thread baptiste auguie
Try text(0.8,1,bquote(*sigma*==.(round(m,2))*±*.(round(sig,2 ?bquote ?plotmath On 5 June 2010 11:36, Thomas Bschorr bsch...@phys.ethz.ch wrote: Hi, I desperately try to do s.th. like m=1.23455 sig=0.84321 plot(1,1) text(0.8,1,sprintf(Sigma=%1.2f±%1.2f,m,sig)) where actually the

Re: [R] How to make R automatic?

2010-06-05 Thread zhangted001
Thank you all for the information! That is exactly what I was looking for. -- View this message in context: http://r.789695.n4.nabble.com/How-to-make-R-automatic-tp2238541p2244132.html Sent from the R help mailing list archive at Nabble.com. __

[R] exporting the whole output

2010-06-05 Thread suman dhara
Sir, I want to export the whole result generated by lda function.I have used the following R-code.But, it is not working.Can you help me? a-lda(y~.,data=data) write.table(a,file=G:/a.csv,sep=,) Regards, Suman Dhara [[alternative HTML version deleted]]

Re: [R] strange behaviour of CairoPNG

2010-06-05 Thread Thomas Steiner
OK, no reply. :-( I'm more offensive: this is a bug! the font-parameter of the text fucntion does not work properly in the Cairo-package thomas 2010/6/4 Thomas Steiner finbref.2...@gmail.com: Hi, could it be that the text() fuction gives different output for normal png() and CarioPNG()? See

Re: [R] exporting the whole output

2010-06-05 Thread Jim Lemon
On 06/05/2010 07:31 PM, suman dhara wrote: Sir, I want to export the whole result generated by lda function.I have used the following R-code.But, it is not working.Can you help me? a-lda(y~.,data=data) write.table(a,file=G:/a.csv,sep=,) Hi Suman, Try this: library(prettyR)

Re: [R] Wrong symbol rendering in plots (Ubuntu)

2010-06-05 Thread Yvonnick NOEL
Hello, I have the very same problem. Plotting code that used to work before I upgraded to Ubuntu Lucid Lynx does not work anymore. For example: plot(1:10) text(6,4,expression(pi)) The 'pi' greek letter appear as a \neq (different from symbol). Yvonnick Noel

[R] Fwd: How to make R automatic?

2010-06-05 Thread Adel ESSAFI
-- Forwarded message -- From: Adel ESSAFI adel.s...@imag.fr Date: 2010/6/5 Subject: Re: [R] How to make R automatic? To: zhangted001 zhen...@gmail.com Well, I am new but i will give you an example of script that I run cat exec2.sh R --no-saveEOF fl=list.files(pattern=*.dat)

Re: [R] variation

2010-06-05 Thread Jannis
What exactly do you mean by variation? As I understand it, this term is a broad term for all kinds of different spread measures (like quantile range or standard deviation). Do you mean the Coefficient of Variation? If you found out how to compute the mean and the std.dev., it is

Re: [R] text with greek letters

2010-06-05 Thread Jannis
try help(plotmath) help(expression) Thomas Bschorr schrieb: Hi, I am having troubles in putting greek letters and formatted text in a plot m=1.43432 sig=0.124333 text(10.5,0.07,sprintf(Sigma=%1.2f±%1.2f,m,sig)) I would like to have the greek letter Sigma followed by the formatted numeric

Re: [R] tapply help

2010-06-05 Thread jim holtman
It this what you are looking for: set.seed(1) # create range for each possible class # 'name' the values so you can use them in the 'sapply' function lows-c(a=1, b=2, c=3, d=4, e=5) highs-c(a=5, b=6, c=7, d=8, e=9) # data values vals-sample(1:10,100,replace=T) #classes

Re: [R] variation

2010-06-05 Thread Adel ESSAFI
2010/6/5 Jannis bt_jan...@yahoo.de What exactly do you mean by variation? As I understand it, this term is a broad term for all kinds of different spread measures (like quantile range or standard deviation). Do you mean the Coefficient of Variation? If you found out how to Yes, that what I

Re: [R] variation

2010-06-05 Thread Adel ESSAFI
2010/6/5 Adel ESSAFI adel.s...@imag.fr 2010/6/5 Jannis bt_jan...@yahoo.de What exactly do you mean by variation? As I understand it, this term is a broad term for all kinds of different spread measures (like quantile range or standard deviation). Do you mean the Coefficient of Variation?

Re: [R] strange behaviour of CairoPNG

2010-06-05 Thread Henrik Bengtsson
FYI, follow the information in the email footer: PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and make sure at a minimum to report your sessionInfo(). That increases your chances to get a response. /Henrik On Sat, Jun 5, 2010 at 11:42 AM, Thomas Steiner

Re: [R] variation

2010-06-05 Thread Jannis
As far as I know there is no such function (i could be wrong here!). The reason for that might be that it is so straightforward to calculate it as the ratio of sd() and mean()for similar reasons there is most probably no function for the variance (and only one for std.dev)I would think

Re: [R] variation

2010-06-05 Thread Jannis
Sorry, my remark about the variance and standard deviation was nonsense! There are functions for both measures in R! Jannis Jannis schrieb: As far as I know there is no such function (i could be wrong here!). The reason for that might be that it is so straightforward to calculate it as the

Re: [R] General-purpose GPU computing in statistics (using R)

2010-06-05 Thread Ravi Varadhan
Dear Professor Ripley, Thank you very much for your lucid and useful reply. I really appreciate your perspectives on this. I have one follow-up question. Could you please explain the meaning of the statement that the algorithms would need to exploit multi-core CPUs differently than they

Re: [R] Your message to R-help awaits moderator approval

2010-06-05 Thread Duncan Murdoch
Gabor Grothendieck wrote: This has happened to me too. The last time it occurred I was replying to another post and on my second attempt I deleted the replied-to portion and reposted just my portion and it worked. On Fri, Jun 4, 2010 at 4:35 PM, yjmha69 yjmh...@yahoo.com wrote: What filter

Re: [R] plotting a dataset with median 0

2010-06-05 Thread Georg Ehret
Thank you, this is partially hepful Jim, my data are in 3 categories on the x-axis. Does anyone know of a method of plotting values identical on the y-axis distributed (adjacent to each other - piled up) on the x-axis? Thank you to all, best regards, Georg.

[R] Factor to variable

2010-06-05 Thread bjlwilkinson
I have a data frame called z that includes four columns: Col1 Col2 Col3 Col4 Text1 Text2 X0.1 5 Text1 Text2 X0.2 10 Text1 Text2 X0.3 15 Text1 Text3 X0.1 5 Text1 Text3 X0.2 10 Text1 Text3 X0.3 15 I am trying to convert the 3rd column to the numeric value excluding the X so that I can produce a

Re: [R] Write.fwf works from Mac, throws different number of row error in Windows

2010-06-05 Thread Duncan Murdoch
You need to give us something reproducible or we won't likely be able to help you. Put together a small example that illustrates the problem, and it will likely be fixed pretty quickly, or your error will be pointed out. (You need to give us a way to construct outframe, we don't have it.)

Re: [R] Your message to R-help awaits moderator approval

2010-06-05 Thread Gabor Grothendieck
On Sat, Jun 5, 2010 at 10:01 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: Gabor Grothendieck wrote: This has happened to me too.  The last time it occurred I was replying to another post and on my second attempt I deleted the replied-to portion and reposted just my portion and it

Re: [R] Factor to variable

2010-06-05 Thread Phil Spector
Try z$Col3 = as.numeric(sub('^X','',as.character(z$Col3))) - Phil Spector Statistical Computing Facility Department of Statistics

[R] Help on ARFIMA modeling

2010-06-05 Thread ERIC AIDOO
Dear R Users, Please I have applied the arfima procedure in the forecast package to my time series data named x as shown below but it does not work well for me fit - arfima(x) [[alternative HTML version deleted]] __ R-help@r-project.org

[R] Help on Multiple Structural break unit root test

2010-06-05 Thread ERIC AIDOO
Help. Please am search for R package that will enable me to perform Lumsdain and Papell unit root test with multiple structural break or minimum LM unit root test with multiple structural break thank you [[alternative HTML version deleted]] __

Re: [R] lattice::panel.levelplot.raster too picky with unequal spacing

2010-06-05 Thread baptiste auguie
Hi again, Another thought on this new function. Would it be possible to adapt the colour scale in the legend to use grid.raster as well, so that when the panel performs a smooth interpolation the legend also does the same? It's particularly clear when saving as a pdf, where viewer artifacts

[R] (no subject)

2010-06-05 Thread cahyo kristiono
Dear Sirs   First herewith I'll introduce myself. My name is Kristiono, I want ask you to help me how to get  ZINB (Zero Inflated Negative Binomial) regression modeling step by step. Anyway, I get some trouble to get step by step about 1.    How to get the log likelihood function of ZINB (step

[R] Factor to variable

2010-06-05 Thread bjlwilkinson
I have a data frame called z that includes four columns: Col1 Col2 Col3 Col4 Text1 Text2 X0.1 5 Text1 Text2 X0.2 10 Text1 Text2 X0.3 15 Text1 Text3 X0.1 5 Text1 Text3 X0.2 10 Text1 Text3 X0.3 15 I am trying to convert the 3rd column to the numeric value excluding the X so that I can produce a

[R] how to use 'points' function to plot two curves with errbar

2010-06-05 Thread Yogesh Tiwari
Dear R Users, I am using R on windows. how to use 'points' function to plot two curves with errbar I am doing like: x.val - as.integer(names(co2mean)) errbar(x.val, co2mean, co2mean + co2sd, co2mean - co2sd, xaxt='n', col=1, xlab=NA,ylab=NA)# obs error bar lines(x.val, co2mean, col=1, lwd=2)

[R] Building a package using classes

2010-06-05 Thread Sébastien Durand
Hello, I am looking for an efficient and complete free tutorial to learn how to properly use, create and manage classes and their methods. I have build few R packages in the past but I was not going very far in class definition and so forth. So I wish to drastically improve my coding skills in

Re: [R] fixed intercept

2010-06-05 Thread dwinsemius
?offset ?formula On Jun 4, 2010, at 4:53 PM, array chip wrote: Hi, is it possible to specify a constant intercept (based on prior knowledge) in linear regression using lm()? Thanks John __ R-help@r-project.org mailing list

[R] R2HTML problem

2010-06-05 Thread RGtk2User
Im developing an application with R and Gtk+. It's just a simple GUI which helps new users to interactuate with R. Thing is, when you do a statistical analysis, I also want to provide a HTML report, but HTMLStart doesnt work propperly when executing from TinnR. It does create the file but not

[R] selecting only specific rows in R

2010-06-05 Thread Adrienne Keller
Hi, I have a data frame with columns as follows: tree species (independent variable) and several dependent variables (e.g. carbon, nitrogen, phosphorus). Each row represents one tree sample. Some tree samples are unique species in the data frame while other species were replicated (i.e.

[R] apply min function rowwise

2010-06-05 Thread moleps
I´m trying to tease out the minimum value from a row in a dataframe where all the variables are dates. apply(canc[,vec],1,function(x)min(x,na.rm=T)) However it only returns empty strings for the entire dataframe except for one date value (which is not the minimum date). I´ve also tried

Re: [R] plotting a dataset with median 0

2010-06-05 Thread Marc Schwartz
On Jun 5, 2010, at 9:08 AM, Georg Ehret wrote: Thank you, this is partially hepful Jim, my data are in 3 categories on the x-axis. Does anyone know of a method of plotting values identical on the y-axis distributed (adjacent to each other - piled up) on the x-axis? On Sat, Jun 5, 2010 at

Re: [R] apply min function rowwise

2010-06-05 Thread Joshua Wiley
Hello M, My guess is that it has something to do with the class of the variables. Perhaps you could provide a small sample dataframe? Also you might try running str() on your data frame and seeing if the results are what you would expect. As a side note, it is not necessary to make an

Re: [R] Factor to variable

2010-06-05 Thread Pete B
Hi How about ... # Data lines = Col1 Col2 Col3 Col4 Text1 Text2 X0.1 5 Text1 Text2 X0.2 10 Text1 Text2 X0.3 15 Text1 Text3 X0.1 5 Text1 Text3 X0.2 10 Text1 Text3 X0.3 15 # Create Dataframe DF - read.table(textConnection(lines), header = TRUE, check.names = FALSE) # Create Numeric Variable

Re: [R] Building a package using classes

2010-06-05 Thread Bryan Hanson
Sébastien, late last year I found myself in the same situation, and asked a question or two about classes, which produced some very helpful answers. The thread starts here: http://r.789695.n4.nabble.com/Need-Advice-Considering-Converting-a-Package-f rom-S3-to-S4-td898853.html#a898853 Good Luck,

Re: [R] StatET plot problem

2010-06-05 Thread Bunny, lautloscrew.com
Philippe, now I tried to run the SciViews-K / Komodo combo on my Mac. It did work and I like it. Thx for your suggestion. On first sight everything works really well. The only thing that bothers me a little bit, is that I was only able to run it with the directly in terminal option.

Re: [R] selecting only specific rows in R

2010-06-05 Thread stephen sefick
Reproducible dummy example, as to the posting guide. look at unique- you want to subset the data frame on all of the non-unique entries in the species column... x[x!=unique(x[,species]),] Something like that, maybe. If I had some data then I could probably figure it out. Use dput() or fake

Re: [R] selecting only specific rows in R

2010-06-05 Thread Charles C. Berry
On Sat, 5 Jun 2010, stephen sefick wrote: Reproducible dummy example, as to the posting guide. look at unique- you want to subset the data frame on all of the non-unique entries in the species column... x[x!=unique(x[,species]),] Something like that, maybe. If I had some data then I could

Re: [R] SciViews-K / Komodo as editor on the Mac [was: StatET plot problem]

2010-06-05 Thread Philippe Grosjean
Matt, Yes, I see this problem. Thanks for report. Also ??topic is wrong. Note two points: 1) ?topic works with R.app/R64.app. So, just in case you would consider using R.app instead of R inside a terminal session, 2) I have not noticed this bug because using ?topic inside SciViews-K /

Re: [R] how to use 'points' function to plot two curves with errbar

2010-06-05 Thread John Kane
The first thing we need to know is what errbar are you using? There are at least two, on in the Hmisc package and one in sfsmisc. PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained,reproducible code. I'm not sure what

Re: [R] apply min function rowwise

2010-06-05 Thread Joshua Wiley
On Sat, Jun 5, 2010 at 10:22 AM, moleps mole...@gmail.com wrote: thx. It was only the first instance that was class date. The rest were factors. So that explains it. If I want to change the rest in vec into class date (there are many of them...) neither  as.Date(canc[,vec],%d.%m.%Y) or

[R] Matrix to Vector

2010-06-05 Thread steven mosher
Given a matrix of m*n, I want to reorder it as a vector, using a row major transpose. so: m-matrix(seq(1,48),nrow=6,byrow=T) m [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,]12345678 [2,]9 10 11 12 13 14 15 16 [3,] 17 18 19 20 21

Re: [R] variation

2010-06-05 Thread John Kane
?var perhaps --- On Sat, 6/5/10, Adel ESSAFI adel.s...@imag.fr wrote: From: Adel ESSAFI adel.s...@imag.fr Subject: Re: [R] variation To: r-help@r-project.org Received: Saturday, June 5, 2010, 7:57 AM 2010/6/5 Jannis bt_jan...@yahoo.de What exactly do you mean by variation? As I

[R] How to get the closing price from the the GOOGLE FINANCE site for NSEINDIA stocks

2010-06-05 Thread Velappan Periasamy
Sir, How to get the closing price from this link http://www.google.com/finance/historical?q=NSE:RCOM I installed quantmod getSymbols('NSE:RCOM',src='google') gives me this error** Error in download.file(paste(google.URL, q=, Symbols.name, startdate=, : cannot open URL

Re: [R] Matrix to Vector

2010-06-05 Thread Henrique Dallazuanna
Try this: as.vector(t(m)) On Sat, Jun 5, 2010 at 3:12 PM, steven mosher mosherste...@gmail.comwrote: Given a matrix of m*n, I want to reorder it as a vector, using a row major transpose. so: m-matrix(seq(1,48),nrow=6,byrow=T) m [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,]1

[R] Matrix to Vector

2010-06-05 Thread Jorge Ivan Velez
Hi Steven, If I understood correctly, this might do what you want: c(t(m)) HTH, Jorge On Sat, Jun 5, 2010 at 2:12 PM, steven mosher mosherste...@gmail.comwrote: Given a matrix of m*n, I want to reorder it as a vector, using a row major transpose. so: m-matrix(seq(1,48),nrow=6,byrow=T)

Re: [R] Matrix to Vector

2010-06-05 Thread steven mosher
as.vector(t(m)) [1] 1 9 17 25 33 41 2 10 18 26 34 42 3 11 19 27 35 43 4 12 20 28 36 44 5 13 21 29 37 45 6 14 22 30 38 46 7 15 23 31 39 47 8 16 24 [46] 32 40 48 the result I want is this: [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Re: [R] Matrix to Vector

2010-06-05 Thread John Kane
m-matrix(seq(1,48),nrow=6,byrow=T) as.vector(t(m)) gives me the correct result. Any chance you may have already transformed m ? --- On Sat, 6/5/10, steven mosher mosherste...@gmail.com wrote: From: steven mosher mosherste...@gmail.com Subject: Re: [R] Matrix to Vector To: Henrique

Re: [R] Matrix to Vector

2010-06-05 Thread steven mosher
I bet that is what I did. On Sat, Jun 5, 2010 at 11:54 AM, John Kane jrkrid...@yahoo.ca wrote: m-matrix(seq(1,48),nrow=6,byrow=T) as.vector(t(m)) gives me the correct result. Any chance you may have already transformed m ? --- On Sat, 6/5/10, steven mosher mosherste...@gmail.com wrote:

[R] The curious special case of ~ (a + b)/c

2010-06-05 Thread Nathaniel Smith
This isn't at all an urgent practical question, but recently while exploring the details of how R formulas are interpreted, I learned of this funny special case for how / interacts with +. In all of the following cases, the multiplication-like operator simply distributes over addition: (a + b):c

Re: [R] apply min function rowwise

2010-06-05 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Joshua Wiley Sent: Saturday, June 05, 2010 11:12 AM To: moleps Cc: r-help@r-project.org Subject: Re: [R] apply min function rowwise On Sat, Jun 5, 2010 at 10:22 AM, moleps

Re: [R] Prediction in discriminant analysis

2010-06-05 Thread Joris Meys
You use the function predict for that. You give a data frame with the new observations, and make sure the variables have exactly the same name. # run example library(MASS) Class - as.factor(rep(c(A,B,C),each=30)) X1 - c(rnorm(30),rnorm(30,3,2),rnorm(30,-3,1)) X2 -

Re: [R] Help on ARFIMA modeling

2010-06-05 Thread Joris Meys
Read the posting guides please and give us a tiny little bit more information. http://www.R-project.org/posting-guide.html Cheers Joris On Sat, Jun 5, 2010 at 4:39 PM, ERIC AIDOO eaogo...@gmail.com wrote: Dear R Users, Please I have applied the arfima  procedure in the forecast package to my

Re: [R] The curious special case of ~ (a + b)/c

2010-06-05 Thread RICHARD M. HEIBERGER
The / is used for nesting and is defined by A/B == A + (B %in% A) thus (a+b)/c == (a+b) + c %in% (a+b) == a + b + a:b:c Rich [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] What is the largest in memory data object you've worked with in R?

2010-06-05 Thread Joris Meys
You have to take some things into account : - the maximum memory set for R might not be the maximum memory available - R needs the memory not only for the dataset. Matrix manipulations require frquently double of the amount of memory taken by the dataset. - memory allocation is important when

[R] Wilcoxon test output as a table

2010-06-05 Thread Iurie Malai
Hi! I searched some time ago a way to get the Wilcoxon test results as a table more or less formatted. Nobody told me any solution and I found nothing on the Internet. Recently I came across this link ( http://myowelt.blogspot.com/2008/04/beautiful-correlation-tables-in-r.html), which helped me

Re: [R] Ignoring missing elements in data.frame()

2010-06-05 Thread Joris Meys
Hi, One possible way to get around it is using following idea : X1 - rnorm(10) X2 - rnorm(10) Names - c(X1,X2,X3) Names - Names[Names %in% ls()] n - length(Names) p - 10 #length of each object output - matrix(NA,ncol=n,nrow=p) for(i in 1:n){ output[,i] - get(Names[i]) } output -

Re: [R] Wilcoxon test output as a table

2010-06-05 Thread Joris Meys
# not tested out - rbind(as.numeric(Wnew),as.numeric(P)) rownames(out) - c(Wnew,P) Cheers On Sat, Jun 5, 2010 at 11:18 PM, Iurie Malai iurie.ma...@gmail.com wrote: Hi! I searched some time ago a way to get the Wilcoxon test results as a table more or less formatted. Nobody told me any

Re: [R] (no subject)

2010-06-05 Thread Joris Meys
OK, as you're new: 1) this is a list about R, not about statistics. 2) it looks awkwardly much like a homework assignment. People tend to be not really keen on solving those ones. 3) READ THE POSTING GUIDELINES. Seriously, read them. http://www.R-project.org/posting-guide.html As a tip : go

[R] HTMLStart with TinnR

2010-06-05 Thread RGtk2User
Im developing an application with R and Gtk+. It's just a simple GUI which helps new users to interactuate with R. Thing is, when you do a statistical analysis, I also want to provide a HTML report, but HTMLStart doesnt work propperly when executing from TinnR. It does create the file but not

Re: [R] apply min function rowwise

2010-06-05 Thread moleps
Appreciate it... //M On 5. juni 2010, at 20.11, Joshua Wiley wrote: On Sat, Jun 5, 2010 at 10:22 AM, moleps mole...@gmail.com wrote: thx. It was only the first instance that was class date. The rest were factors. So that explains it. If I want to change the rest in vec into class date

[R] Error Bar Issues

2010-06-05 Thread beloitstudent
Hello all, I am an undergraduate student who is having syntax issues trying to get error bars on my graph. This is the data, which I assigned the name Saline to. Time Average SEM 1 -20 0.00 0.000 2 330 0.00 0.000 445 3.227902

Re: [R] Wilcoxon test output as a table

2010-06-05 Thread Iurie Malai
Thank you, Joris! I received two identical warnings: [14] WARNING: Warning in if (nchar(cmd) = width) return(cmd) : the condition has length 1 and only the first element will be used [15] WARNING: Warning in if (nchar(cmd) = width) return(cmd) : the condition has length 1 and only the

Re: [R] R2HTML problem

2010-06-05 Thread Joris Meys
Tinn-R is using the R2HTML package itself for communication with R. You could ask JC Faria who wrote Tinn-R what exactly is going on there. You might get more help here : http://sourceforge.net/projects/tinn-r/support Personally, I'd just use a different editor in this case. I love Tinn-R, but

Re: [R] Wilcoxon test output as a table

2010-06-05 Thread Joris Meys
Can't reproduce those with your code and your dataset. I also noticed some other unwanted behaviour by using as.numeric : it changes the formatting again. You won't get rid of the as that indicates it's a character, and you won't be able to format the numbers as the columns in a dataframe or in a

Re: [R] Wilcoxon test output as a table

2010-06-05 Thread Iurie Malai
Sorry, Joris, now is wonderful! Thank you! Now, this is the code: W - as.matrix(lapply(Dataset[2:11], function(x) wilcox.test(x ~ GrFac, alternative=two.sided, data=Dataset)$statistic)) P - as.matrix(lapply(Dataset[2:11], function(x) wilcox.test(x ~ GrFac, alternative=two.sided,

Re: [R] Creating a maxtrix from conditional prints

2010-06-05 Thread Joris Meys
Use rbind? Not the most optimal solution, but it should get the job done. # not tested Code example: out - c() for (x in 1:10) { for (y in 1:10) { qui - ifelse((mac[,1] == x) (mac[,5] == y) | (mac[,1] == y) (mac[,5] == x), 1, NA) quo - cbind(mac,qui) qua - subset(quo, qui ==1) if(nrow(qua) ==

Re: [R] Error Bar Issues

2010-06-05 Thread Joris Meys
you can't refer to an argument within a function call. Try uiw - Saline[,3] plotCI(x=Saline [,1],y=Saline [,2], uiw=uiw, liw=uiw, err=y, pch=21, pt.bg=par(bg), cex=1.5, lty=1, type=o, gap=0, sfrac=0.005, xlim=c(-21,340),xaxp=c(-20,320,11), xlab=Time (min), ylim=c(0,12), yaxp=c(0,12,11),

Re: [R] Error Bar Issues

2010-06-05 Thread beloitstudent
Thanks for the suggestion...but R still doesn't like it. Now I have 3 error messages. It seems to dislike my *err=y* command. I'm going to continue trying. Thanks for your help! If you happen to spot anything else, please let me know! thanks! beloitstudent On Sat, Jun 5, 2010 at 5:16 PM,

Re: [R] The curious special case of ~ (a + b)/c

2010-06-05 Thread Nathaniel Smith
On Sat, Jun 5, 2010 at 2:01 PM, RICHARD M. HEIBERGER r...@temple.edu wrote: The / is used for nesting and is defined by A/B == A + (B %in% A) thus (a+b)/c == (a+b) + c %in% (a+b) == a + b + a:b:c ...I guess I could then ask why %in% is defined that way, but actually this rephrasing somehow

Re: [R] Wilcoxon test output as a table

2010-06-05 Thread Iurie Malai
Maybe, this will be better: W - as.matrix(lapply(Dataset[2:11], function(x) wilcox.test(x ~ GrFac, alternative=two.sided, data=Dataset)$statistic)) P - as.matrix(lapply(Dataset[2:11], function(x) wilcox.test(x ~ GrFac, alternative=two.sided, data=Dataset)$p.value)) out -

Re: [R] Error Bar Issues

2010-06-05 Thread William Revelle
Dear Beloitstudent; Although Ben Bolker will have to give you the definitive answer, the following will do what I think you want to do. library(plotrix) #for those of us who don't know where plotCI comes from #give us the data: Saline - structure(list(Time = c(-20L, NA, 30L, 45L, 60L,

Re: [R] Shapes in barplots

2010-06-05 Thread Greg Snow
My suggestion is to learn to use dotplots rather than trying to add 3d chartjunk to barplots. -- 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

[R] Robust Asymptotic Statistics (RobASt)

2010-06-05 Thread Alex Weslowski
Hi all, Other than: http://www.stamats.de/F2006.r Are there other good simple examples out there of using the ROptRegTS package (part of the RobASt project)? I'm hoping to plug it in for multivariate regression. Or is this not a good idea? Just trying to find out how it compares to rlm, lts,

[R] how to use MCD condition

2010-06-05 Thread arindam fadikar
Dear R users, I have a matrix and i want to get mahalanobis distance based on covariance matrix and MCD ( minimun covariance determinant), but I could not find any such argument 'MCD in the function 'mahalanobis'. Please help. -- Arindam Fadikar M.Stat Indian Statistical Institute. New Delhi,