Re: [R] by function ??

2009-12-09 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Or, more general (if you need to include more than just one variable from TestData), something like by(TestData, LEAID, function(x) median(x$RATIO)) Agreed, this is less appealing for the given example than Ista's code, but might help to better understand by and to generalize its use to other

[R] R: Serial Correlation in panel data regression

2009-12-09 Thread Millo Giovanni
Dear Sayan, no, unfortunately I don't think it will. Here's basically how coeftest() works: if you call the coeftest() function on a model object, say: 'mymodel', it will apply both a 'coef' and a 'vcov' method to mymodel in order to extract beta and vcov(beta) and do a Wald test.

Re: [R] grep() exclude certain patterns?

2009-12-09 Thread Gustaf Rydevik
Hi, Just a quick note regarding google and R: I use www.rseek.org almost exclusively, and it tends to give me the results I need. It is based on google, but uses a number of smart tricks to ferret out R-relevant information. /Gustaf -- Gustaf Rydevik, M.Sci. tel: +46(0)703 051 451

[R] {Lattice} cloud() help

2009-12-09 Thread J Chen
Dear all, I'm a lattice graphics newbie. I'm trying to make a cut through the 3D scatterplot with cloud(), so adding a partially transparent plate perpendicular to the z-axis in order to separate the cloud. code: library(lattice) cloud(Sepal.Width~Petal.Length*Petal.Width, data=iris) Could

Re: [R] Exporting Contingency Tables with xtable

2009-12-09 Thread Gabor Grothendieck
Try the latex function in the Hmisc package. Using the state.* variables built into R for sake of example: library(Hmisc) latex(table(state.division, state.region), rowlabel = X, collabel = Y, file = ) On Wed, Dec 9, 2009 at 12:04 AM, Na'im R. Tyson nty...@clovermail.net wrote: Dear

[R] New version of ecological modelling software available with improved R interface

2009-12-09 Thread Bio7
Dear R users, again with the hope that this application can also be useful for some R users, i like to announce a new Windows version of the ecological modeling software Bio7. For information: Bio7 uses a pure Rserve approach to interface Java and R and has a feature rich GUI to access and

Re: [R] Convert a list of N dataframes to N dataframes

2009-12-09 Thread Karl Ove Hufthammer
On Mon, 7 Dec 2009 13:23:06 -0600 Mark Na mtb...@gmail.com wrote: This worked very nicely (thanks for plyr, Hadley) but now I would like to unlist my list into the individual dataframes, preferably with their original names (data1, etc). I've tried to do this with: ldply(datalist,unlist)

Re: [R] problem with split eating giga-bytes of memory

2009-12-09 Thread jim holtman
Here is an example: # create test data N - 100 x - data.frame(a=sample(LETTERS, N, TRUE), b=sample(letters, N, TRUE), + c=as.numeric(1:N), d=runif(N)) system.time({ + x.df - split(x, x$a) # split + print(sapply(x.df, function(a) sum(a$c))) + }) A B

Re: [R] conditionally merging adjacent rows in a data frame

2009-12-09 Thread Titus von der Malsburg
On Wed, Dec 9, 2009 at 12:11 AM, Gabor Grothendieck ggrothendi...@gmail.com wrote: Here are a couple of solutions. The first uses by and the second sqldf: Brilliant! Now I have a whole collection of solutions. I did a simple performance comparison with a data frame that has 7929 lines. The

Re: [R] conditionally merging adjacent rows in a data frame

2009-12-09 Thread Gabor Grothendieck
On Wed, Dec 9, 2009 at 7:59 AM, Titus von der Malsburg malsb...@gmail.com wrote: On Wed, Dec 9, 2009 at 12:11 AM, Gabor Grothendieck ggrothendi...@gmail.com wrote: Here are a couple of solutions.  The first uses by and the second sqldf: Brilliant!  Now I have a whole collection of solutions.  

Re: [R] conditionally merging adjacent rows in a data frame

2009-12-09 Thread Nikhil Kaza
This is great!! Sqldf is exactly the kind of thing I was looking for, other stuff. I suppose you can speed up both functions 1 and 5 using aggregate and tapply only once, as was suggested earlier. But it comes at the expense of readability. Nikhil On 9 Dec 2009, at 7:59AM, Titus von

[R] Bootstrapping in R

2009-12-09 Thread Trafim Vanishek
Dear all, I have some error trying to bootstrap from a matrix. The error message is Error in sample(n, n * R, replace = TRUE) : element 2 is empty; the part of the args list of '*' being evaluated was: (n, R) vv - c(0.5,3.2,5.4,1.1,1.4,1.2,2.3,2.0) Reg - matrix(data=vv, nrow = 4, ncol = 2)

Re: [R] Bootstrapping in R

2009-12-09 Thread Trafim Vanishek
I missed number of bootstrap replicates R boot(Reg, bootcoeff, R=10) but still it doesn't work Error in statistic(data, original, ...) : unused argument(s) (original) On Wed, Dec 9, 2009 at 2:46 PM, Trafim Vanishek rdapam...@gmail.com wrote: Dear all, I have some error trying to bootstrap

Re: [R] Why cannot get the expected values in my function

2009-12-09 Thread Gavin Simpson
On Tue, 2009-12-08 at 23:22 -0500, David Winsemius wrote: On Dec 8, 2009, at 11:07 PM, rusers.sh wrote: Hi, In the following function, i hope to save my simulated data into the result dataset, but why the final result dataset seems not to be generated. #Function

[R] code

2009-12-09 Thread Rahim Alhamzawi
Dear support, I want to compute the highest probability density for any data. please do you have any code to help me in this subject. I am looking forward to hearing from you as soon as possible.     rahim [[alternative HTML version deleted]]

Re: [R] R echo code chunk runs off the page using Lyx and Sweav

2009-12-09 Thread Mark Connolly
I somehow missed the response posted by Ben Bolker. He is quite correct (happily for me!): \SweaveOpts{keep.source=TRUE} in your LaTeX code will (I think) keep whatever manual formatting you do, in all code chunks (or use keep.source=TRUE) for particular code chunks of concern This

Re: [R] code

2009-12-09 Thread JLucke
?density ?max Rahim Alhamzawi rahimalhamz...@yahoo.co.uk Sent by: r-help-boun...@r-project.org 12/09/2009 05:23 AM To r-h...@stat.math.ethz.ch cc Subject [R] code Dear support, I want to compute the highest probability density for any data. please do you have any code to help me in

Re: [R] problem in labeling the nodes of tree drawn by rpart

2009-12-09 Thread Terry Therneau
In the nodes of the tree, the values of the covariates are represented with a, b or c (tree attached). Try help('text.rpart'), and note the 'pretty' argument therein. There is often not enough room for long labels, and so the default is to do the severe truncation you speak of. Terry Therneau

Re: [R] Printing 'k' levels of factors 'n' times each, but 'n' is unequal for all levels ?

2009-12-09 Thread Uwe Ligges
A Singh wrote: Dear List, I need to print out each of 'k' levels of a factor 'n' times each, where 'n' is the number of elements belonging to each factor. I know that this can normally be done using the gl() command, but in my case, each level 'k' has an unequal number of elements.

Re: [R] Bootstrapping in R

2009-12-09 Thread David Winsemius
On Dec 9, 2009, at 9:05 AM, Trafim Vanishek wrote: I missed number of bootstrap replicates R boot(Reg, bootcoeff, R=10) but still it doesn't work Error in statistic(data, original, ...) : unused argument(s) (original) On Wed, Dec 9, 2009 at 2:46 PM, Trafim Vanishek rdapam...@gmail.com

[R] Greek symbols on ylab= using barchart() {Lattice}

2009-12-09 Thread Peng Cai
Hi All, I'm trying to write ug/m3 as y-label, with greek letter mu replacing u AND 3 going as a power. These commands works in general: plot.new() text(0.5, 0.5, expression(symbol(m))) But, I'm sure about how to do it using barchart() from Lattice. Can anyone help please? Thanks, Peng Cai

Re: [R] Greek symbols on ylab= using barchart() {Lattice}

2009-12-09 Thread baptiste auguie
Hi, try this, barchart(1:2, ylab=expression(mu*g/m^3)) ?plotmath baptiste 2009/12/9 Peng Cai pengcaimaill...@gmail.com: Hi All, I'm trying to write ug/m3 as y-label, with greek letter mu replacing u AND 3 going as a power. These commands works in general: plot.new() text(0.5, 0.5,

[R] Warning for data.table (with ref)?

2009-12-09 Thread Peng Yu
I have following the message dim(refdata) and dimnames(refdata) no longer allow parameter ref=TRUE, use dim(derefdata(refdata)), dimnames(derefdata(refdata)) instead when I loaded data.table. Is it from the package ref? Could it be fixed? Or there is something wrong with my installation?

Re: [R] Significant performance difference between split of a data.frame and split of vectors

2009-12-09 Thread Peng Yu
On Tue, Dec 8, 2009 at 11:06 PM, David Winsemius dwinsem...@comcast.net wrote: On Dec 9, 2009, at 12:00 AM, Peng Yu wrote: On Tue, Dec 8, 2009 at 10:37 PM, David Winsemius dwinsem...@comcast.net wrote: On Dec 8, 2009, at 11:28 PM, Peng Yu wrote: I have the following code, which tests the

[R] Assign variables in a loop to a list

2009-12-09 Thread Márcio Resende
Dear R helpers, I am new in R and I am having trouble with a function. I am proggraming a genetic analysis and there is a script that generates a lot of different matrix, for example x,y and z. And what I am trying to do is to loop the same script for different variables the user will define in

Re: [R] Can elements of a list be passed as multiple arguments?

2009-12-09 Thread Peng Yu
On Tue, Dec 8, 2009 at 11:05 PM, David Winsemius dwinsem...@comcast.net wrote: On Dec 8, 2009, at 11:37 PM, Peng Yu wrote: I want to split a matrix, where both 'u' and 'w' are results of possible ways. However, whenever 'n' changes, the argument passed to mapply() has to change. Is there a

Re: [R] Greek symbols on ylab= using barchart() {Lattice}

2009-12-09 Thread Peng Cai
Hi Baptiste and Others, Thanks for your help. I'm writing: ylab=expression(Concentration(mu*g/m^3)) And its working fine, but is it possible to add a space between Concentration and (mu*g/m^3). Thanks again, Peng Cai On Wed, Dec 9, 2009 at 12:02 PM, baptiste auguie

Re: [R] Significant performance difference between split of a data.frame and split of vectors

2009-12-09 Thread Charles C. Berry
On Wed, 9 Dec 2009, Peng Yu wrote: On Tue, Dec 8, 2009 at 11:06 PM, David Winsemius dwinsem...@comcast.net wrote: On Dec 9, 2009, at 12:00 AM, Peng Yu wrote: On Tue, Dec 8, 2009 at 10:37 PM, David Winsemius dwinsem...@comcast.net wrote: On Dec 8, 2009, at 11:28 PM, Peng Yu wrote: I have

Re: [R] Announcing a new R news site: R-bloggers.com

2009-12-09 Thread Tal Galili
Hello Elijah, You could have not made me happier with your letter. It is a very satisfying compliment for me to be appreciated in general, and specifically by you. I will start by responding to the simpler parts of your e-mail and the proceed into the more interesting parts. My response grew to

[R] equivalent of ifelse

2009-12-09 Thread carol white
Hi, Is there any equivalent for ifelse (except if (cond) expr1 else expr2) which takes an atomic element as argument but returns vector since ifelse returns an object of the same length as its argument? x = c(1,2,3) y = c(4,5,6,7) z = 3 ifelse(z = 3,x,y) would return x and not 1 thanks

Re: [R] Greek symbols on ylab= using barchart() {Lattice}

2009-12-09 Thread baptiste auguie
barchart(1:2, ylab=expression(Concentration (*mu*g/m^3*))) 2009/12/9 Peng Cai pengcaimaill...@gmail.com: Hi Baptiste and Others, Thanks for your help. I'm writing: ylab=expression(Concentration(mu*g/m^3)) And its working fine, but is it possible to add a space between Concentration and

Re: [R] equivalent of ifelse

2009-12-09 Thread Henrique Dallazuanna
Try this: list('TRUE' = x, 'FALSE' = y)[[as.character(as.name(z = 1))]] On Wed, Dec 9, 2009 at 3:40 PM, carol white wht_...@yahoo.com wrote: Hi, Is there any equivalent for ifelse (except if (cond) expr1 else expr2) which takes an atomic element as argument but returns vector since ifelse

Re: [R] Greek symbols on ylab= using barchart() {Lattice}

2009-12-09 Thread Peng Cai
Thanks, it worked! On Wed, Dec 9, 2009 at 12:46 PM, baptiste auguie baptiste.aug...@googlemail.com wrote: barchart(1:2, ylab=expression(Concentration (*mu*g/m^3*))) 2009/12/9 Peng Cai pengcaimaill...@gmail.com: Hi Baptiste and Others, Thanks for your help. I'm writing:

Re: [R] equivalent of ifelse

2009-12-09 Thread David Winsemius
On Dec 9, 2009, at 12:40 PM, carol white wrote: Hi, Is there any equivalent for ifelse (except if (cond) expr1 else expr2) which takes an atomic element as argument but returns vector since ifelse returns an object of the same length as its argument? x = c(1,2,3) y = c(4,5,6,7) z = 3

Re: [R] Significant performance difference between split of a data.frame and split of vectors

2009-12-09 Thread Peng Yu
On Wed, Dec 9, 2009 at 11:20 AM, Charles C. Berry cbe...@tajo.ucsd.edu wrote: On Wed, 9 Dec 2009, Peng Yu wrote: On Tue, Dec 8, 2009 at 11:06 PM, David Winsemius dwinsem...@comcast.net wrote: On Dec 9, 2009, at 12:00 AM, Peng Yu wrote: On Tue, Dec 8, 2009 at 10:37 PM, David Winsemius

Re: [R] equivalent of ifelse

2009-12-09 Thread Duncan Murdoch
On 09/12/2009 12:40 PM, carol white wrote: Hi, Is there any equivalent for ifelse (except if (cond) expr1 else expr2) which takes an atomic element as argument but returns vector since ifelse returns an object of the same length as its argument? I don't understand what's wrong with if

Re: [R] Time Series Rating Model

2009-12-09 Thread ryusuke
http://n4.nabble.com/file/n956255/TimeSeries%2BLikelihood.jpg From the attachment, I need to find out the maximum likelihood value of ξ, while I stuck to write in R codes. I will appreciate of experts advices. Thanks. ryusuke wrote: To R programming experts, I am a undergraduate

Re: [R] equivalent of ifelse

2009-12-09 Thread Márcio Resende
David Winsemius wrote: On Dec 9, 2009, at 12:40 PM, carol white wrote: Hi, Is there any equivalent for ifelse (except if (cond) expr1 else expr2) which takes an atomic element as argument but returns vector since ifelse returns an object of the same length as its argument? x =

Re: [R] arrow plots

2009-12-09 Thread Cable, Samuel B Civ USAF AFMC AFRL/RVBXI
Thanks, all, for the help. Much obliged. I realize now that I should have said that I am using lattice graphics. The par() command has not been helpful in convincing lattice to plot outside of the default window. Any other advice is appreciated. Thanks again. [[alternative HTML

Re: [R] grep() exclude certain patterns?

2009-12-09 Thread Greg Snow
I think that we are talking past each other here. You are clearly not understanding (or at least convinced by) what I am saying, and you are not convincing me (or possibly I am not understanding your arguments). So our efforts will probably be better spent on things other than continuing this

Re: [R] choose.files limit?

2009-12-09 Thread Etienne Bellemare Racine
Gunnar, Did you find a solution, I'm facing the same problem (would like to load 2868 files in one go). Is it a bug, or just something that should be documented in the help. Also, the error message is misleading, as it say it «cannot find» a certain file (the name given here is truncated in my

Re: [R] code

2009-12-09 Thread Greg Snow
There is an hpd function in the TeachingDemos package that may do what you want. There are other hpd related functions in other packages as well. Which will work best for you depends on details that you did not provide. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain

[R] .Rhistory in R.app

2009-12-09 Thread Maria Gouskova
Dear R users, I am having a minor but annoying issue with R.app. It doesn't retain the history information from the previous sessions. By history, I mean a record of commands/functions entered into R rather than the list of objects--that is properly recorded in the .Rdata file as well as in a

[R] Population Histogram

2009-12-09 Thread terry johnson
How would I make a population histogram in R from an excel file? Thanks [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Can elements of a list be passed as multiple arguments?

2009-12-09 Thread David Winsemius
On Dec 9, 2009, at 12:14 PM, Peng Yu wrote: On Tue, Dec 8, 2009 at 11:05 PM, David Winsemius dwinsem...@comcast.net wrote: On Dec 8, 2009, at 11:37 PM, Peng Yu wrote: I want to split a matrix, where both 'u' and 'w' are results of possible ways. However, whenever 'n' changes, the argument

Re: [R] Subset sum problem.

2009-12-09 Thread Hans W Borchers
Geert Janssens janssens-geert at telenet.be writes: Hi, I'm quite new to the R-project. I was suggested to look into it because I am trying to solve the Subset sum problem, which basically is: Given a set of integers and an integer s, does any non-empty subset sum to s? (See

Re: [R] .Rhistory in R.app

2009-12-09 Thread Rolf Turner
I just experimented and I find that, exactly as Maria described, on my system no commands get added to .Rhistory when I start R using the GUI. The ``timestamp'' that is implemented in my .Rprofile gets added, but no commands that I typed in the GUI window appeared. I had never noticed

Re: [R] .Rhistory in R.app

2009-12-09 Thread Rob Goedman
Maria, Try changing the name of .Rhistory in the Startup preferences to something like .Rosxhistory. Press enter to make sure the change is accepted and try again. The problem is that R itself overwrites the file .Rhistory if it is told to save the workspace. Rob On Dec 9, 2009, at 10:33

Re: [R] Significant performance difference between split of a data.frame and split of vectors

2009-12-09 Thread Peng Yu
On Tue, Dec 8, 2009 at 10:37 PM, David Winsemius dwinsem...@comcast.net wrote: On Dec 8, 2009, at 11:28 PM, Peng Yu wrote: I have the following code, which tests the split on a data.frame and the split on each column (as vector) separately. The runtimes are of 10 time difference. When m and

Re: [R] Why cannot get the expected values in my function

2009-12-09 Thread rusers.sh
Thanks very very much. It is really not easy to change from one language to another. :) 2009/12/9 Gavin Simpson gavin.simp...@ucl.ac.uk On Tue, 2009-12-08 at 23:22 -0500, David Winsemius wrote: On Dec 8, 2009, at 11:07 PM, rusers.sh wrote: Hi, In the following function, i hope to

[R] formula () problems

2009-12-09 Thread Dr R.K.S. Hankin
Hi. I am having difficulty creating a formula for use with glm() I have a matrix of an unknown number of columns and wish to estimate a coefficient for each column, and one for the each product of a column with another column. In the case of a five-column matrix this would be: x -

Re: [R] formula () problems

2009-12-09 Thread Marc Schwartz
On Dec 9, 2009, at 2:22 PM, Dr R.K.S. Hankin wrote: Hi. I am having difficulty creating a formula for use with glm() I have a matrix of an unknown number of columns and wish to estimate a coefficient for each column, and one for the each product of a column with another column. In the case

Re: [R] Significant performance difference between split of a data.frame and split of vectors

2009-12-09 Thread David Winsemius
On Dec 9, 2009, at 2:59 PM, Peng Yu wrote: On Tue, Dec 8, 2009 at 10:37 PM, David Winsemius dwinsem...@comcast.net wrote: On Dec 8, 2009, at 11:28 PM, Peng Yu wrote: I have the following code, which tests the split on a data.frame and the split on each column (as vector) separately. The

[R] [R-pkgs] new version of RobASt-family of packages

2009-12-09 Thread Matthias Kohl
The new version 0.7 of our RobASt-family of packages is available on CRAN for several days. As there were many changes we will only sketch the most important ones here. For more details see the corresponding NEWS files (e.g. news(package = RobAStBase) or using function NEWS from package

Re: [R] Significant performance difference between split of a data.frame and split of vectors

2009-12-09 Thread Charles C. Berry
On Wed, 9 Dec 2009, Peng Yu wrote: On Wed, Dec 9, 2009 at 11:20 AM, Charles C. Berry cbe...@tajo.ucsd.edu wrote: On Wed, 9 Dec 2009, Peng Yu wrote: On Tue, Dec 8, 2009 at 11:06 PM, David Winsemius dwinsem...@comcast.net wrote: On Dec 9, 2009, at 12:00 AM, Peng Yu wrote: On Tue, Dec 8,

[R] [R-pkgs] doMPI 0.1-3

2009-12-09 Thread Stephen Weston
I'd like to announce the availability of the new doMPI package, a parallel backend for the foreach package, which acts as an adaptor to the Rmpi package. The package has been uploaded to CRAN and is now available. Like the doSNOW package, doMPI allows you to execute foreach loops in parallel

[R] re-ordering labels issue using barchart().

2009-12-09 Thread Peng Cai
Hi All, I have a question regarding re-ordering legend labels, I'm not sure if it would be possible to do what I'm thinking... Using the following code, I reordered labels for the legend: Now in the stacked bars, we see 1931 values are plotted below 1932 whereas in legend 1931 comes above 1932.

[R] Fwd: Evaluating a function within a pre-defined environment?

2009-12-09 Thread David Reiss
Hi all, I have a somewhat confusing question that I was wondering if someone could help with. I have a pre-defined environment with some variables, and I would like to define a function, such that when it is called, it actually manipulates the variables in that environment, leaving them to be

[R] What is the development cycle where there are code in tests/ for package development?

2009-12-09 Thread Peng Yu
I see 'library(stats)' at the beginning of R-2.10.0/src/library/stats/tests/nls.R. I'm wondering if I am developing my own package 'mypackage' whether I should put 'library(mypackage)' in a .R file in mypackage/tests/? If I do, then it seems awkward to me, because to use 'library(mypackage)', I

Re: [R] Fwd: Evaluating a function within a pre-defined environment?

2009-12-09 Thread Gabor Grothendieck
e - new.env() e$x - 2 f - function(a, e) { e$x - e$x + a; e$x } f(3, e) e$x # 5 Another way to accomplish this is to use the proto package which puts the whole thing into an object oriented framework. See http://r-proto.googlecode.com library(proto) p - proto(x = 2, f = function(this, a) {

Re: [R] Fwd: Evaluating a function within a pre-defined environment?

2009-12-09 Thread David Reiss
Ideally I would like to be able to use the function f (in my example) as-is, without having to designate the environment as an argument, or to otherwise have to use e$x in the function body. thanks for any further advice... On Wed, Dec 9, 2009 at 2:36 PM, Gabor Grothendieck

Re: [R] Population Histogram

2009-12-09 Thread milton ruser
1. Read the posting guide: http://www.R-project.org/posting-guide.htmlhttp://www.r-project.org/posting-guide.html 2. Did you installed R? 2.1. Case yes, go to the help, click on Manual in PDF bests miltinho On Wed, Dec 9, 2009 at 1:47 PM, terry johnson terry.johnson@gmail.comwrote:

Re: [R] Subset sum problem.

2009-12-09 Thread Geert Janssens
On Wednesday 9 December 2009, Hans W Borchers wrote: Geert Janssens janssens-geert at telenet.be writes: Hi, I'm quite new to the R-project. I was suggested to look into it because I am trying to solve the Subset sum problem, which basically is: Given a set of integers and an integer s,

Re: [R] Fwd: Evaluating a function within a pre-defined environment?

2009-12-09 Thread Gabor Grothendieck
You could write a wrapper function that accepts the output of the function you don't want to change and then sets the values. # f is function we don't want to change f - function(a) x + a wrapper - function(x, e) { environment(f) - e e$x - f(x) } e - new.env() e$x - 2 wrapper(3, e) e$x #

[R] Fwd: conditionally merging adjacent rows in a data frame

2009-12-09 Thread Marek Janad
I've also made some comparisons and taking into account execution time, sqldf wins. SummaryBy is better then aggregate in some specific situations I met in practice. I present this situation below. It assumes, that there are at least two groups with high number of levels. n-10;

[R] Plotting frequency curve over histogram

2009-12-09 Thread Gaurav Moghe
Hello, This is a problem for which there seem to be several solutions online, but not really. My question was about plotting a curve over the histogram. All the previous posts and messages talk about generating a *density histogram*using (freq=F) and then plotting the density curve. However, I

[R] Difficulty with terminal properly displaying help function in an ESS remote session

2009-12-09 Thread Matthew Keller
Hi all, I'm logging into a Debian server and running R remotely using ESS. The steps I use to do this are below (pasted from my webpage). However, we're having a problem whenever we want to use the help function, e.g., ?hist The remote buffer gives a warning: WARNING: terminal is not fully

Re: [R] Exporting Contingency Tables with xtable

2009-12-09 Thread Na'im R. Tyson
Gabor, Thanks for the advice. Using the 'rowlabel' switch works, but when used with the 'collabel' switch, I received the following error in Latex 2e: ! LaTeX Error: Illegal character in array arg. The line that LaTeX has issue with is: \multicolumn{1}{observed}{uh} The entire table

Re: [R] Plotting frequency curve over histogram

2009-12-09 Thread Rolf Turner
On 10/12/2009, at 12:52 PM, Gaurav Moghe wrote: Hello, This is a problem for which there seem to be several solutions online, but not really. My question was about plotting a curve over the histogram. All the previous posts and messages talk about generating a *density histogram*using

Re: [R] Plotting frequency curve over histogram

2009-12-09 Thread Ted Harding
On 09-Dec-09 23:52:20, Gaurav Moghe wrote: Hello, This is a problem for which there seem to be several solutions online, but not really. My question was about plotting a curve over the histogram. All the previous posts and messages talk about generating a *density histogram* using (freq=F)

Re: [R] Fwd: Evaluating a function within a pre-defined environment?

2009-12-09 Thread Charles C. Berry
On Wed, 9 Dec 2009, David Reiss wrote: Ideally I would like to be able to use the function f (in my example) as-is, without having to designate the environment as an argument, or to otherwise have to use e$x in the function body. thanks for any further advice... Perhaps you want something

[R] How to figure out which the version of split is used?

2009-12-09 Thread Peng Yu
There are a number of functions that are dispatched to from split(). methods('split') [1] split.data.frame split.Date split.defaultsplit.POSIXct Is there a way to figure out which of these variants is actually dispatched to when I call split? I know that if the argument is of the type

Re: [R] confint for glm (general linear model)

2009-12-09 Thread David Winsemius
On Dec 9, 2009, at 9:21 PM, casperyc wrote: does no one know this? Have you read the Posting Guide? -- View this message in context: http://n4.nabble.com/confint-for-glm-general-linear-model-tp954071p956658.html Sent from the R help mailing list archive at Nabble.com. David Winsemius,

[R] Have you used RGoogleDocs and RGoogleData?

2009-12-09 Thread Farrel Buchinsky
Both of these applications fulfill a great need of mine: to read data directly from google spreadsheets that are private to myself and one or two collaborators. Thanks to the authors. I had been using RGoogleDocs for the about 6 months (maybe more) but have had to stop using it in the past month

Re: [R] confint for glm (general linear model)

2009-12-09 Thread casperyc
I think the help page are exactly the same... I just want to verify the confidence interval manually. That's all I want. Thanks. casper brestat wrote: This functions are different. I advice you study them: ?confint # profile likelihood ?confint.default # t-distribution Walmes

Re: [R] confint for glm (general linear model)

2009-12-09 Thread David Winsemius
On Dec 9, 2009, at 9:50 PM, casperyc wrote: I think the help page are exactly the same... I cannot tell what you maen by this. I just want to verify the confidence interval manually. That's all I want. Then provide some reproducible code and data. ... as the Posting Guide explains

Re: [R] [Rd] split() is slow on data.frame (PR#14123)

2009-12-09 Thread Peng Yu
I make a version for matrix. Because, it would be more efficient to split each column of a matrix than to convert a matrix to a data.frame then call split() on the data.frame. Note that the version for a matrix and a data.frame is slightly different. Would somebody add this in R as well?

Re: [R] [Rd] split() is slow on data.frame (PR#14123)

2009-12-09 Thread Peng Yu
Sorry. I sent this to r-help by mistake. Could somebody help delete it from the archive? On Wed, Dec 9, 2009 at 9:29 PM, Peng Yu pengyu...@gmail.com wrote: I make a version for matrix. Because, it would be more efficient to split each column of a matrix than to convert a matrix to a data.frame

[R] Assigning variables into an environment.

2009-12-09 Thread Rolf Turner
I am working with a somewhat complicated structure in which I need to deal with a function that takes ``basic'' arguments and also depends on a number of parameters which change depending on circumstances. I thought that a sexy way of dealing with this would be to assign the parameters as

Re: [R] How to make the assignment in a for-loop not affect variables outside the loop?

2009-12-09 Thread Peng Yu
2009/11/22 Uwe Ligges lig...@statistik.tu-dortmund.de: Either use local as in: n=10 local(for(i in 1:n){     n=3     print(n) }) print(n) 'local()' makes everything inside it unavailable outside of it. Is there a way to make 'n' unavailable outside but still make 'b' available outside

[R] What is the function to test if a vector is ordered or not?

2009-12-09 Thread Peng Yu
I did a search on www.rseek.org to look for the function to test if a vector is ordered or not. But I don't find it. Could somebody let me know what function I should use? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] Counting Frequencies

2009-12-09 Thread BIGBEEF
Hi - I'm having difficulty with frequencies in R. I have a table with a variable (column) called difference 600 observations (rows). I would like to know how many values are -0.5 as well as how many are 0.5. The rest are obviously in the middle. In SAS I could this immediately but am unable to

Re: [R] confint for glm (general linear model)

2009-12-09 Thread brestat
This functions are different. I advice you study them: ?confint # profile likelihood ?confint.default # t-distribution Walmes Zeviani - Brazil casperyc wrote: Hi, I have a glm gives summary as follows, Estimate Std. Errorz valuePr(|z|)

Re: [R] Subset sum problem.

2009-12-09 Thread Geert Janssens
On Wednesday 9 December 2009, Hans W Borchers wrote: Geert Janssens janssens-geert at telenet.be writes: Hi, I'm quite new to the R-project. I was suggested to look into it because I am trying to solve the Subset sum problem, which basically is: Given a set of integers and an integer s,

Re: [R] Plotting frequency curve over histogram

2009-12-09 Thread nivas
Hi, Guarav go for this site.He is the one designed R. http://www.stat.auckland.ac.nz/~ihaka/courses/120/lectures.html http://www.stat.auckland.ac.nz/~ihaka/?Teaching It might be helpful.I am not sure. thanks. -- View this message in context:

[R] simple data manipulation question

2009-12-09 Thread dolar
Hi there I have a dataframe of a whole lot of variables lets say, one of my variables is gender how do I simply get an average of all other variables by gender? -- View this message in context: http://n4.nabble.com/simple-data-manipulation-question-tp956600p956600.html Sent from the R help

[R] Need help to forecasting the data of the time series .

2009-12-09 Thread nivas
Hi, This is the time series data collected from 2001 to 2008 by every month.so,there are 96 entries.I have done basic statistics.I need to find a model fitted to forecast this data.This is the mixedpaper collection for recycling in the campus. 13251 13754 19061 12631 17414 21350

Re: [R] What is the function to test if a vector is ordered or not?

2009-12-09 Thread Marc Schwartz
On Dec 9, 2009, at 10:10 PM, Peng Yu wrote: I did a search on www.rseek.org to look for the function to test if a vector is ordered or not. But I don't find it. Could somebody let me know what function I should use? If by ordered, you mean sorted, then ?is.unsorted is.unsorted(c(1, 4, 2,

Re: [R] Subset sum problem.

2009-12-09 Thread Hans W Borchers
Geert Janssens janssens-geert at telenet.be writes: On Wednesday 9 December 2009, Hans W Borchers wrote: Geert Janssens janssens-geert at telenet.be writes: [ ... ] Has anybody tackled this issue before in R ? If so, I would be very grateful if you could share your solution with me.

Re: [R] Assigning variables into an environment.

2009-12-09 Thread Gabor Grothendieck
R uses lexical scoping, not dynamic scoping. It does not matter where bar is called from. What matters is where bar was defined and since bar was defined in the global environment that is where its free variables are looked up thus environment(bar) is the global environment. Try changing foo to

Re: [R] What is the function to test if a vector is ordered or not?

2009-12-09 Thread jim holtman
Try all(diff(order(yourVector)) == 1) On Wed, Dec 9, 2009 at 10:10 PM, Peng Yu pengyu...@gmail.com wrote: I did a search on www.rseek.org to look for the function to test if a vector is ordered or not. But I don't find it. Could somebody let me know what function I should use?

Re: [R] Assigning variables into an environment.

2009-12-09 Thread hadley wickham
On Wed, Dec 9, 2009 at 9:43 PM, Rolf Turner r.tur...@auckland.ac.nz wrote: I am working with a somewhat complicated structure in which I need to deal with a function that takes ``basic'' arguments and also depends on a number of parameters which change depending on circumstances. I thought

Re: [R] Counting Frequencies

2009-12-09 Thread Wensui Liu
x - runif(10, 0, 1) x2 - x 0.5 x2 [1] TRUE TRUE FALSE FALSE FALSE TRUE TRUE FALSE TRUE FALSE table(x2) x2 FALSE TRUE 5 5 On Wed, Dec 9, 2009 at 6:36 PM, BIGBEEF martin.beze...@gmail.com wrote: Hi - I'm having difficulty with frequencies in R. I have a table with a

Re: [R] Population Histogram

2009-12-09 Thread Jim Lemon
On 12/10/2009 05:47 AM, terry johnson wrote: How would I make a population histogram in R from an excel file? Thanks Hi Terry, library(gdata) ozpop-read.xls(ozpop.xls) xycol-color.gradient(c(0,0,0.5,1),c(0,0,0.5,1),c(1,1,0.5,1),18)

Re: [R] Counting Frequencies

2009-12-09 Thread Jim Lemon
On 12/10/2009 10:36 AM, BIGBEEF wrote: Hi - I'm having difficulty with frequencies in R. I have a table with a variable (column) called difference 600 observations (rows). I would like to know how many values are -0.5 as well as how many are 0.5. The rest are obviously in the middle. In SAS I

Re: [R] Population Histogram

2009-12-09 Thread Jim Lemon
On 12/10/2009 04:39 PM, Jim Lemon wrote: On 12/10/2009 05:47 AM, terry johnson wrote: How would I make a population histogram in R from an excel file? Thanks Hi Terry, library(gdata) ozpop-read.xls(ozpop.xls) xycol-color.gradient(c(0,0,0.5,1),c(0,0,0.5,1),c(1,1,0.5,1),18)