Re: [R] legend in R plot

2010-07-22 Thread Dennis Murphy
Hi: It would really help to have a reproducible example to see exactly what problems you're having, but here's a simple manufactured example to illustrate how to produce a basic legend. The plot below is one with three different 'y' variables against the same x. The x and y limits are made wide

Re: [R] lmomRFA package: error bounds/confidence intervals

2010-07-22 Thread J. R. M. Hosking
On 2010-07-21 09:37, Tonja Krueger wrote: Dear List I’m using the ”lmomRFA” package to fit different distributions to my data sample. To calculate the error bounds I used: regsimq(…) and sitequantbounds(…) So my questions are: Are error bounds and confidence intervals the same

[R] R find limit of a function

2010-07-22 Thread saminny
Hello, HOw do I find limit of a function in R? thanks, Samit -- View this message in context: http://r.789695.n4.nabble.com/R-find-limit-of-a-function-tp2298097p2298097.html Sent from the R help mailing list archive at Nabble.com. __

[R] newton method

2010-07-22 Thread saminny
Is there a non animation version of newton.method (http://bm2.genes.nig.ac.jp/RGM2/R_current/library/animation/man/newton.method.html) for finding roots of a function? It should find the roots without showing it on the GUI. thanks, Sam -- View this message in context:

[R] R forum

2010-07-22 Thread saminny
Hi, Are there any other forums on R where I can get quick responses to my questions? I've lot of questions as I am learning the basics and exploring advanced computational functions and it is tough to wait for moderator approval then a reply to each of those questions. thanks! Samit -- View

[R] Heterogeneous variance in two-way mixed ANOVA

2010-07-22 Thread Kline, Keith A
I have heterogeneous variance in a two-way mixed effects ANOVA, with more than 2 groups in each factor. Is there something like oneway.test or a Brown-Forsythe test that will let me test for differences in means? Thanks! -Keith __

Re: [R] Hurst Exponent Estimation

2010-07-22 Thread Hans W Borchers
Lorenzo Isella lorenzo.isella at gmail.com writes: Dear All, I am a novice when it comes to time-series analysis and at the moment I am actually interested in calculating the Hurst exponent of a time series. Some time ago I tested some of the classical chaotic time series (such as the

[R] Odp: R forum

2010-07-22 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 22.07.2010 05:58:54: Hi, Are there any other forums on R where I can get quick responses to my questions? I've lot of questions as I am learning the basics and exploring advanced computational functions and it is tough to wait for moderator

[R] Odp: legend in R plot

2010-07-22 Thread Petr PIKAL
Hi maybe less number of lines? regards Petr r-help-boun...@r-project.org napsal dne 22.07.2010 06:06:53: Hi all, I am have some difficulty with the legend function. I need to add a legend to describe the different line types in a plot. The legend box is small. It did not include

[R] Odp: Help me with prediction in linear model

2010-07-22 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 21.07.2010 17:46:02: Hi R-community, I have the code as follows,i Fitted model as follows lbeer-log(beer_monthly) t-seq(1956,1995.2,length=length(beer_monthly)) #beer_monthly contains 400+ entries not needed t2=t^2

[R] please help me for this Error: cannot listen to TCP port 15259

2010-07-22 Thread Na.Ebrahimi
hi, I get an Error when I try to run function help in R, it says starting httpd help server ...Error: cannot listen to TCP port 15259 I would be so glad if you help me [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] R forum

2010-07-22 Thread Gavin Simpson
On Wed, 2010-07-21 at 20:58 -0700, saminny wrote: Hi, Are there any other forums on R where I can get quick responses to my questions? I've lot of questions as I am learning the basics and exploring advanced computational functions and it is tough to wait for moderator approval then a reply

Re: [R] legend in R plot

2010-07-22 Thread Peter Ehlers
On 2010-07-21 22:06, li li wrote: Hi all, I am have some difficulty with the legend function. I need to add a legend to describe the different line types in a plot. The legend box is small. It did not include sufficient length of each line type to help distinguish the differnt line types.

Re: [R] please help me for this Error: cannot listen to TCP port 15259

2010-07-22 Thread Allan Engelhardt
The short-term work-around is probably to use the help_type= argument to help, e.g. help(help, help_type=text) Hope this helps a little. Allan On 22/07/10 07:30, Na.Ebrahimi wrote: hi, I get an Error when I try to run function help in R, it says starting httpd help server ...Error: cannot

[R] check menu button (tcltk)

2010-07-22 Thread Albert-Jan Roskam
Hi,   I am making a mock user interface in tcltk and I would like to add a 'check menu button' such as shown here: http://zetcode.com/tutorials/pygtktutorial/images/checkmenuitem.png   Does anybody know how to do this? I am quite new to R. Cheers!! Albert-Jan

[R] Drop firms in unbalanced panel if not more than 5 observations in consecutive years for all variables

2010-07-22 Thread Christian Schoder
Dear R-user, a few weeks ago I consulted the list-serve with a similar question. However, my task changed a little but sufficiently to get lost again. So I would appreciate any help on the following issue. I use the plm package and work with firm-level data in a panel. I would like to eliminate

Re: [R] Contingency Table Analysis - specific cell to specific cell comparisons

2010-07-22 Thread Tsunhin John Wong
Dear David and the list, Thanks for your comment. Unfortunately, I don't have an instructor on R. And I usually don't deal with contingency table analysis. I have consulted more than two books on R already, but I found no good answer. Could you point me to some references about log linear

[R] measuring distance

2010-07-22 Thread Michael Ralph M. Abrigo
Hi all, My question is really more statistical theory than about R, however I would greatly appreciate if someone can provide guidance. I am trying to measure distance between points given j number of variables, a subset of which is latitude and longitude. To make the distance scale-invariant, I

[R] class

2010-07-22 Thread Yuan Jian
Hello,   ###  I created two classes A and B. A is the superclass of B.   setClass(A, representation(s1=numeric),prototype=prototype(s1=8)) setClass(B,contains=A,representation(s2=character),prototype=list(s2=hi)) myA=new(A) myB=new(B)     I created functions for A and B   f1=function(x,...)

[R] please help me on this warning message

2010-07-22 Thread Na.Ebrahimi
hi, When I try to use the function coordProj {mclust} coordProj(diabetes[,-1],dimens=c(2,3),what=uncertainy,uncertainty=diabetesModel$uncertainty,parameters=diabetesModel$parameters) to identify uncertainty, it errors and send this warning message: Warning message: In

Re: [R] please help me on this warning message

2010-07-22 Thread Siri Bjoner
Sorry, I'm getting error messages on your email? Anyhows... Spellcheck. You're using uncertainy and uncertainTy (the latter being correct but the former being what you've programmed). Good luck! Siri. Siterer Na.Ebrahimi na.ebrah...@mail.sbu.ac.ir: hi, When I try to use the function

Re: [R] help me with holt-winter model

2010-07-22 Thread Research student
Please help me with this i need to submit my thesis . Thanks In advance -- View this message in context: http://r.789695.n4.nabble.com/help-me-with-holt-winter-model-tp2295552p2298464.html Sent from the R help mailing list archive at Nabble.com.

[R] how to write legend of a plot

2010-07-22 Thread Yogesh Tiwari
Dear R Users, If we issue simple plot command in R we don't get legend of the plot automatically. For example, following lines plots two curves, but to write a legend of these two curves there is no simple command. I checked with ?legend but it seems bit complicated for me. Does anyone know how

Re: [R] Drop firms in unbalanced panel if not more than 5 observations in consecutive years for all variables

2010-07-22 Thread Stefan Grosse
Am 22.07.2010 11:18, schrieb Christian Schoder: I use the plm package and work with firm-level data in a panel. I would like to eliminate all firms that do not fulfill the requirement of having an observation in every variable used for at least x consecutive years. There are probably more

Re: [R] Drop firms in unbalanced panel if not more than 5 observations in consecutive years for all variables

2010-07-22 Thread Allan Engelhardt
One option: /## Your data:/ data - structure(list(id = structure(c(1L, 2L, 2L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L), .Label = c(a, b, c, d), class = factor), year = c(2000L, 2000L, 2001L, 1999L, 2000L, 2001L, 2002L, 1998L, 1999L, 2000L, 2001L, 2002L), y = c(1L, NA, 3L, 1L, 2L, 4L,

Re: [R] how to write legend of a plot

2010-07-22 Thread Alain Guillet
Hi, There is no way to obtain an automatical legend with plot. The choice you have is to draw the legend by yourself or to use another graphical package but it is not necessary easier... For example, the code for the package ggplot2: donnees - data.fram(x=x,y=y,y1=y1) melt(donnees,id=x) -

Re: [R] Odp: R forum

2010-07-22 Thread Spencer Graves
Also: 1. Have you used help.start()? This opens a display in a browser with links to the available manuals. 2. There are multiple mailing lists and multiple search engines listed in www.r-project.org. 3. Have you subscribed? I had the impression that moderator

Re: [R] Hurst Exponent Estimation

2010-07-22 Thread Spencer Graves
Have you tried something like the following: library(sos) H - ???Hurst summary(H) H This identified 50 links in 15 packages, and displayed the results in a table in a web browser with links to the best match in the best package first. The installPackages and writeFindFn2xls

Re: [R] R forum

2010-07-22 Thread Gabor Grothendieck
On Thu, Jul 22, 2010 at 4:07 AM, Gavin Simpson gavin.simp...@ucl.ac.uk wrote: On Wed, 2010-07-21 at 20:58 -0700, saminny wrote: Hi, Are there any other forums on R where I can get quick responses to my questions? I've lot of questions as I am learning the basics and exploring advanced

Re: [R] Drop firms in unbalanced panel if not more than 5 observations in consecutive years for all variables

2010-07-22 Thread Dimitris Rizopoulos
try this: Dat - read.table(textConnection( id year y z 1 a 2000 1 1 2 b 2000 NA 2 3 b 2001 3 3 4 c 1999 1 1 5 c 2000 2 2 6 c 2001 4 NA 7 c 2002 5 4 8 d 1998 6 5 9 d 1999 5 NA 10 d 2000 6 6 11 d 2001 7 7 12 d 2002 3 6 ), header = TRUE)

Re: [R] legend in R plot

2010-07-22 Thread Jim Lemon
On 07/22/2010 02:06 PM, li li wrote: Hi all, I am have some difficulty with the legend function. I need to add a legend to describe the different line types in a plot. The legend box is small. It did not include sufficient length of each line type to help distinguish the differnt line

Re: [R] Drop firms in unbalanced panel if not more than 5 observations in consecutive years for all variables

2010-07-22 Thread Gabor Grothendieck
On Thu, Jul 22, 2010 at 5:18 AM, Christian Schoder schoc...@newschool.edu wrote: Dear R-user, a few weeks ago I consulted the list-serve with a similar question. However, my task changed a little but sufficiently to get lost again. So I would appreciate any help on the following issue. I

Re: [R] legend in R plot

2010-07-22 Thread Jim Lemon
On 07/22/2010 09:39 PM, Jim Lemon wrote: On 07/22/2010 02:06 PM, li li wrote: Hi all, I am have some difficulty with the legend function. I need to add a legend to describe the different line types in a plot. The legend box is small. It did not include sufficient length of each line type to

Re: [R] how to write legend of a plot

2010-07-22 Thread John Kane
There is no simpler way. It's not automatic but it is fairly simple at the most basic. It can get a bit complicated later. ltxt - c(cat,dog) x - 1:5 y - 1:5 plot (x,y, type='n', ann=FALSE) lines(x,y,col=1,lty=solid) points(x,y,pch=16) legend(1,4,ltxt, pch=16) --- On Thu, 7/22/10, Yogesh

[R] SQL/R

2010-07-22 Thread Gildas Mazo
Dear R users, I want to aggregate data in the following way: ### X - data.frame(u = c(T1,T1,T1,T2), v=c(a,a,b,a)) X library(sqldf) sqlOut - sqldf(select count(distinct(v)) from X group by u) sqlOut ### Now I want to get the same result without using SQL. How can I achieve that ? Thanks for

[R] tsdiag

2010-07-22 Thread nuncio m
HI list, I want to know whether tsdiag uses k-(p+q) as the lag in ljung box test. How is it possible to save those values nuncio -- Nuncio.M Research Scientist National Center for Antarctic and Ocean research Head land Sada Vasco da Gamma Goa-403804 [[alternative HTML version

Re: [R] SQL/R

2010-07-22 Thread Allan Engelhardt
There are so many ways Here is one: aggregate(v ~ u, data=X, function(...) length(unique(...))) #u v # 1 T1 2 # 2 T2 1 Hope this helps Allan. On 22/07/10 12:52, Gildas Mazo wrote: Dear R users, I want to aggregate data in the following way: ### X- data.frame(u = c(T1,T1,T1,T2),

Re: [R] check menu button (tcltk)

2010-07-22 Thread Albert-Jan Roskam
Got it already. I should have rtfm'd. Sorry to bother you.   Here's a modified example from a very neat webpage I found: require(tcltk) tt - tktoplevel() topMenu - tkmenu(tt) tkconfigure(tt,menu=topMenu) fileMenu - tkmenu(topMenu,tearoff=FALSE) openRecentMenu - tkmenu(topMenu,tearoff=FALSE)

[R] Sweave special characters problem

2010-07-22 Thread Bunny, lautloscrew.com
Dear all, I use Sweave to create my reports. Unfortunately my script crashes whenever I my R code contains special characters like umlauts. Is there a way to to escape special characters in Sweave... This is the line that crashes Sweave: gl_bybranch = ddply(new_wans,.(period,Branchen),

[R] interpretation of stress in NMDS

2010-07-22 Thread Graves, Gregory
Among those users of Primer, stress values greater than 0.3 are interpreted as questionable. Using both isoMDS and metaMDS (vegan package), the stress values returned are much higher using my own data and using examples provided in R Help. For example Rstress = 8.3, and the stressplot r2 = 0.99

Re: [R] Sweave special characters problem

2010-07-22 Thread Duncan Murdoch
On 22/07/2010 8:19 AM, Bunny, lautloscrew.com wrote: Dear all, I use Sweave to create my reports. Unfortunately my script crashes whenever I my R code contains special characters like umlauts. Is there a way to to escape special characters in Sweave... This is the line that crashes Sweave:

Re: [R] Sweave special characters problem

2010-07-22 Thread Allan Engelhardt
A standalone example is always helpful. The following works for me, so I am probably not understanding your problem: ---[BEGIN: umlaut.Rnw]--- \documentclass[a4paper]{article} \usepackage{ucs} \usepackage[utf8x]{inputenc} \begin{document} test,echo=TRUE= x - data.frame(Geschäftslage=1:10)

Re: [R] Contingency Table Analysis - specific cell to specific cell comparisons

2010-07-22 Thread Michael Friendly
If you want to *see* the contributions of the cells to the association between lang and cons, try library(vcd) mosaic(~lang+cons, data=langcons.table, shade=TRUE) Tsunhin John Wong wrote: Dear R users, I have a question of how to do some specific cell to cell comparisons on a R x C

Re: [R] namespace? environment? how to manage functions?

2010-07-22 Thread Michael Friendly
In http://tolstoy.newcastle.edu.au/R/e7/help/09/06/1900.html Jim Holtman wrote: Here is the way that I do it instead of creating a package of my functions. I 'source' the file into an environment and then attach the environment to keep the global from being clustered: # read my functions

Re: [R] R find limit of a function

2010-07-22 Thread Gabor Grothendieck
On Wed, Jul 21, 2010 at 11:48 PM, saminny jain.sa...@gmail.com wrote: Hello, HOw do I find limit of a function in R? thanks, There are examples in the sympy help file in the rSymPy package and in the Ryacas vignette in the Ryacas package. They have home pages at:

Re: [R] namespace? environment? how to manage functions?

2010-07-22 Thread Duncan Murdoch
On 22/07/2010 8:58 AM, Michael Friendly wrote: In http://tolstoy.newcastle.edu.au/R/e7/help/09/06/1900.html Jim Holtman wrote: Here is the way that I do it instead of creating a package of my functions. I 'source' the file into an environment and then attach the environment to keep the global

[R] Visibility of methods in different namespaces

2010-07-22 Thread Thomas Etheber
Dear List, I have posted my questions to the r-devel list as well, but I think this list is read by more users, and maybe someone from this list may point me in the right direction. Here is the corresponding thread: https://stat.ethz.ch/pipermail/r-devel/2010-July/058003.html I am sorry for

Re: [R] Sweave special characters problem

2010-07-22 Thread Bunny, lautloscrew.com
Sorry all, for not posting a minimal example. I am running R on Mac OS X snow leopard with Komodo edit / Sciviews-R. The problem is that the code does not work any more if there is an umlaut in my R code. The error message is some strange mixture of german and english, so this what the error

Re: [R] Sweave special characters problem

2010-07-22 Thread Duncan Murdoch
On 22/07/2010 9:39 AM, Bunny, lautloscrew.com wrote: Sorry all, for not posting a minimal example. I am running R on Mac OS X snow leopard with Komodo edit / Sciviews-R. The problem is that the code does not work any more if there is an umlaut in my R code. The error message is some strange

Re: [R] Visibility of methods in different namespaces

2010-07-22 Thread Duncan Murdoch
On 22/07/2010 9:31 AM, Thomas Etheber wrote: Dear List, I have posted my questions to the r-devel list as well, but I think this list is read by more users, and maybe someone from this list may point me in the right direction. Here is the corresponding thread:

[R] how to force a table to be square?

2010-07-22 Thread Liat
Hi guys, I hope you can help me with this. Here is the problem: I have some data (myData) that looks similar to this: [,1] [,2] [,3] [,4] [1,] A A B B [2,] B B B B [3,] C C C C When I build a contingency table for the first and second row using: tb - table(myData[1, ],

Re: [R] tsdiag

2010-07-22 Thread Spencer Graves
Have you tried the following: library(sos) (lj - findFn('ljung box')) This just identified for me 32 matches in 13 packages, at least one of which should do what you want. In particular, I wrote the AutocorTest function in FinTS to deal with issues that sound similar to what

Re: [R] Sweave special characters problem

2010-07-22 Thread David Winsemius
On Jul 22, 2010, at 9:39 AM, Bunny, lautloscrew.com wrote: Sorry all, for not posting a minimal example. I am running R on Mac OS X snow leopard with Komodo edit / Sciviews-R. The problem is that the code does not work any more if there is an umlaut in my R code. The error message is

Re: [R] Visibility of methods in different namespaces

2010-07-22 Thread Thomas Etheber
Am 22.07.2010 15:53, schrieb Duncan Murdoch: On 22/07/2010 9:31 AM, Thomas Etheber wrote: Dear List, I have posted my questions to the r-devel list as well, but I think this list is read by more users, and maybe someone from this list may point me in the right direction. Here is the

[R] Multilevel survival model

2010-07-22 Thread Christopher David Desjardins
* Please cc me if you reply as I am a digest subscriber * Hi, I am wondering how I can run a multilevel survival model in R? Below is some of my data. head(bi0.test) childid famid lifedxm sex age delta 1 22.0222 CONTROL MALES 21.36893 0 2 13.0213 MAJOR MALES

[R] svydesign syntax

2010-07-22 Thread R user
This message is for those familiar with the survey package. I need to fit a weighted Cox model to accommodate the sampling weights as I have a case-control study with controls sampled at random from a database in a ratio 2:1 to cases (whom were all sampled). I want to make sure I am using the

[R] Hydrology plots in R

2010-07-22 Thread Sam Albers
Hello, I am trying to create a plot often seen in hydrodynamic work than includes a contour plot representing the water speed with arrows pointing in the direction of flow. Does anyone have any idea how I might add arrows based on wf$angle (in the example below) to the plot below? Thanks in

Re: [R] how to force a table to be square?

2010-07-22 Thread peter dalgaard
On Jul 22, 2010, at 4:00 PM, Liat wrote: Hi guys, I hope you can help me with this. Here is the problem: I have some data (myData) that looks similar to this: [,1] [,2] [,3] [,4] [1,] A A B B [2,] B B B B [3,] C C C C When I build a contingency table for the first

[R] tracking changes

2010-07-22 Thread Albert-Jan Roskam
Hi,   I am trying to write some code that tracks changes that may have been made after a dataframe has been edited using fix(). But if I edit only the first cell (row 1, col 1) of the dataset below, it is like many records were edited. What is the explanation for this error?  

Re: [R] how to force a table to be square?

2010-07-22 Thread Wu Gong
Hi, try ?levels myData - matrix(sample(c(LETTERS[1:10],NA),100,replace=T),nrow=25) table(factor(as.vector(myData),levels=LETTERS[1:26]),useNA=ifany) - A R learner. -- View this message in context: http://r.789695.n4.nabble.com/how-to-force-a-table-to-be-square-tp2298707p2298833.html Sent

Re: [R] how to force a table to be square?

2010-07-22 Thread Liat
Thank you!!! -- View this message in context: http://r.789695.n4.nabble.com/how-to-force-a-table-to-be-square-tp2298707p2298876.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] how to force a table to be square?

2010-07-22 Thread Liat
Thanks Peter! that worked, and was so easy. LOL. I tried playing with factor and levels before I wrote here, but obviously I didn't do it right. Thanks again, Liat. -- View this message in context: http://r.789695.n4.nabble.com/how-to-force-a-table-to-be-square-tp2298707p2298875.html Sent from

[R] pagebreak in xtable and columns'width

2010-07-22 Thread n.via...@libero.it
Dear list, I'm using the Sweave function in order to get some report. Here one chunk: echo=F,results=tex= report-lapply(repor, function(x) { (print(xtable(data.frame(x[1:2,]), align=|l|rrr|),floating=FALSE,tabular. environment=longtable,include.colnames=FALSE,size=\\small))

Re: [R] how to force a table to be square?

2010-07-22 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Liat Sent: Thursday, July 22, 2010 8:41 AM To: r-help@r-project.org Subject: Re: [R] how to force a table to be square? Thanks Peter! that worked, and was so easy. LOL. I

Re: [R] SQL/R

2010-07-22 Thread Brian Diggs
On 7/22/2010 5:01 AM, Allan Engelhardt wrote: There are so many ways Here is one: aggregate(v ~ u, data=X, function(...) length(unique(...))) # u v # 1 T1 2 # 2 T2 1 Hope this helps Here is one other way, using the plyr package (which is very good for taking a data structure

[R] decision tree with weighted inputs

2010-07-22 Thread David Shin
I'd like to train a decision tree on a set of weighted data points. I looked into the rpart package, which builds trees but doesn't seem to offer the capability of weighting inputs. (There is a weights parameter, but it seems to correspond to output classes rather than to input points). I'm

Re: [R] how to force a table to be square?

2010-07-22 Thread Wu Gong
Hi William, I'm curious about that you used d[] - lapply(d, factor... Could you please tell me if there are any differences between d[] and d? Thank you. - A R learner. -- View this message in context: http://r.789695.n4.nabble.com/how-to-force-a-table-to-be-square-tp2298707p2298965.html

Re: [R] how to force a table to be square?

2010-07-22 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Wu Gong Sent: Thursday, July 22, 2010 9:44 AM To: r-help@r-project.org Subject: Re: [R] how to force a table to be square? Hi William, I'm curious about that you used d[]

Re: [R] how to force a table to be square?

2010-07-22 Thread Peter Ehlers
On 2010-07-22 10:43, Wu Gong wrote: Hi William, I'm curious about that you used d[]- lapply(d, factor... Could you please tell me if there are any differences between d[] and d? Thank you. Why not try it both ways and inspect the result. d[] - d - Obvious? -Peter Ehlers

[R] Please advise acf and pacf in order to determine order of Arima

2010-07-22 Thread Research student
I have data as below.Please let me know how the ACF and Pacf used to determine the order od arima model. Is there any rules need to be followed to determine order.Please advise turkey.price.ts Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 2001 1.58 1.75 1.63 1.45 1.56 2.07

Re: [R] send out put to file in R

2010-07-22 Thread chakri_amateur
[...] compo[[ which.max(sapply(compo, vcount)) ]] That's better command for obtaining Largest Component Sometimes, I get this error while reading pajek file. Does anybody know what this error message means ? g - read.graph (F://data/pfu_raw.net, pajek) Error in read.graph.pajek(file, ...) :

[R] lme4 on Mac OS X

2010-07-22 Thread Nicholas Griffin
I have been trying to get the lme4 package installed on Mac OS X... with no success. The Mac OS binary is not available on any CRAN, and I also can¹t install the package from old source. Has anyone found a solution to this problem? I am happy to use nlme for now, but I tend to prefer to do my

[R] 64 bit use of odbcConnectExcel

2010-07-22 Thread Jack T.
Hi All, I'm using R 2.11.1 on 64 bit windows XP. The little function I wrote below I use often to import the first 1001 lines in an excel sheet to R. This works fine on the 32 bit version of R but fails on the 64 bit [both on the same machine, using the same function, importing the same .xls

Re: [R] lme4 on Mac OS X

2010-07-22 Thread David Winsemius
On Jul 22, 2010, at 11:34 AM, Nicholas Griffin wrote: I have been trying to get the lme4 package installed on Mac OS X... with no success. The Mac OS binary is not available on any CRAN, and I also can’t install the package from old source. Has anyone found a solution to this problem?

[R] t.test in for loop

2010-07-22 Thread Arne Schulz
Dear list, I'd like to do several t-test within a for loop. Example follows: data1 - rnorm(1:25) data2 - rnorm(1:25) vars - c(data1, data2) for (i in vars) { t.test(i) } Unfortunately, it does not work because of the quotes in the vars-vector (running t.test(data1) by hand

[R] How to fix slope and estimate intercept

2010-07-22 Thread Jun Shen
Dear all, Is there anyway I can fix slope in some value and only estimate intercept for a linear regression? I understand lm(y~1, data) will NOT have a slope at all. This is not what I want. Thanks. Jun __ R-help@r-project.org mailing list

[R] does package QuantPsych function lm.beta can handle results of a regression with weights?

2010-07-22 Thread Dimitri Liakhovitski
Hello, and sorry for not providing an example. I run a regular linear regression (using lm) and use weights with it (weights = ...). I use QuantPsych package, its function lm.beta to extract standardized regression weights from my lm regression object. When I don't use weights, everything is

Re: [R] t.test in for loop

2010-07-22 Thread David Winsemius
On Jul 22, 2010, at 1:28 PM, Arne Schulz wrote: Dear list, I'd like to do several t-test within a for loop. Example follows: data1 - rnorm(1:25) data2 - rnorm(1:25) vars - c(data1, data2) for (i in vars) { t.test(i) } Unfortunately, it does not work because of the quotes in

Re: [R] t.test in for loop

2010-07-22 Thread Henrique Dallazuanna
Try this: apply(Vectorize(get)(ls(patt = 'data')), 2, t.test) On Thu, Jul 22, 2010 at 2:28 PM, Arne Schulz arne.sch...@student.uni-kassel.de wrote: Dear list, I'd like to do several t-test within a for loop. Example follows: data1 - rnorm(1:25) data2 - rnorm(1:25) vars - c(data1, data2)

Re: [R] newton method

2010-07-22 Thread Berend Hasselman
saminny wrote: Is there a non animation version of newton.method (http://bm2.genes.nig.ac.jp/RGM2/R_current/library/animation/man/newton.method.html) for finding roots of a function? It should find the roots without showing it on the GUI. Have a look at package nleqslv /Berend -- View

Re: [R] t.test in for loop

2010-07-22 Thread Peter Ehlers
On 2010-07-22 11:28, Arne Schulz wrote: Dear list, I'd like to do several t-test within a for loop. Example follows: data1- rnorm(1:25) data2- rnorm(1:25) vars- c(data1, data2) for (i in vars) { t.test(i) } Unfortunately, it does not work because of the quotes in the

Re: [R] How to fix slope and estimate intercept

2010-07-22 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Jun Shen Sent: Thursday, July 22, 2010 10:30 AM To: R-help Subject: [R] How to fix slope and estimate intercept Dear all, Is there anyway I can fix slope in some value and

[R] sweep / mapply question

2010-07-22 Thread Claudia Beleites
Dear list, I have a matrix, spc, that should row-wise be interpolated: E.g. spc - matrix (1:1e6, ncol = 250, nrow = 4000, byrow = TRUE) spc [1:10, 1:10] shifts - seq_len (nrow (spc)) wl - seq_len (ncol (spc)) interpolate - function (spc.row, shift, wl) spline (wl + shift, spc.row, xout =

[R] Updating a Data Frame

2010-07-22 Thread harsh yadav
Hi, I have a global data-frame in my R script. At some point in my script, I want to update certain columns of this data-frame by calling in an update function. The function looks like this: # get events data. This populates a global event data frame in the R-script events - getEvents(con,

[R] snow: hierarchical parallelization

2010-07-22 Thread Peter Danenberg
I'm parallelizing some computation on hierarchical data, and would find it natural to do something like this (where a call to parLapply is embedded in outer call to parLapply): cl - makeCluster(rep.int('localhost', 5), type='SOCK') clusterExport(cl, 'cl') parLapply(cl,

[R] Bar Plot Bars Bleed off Plotting Area

2010-07-22 Thread Gregory Gilbert
R Community, I have a stupid little barplot I am trying to construct (Windows XP, R.11.1, 32-bit). Whenever I run it my bars run below the horizontal axis. Can anyone (1) reproduce this and (2) offer a solution? Rather simplistic code follows (I am new to the community) Thanks for your help!

[R] How do I get rid of list elements where the value is NULL before applying rbind?

2010-07-22 Thread Ted Byers
Here is the function that makes the data.frames in the list: funweek - function(df) if (length(df$elapsed_time) 5) { res = fitdist(df$elapsed_time,exp) year = df$sale_year[1] sample = df$sale_week[1] mid = df$m_id[1] estimate = res$estimate sd = res$sd samplesize =

Re: [R] Updating a Data Frame

2010-07-22 Thread Nikhil Kaza
Looks like your event id is unique. If that is so, why not just do ##Not checked events - events[sort(events$event),] dataF - dataF[sort(data$event),] if(doUpdate == 1){ if(!is.null(dataF) nrow(dataF) 0){ events[events$eventid %in% dataF$event, c(timestamp, isSynchronized,timediff)]

Re: [R] How do I get rid of list elements where the value is NULL before applying rbind?

2010-07-22 Thread jim holtman
Here is a function I use to return the non-NULL elements of a list: delete.NULLs - function (x.list) { x.list[unlist(lapply(x.list, length) != 0)] } On Thu, Jul 22, 2010 at 2:22 PM, Ted Byers r.ted.by...@gmail.com wrote: Here is the function that makes the data.frames in the list:

Re: [R] post hoc test for lme using glht ?

2010-07-22 Thread SNAFU1
Thanks, that seems to have cleared it up. (I did cut and paste from the console - I didn't think most of what I tried was very going to be very helpful and didn't want to drown people in spurious info. Sorry for the mistakes) -- View this message in context:

[R] , how to express bar(zeta) in main title in boxplot

2010-07-22 Thread Marcus Liu
Hi everyone, I am plotting a boxplot with main title as main = bquote(paste(.(ts.ind[s]), : , bar(zeta), Boxplot from 2001 to 2009, sep = )) but it doesn't work.  The program said they cannot find the function bar.  Does anyone know how to do it correctly?  Thanks. tin

Re: [R] How to fix slope and estimate intercept

2010-07-22 Thread Jun Shen
Hi, Bill, Thanks. This is what I am looking for. Jun On Thu, Jul 22, 2010 at 1:54 PM, William Dunlap wdun...@tibco.com wrote: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Jun Shen Sent: Thursday, July 22, 2010 10:30 AM To:

Re: [R] Bar Plot Bars Bleed off Plotting Area

2010-07-22 Thread David Winsemius
On Jul 22, 2010, at 2:13 PM, Gregory Gilbert wrote: R Community, I have a stupid little barplot I am trying to construct (Windows XP, R.11.1, 32-bit). Whenever I run it my bars run below the horizontal axis. Can anyone (1) reproduce this and (2) offer a solution? I'm not sure I should

[R] gam() and contrast

2010-07-22 Thread Xia Li
Dear All, I met problems when doing contrast and now really need some help in the model below: Fit=gam(y~treat+SEQUENCE+PERIOD+SEX+s(x),data=dat, random=list(SUBJID=~1),correlation=corAR1(form=~1|SUBJID)) And error message keeps coming out when I want to compare the differences between

Re: [R] Hurst Exponent Estimation

2010-07-22 Thread Hans W Borchers
Spencer Graves spencer.graves at structuremonitoring.com writes: Have you tried something like the following: library(sos) H - ???Hurst summary(H) H This identified 50 links in 15 packages, and displayed the results in a table in a web browser with links to the best match in

Re: [R] Sweave special characters problem

2010-07-22 Thread Bunny, lautloscrew.com
Dear all, i think I am a step further with the issue. I am pretty sure now, that it is not a Sweave problem. It's indeed an encoding problem with my Mac. If i source the file without any sweave source(myRcode.R) I already get an error message, despite the fact that the code is correct. If I

Re: [R] , how to express bar(zeta) in main title in boxplot

2010-07-22 Thread Peter Ehlers
On 2010-07-22 11:44, Marcus Liu wrote: Hi everyone, I am plotting a boxplot with main title as main = bquote(paste(.(ts.ind[s]), : , bar(zeta), Boxplot from 2001 to 2009, sep = )) but it doesn't work. The program said they cannot find the function bar. Does anyone know how to do it

[R] Mathematical expression

2010-07-22 Thread Filoche
Hi everyone. I'm trying to display the r^2 of a linear regression on a plot using text(...). I first build the string to display. However, I can't find why this is not working (it display literally r^2 instead of r superscript 2). r2string = expression(paste(r^2), = , r2); Any help would be

[R] using sample() for a vector of length 1

2010-07-22 Thread Jon BR
Hi All, I'm trying to use the sample function within a loop where the vector being sampled from (the first argument in the function) will vary in length and composition. When the vector is down in size to containing only one element, I run into the undesired behaviour acknowledged in the

Re: [R] using sample() for a vector of length 1

2010-07-22 Thread Henrique Dallazuanna
Try this: x - 10 sample(x, 1, prob = c(rep(0, x - 1), 1)) On Thu, Jul 22, 2010 at 5:31 PM, Jon BR jonsle...@gmail.com wrote: Hi All, I'm trying to use the sample function within a loop where the vector being sampled from (the first argument in the function) will vary in length and

  1   2   >