[R] Variance generic function:

2008-10-26 Thread Han Lin Shang
Hi Dear R-users: I am building a R package and would like to create a generic variance function. Here is how I did var=function(x,...) { UseMethod(var) } I wrote a Rd file, put the R code in the right directory, and named var, var.default in the namespace. However, once I typed rcmd check ,

[R] Code contribution

2008-10-26 Thread Андрей Парамонов
Hello group! I mantain my own package cmrutils which is available under the GPL: http[s]://aparamon.msk.ru/svn/study/R-packages/cmrutils I don't want to put it to CRAN yet because it mostly consists of specialized helper functions which are presumably not valuable for other people. But I think

[R] increase symbol size in expression - axis label of a plot

2008-10-26 Thread Marten Winter
Heja, It took me a while to find a way of implementing normal text as subscripted text in a expression followed by another expression and more subscripted text :O) It looks now as this: ylab=expression(Delta^+~[paste(my subscripted text)]~~Delta^+~[paste(my subscripted text)]) I use several

Re: [R] ggplot2: how to combine position=stack and position=dodge in a single graph?

2008-10-26 Thread Sebastian Krollmann
Hi Hadley, I tried to replicate dodging in combination with stacking by facetting as you suggested. In principle this works, but identifying the bars for different years is very difficult, since the all bar colors are the same (see my code below). Is there a way of having the bars within each

Re: [R] combining data from different datasets

2008-10-26 Thread Dr Eberhard W Lisse
Yes, it does. Thanks. el On 25 Oct 2008, at 03:32 , Steven McKinney wrote: If you are using regular R graphs (i.e. not lattice or other library graphics) try setting the margins with the mar argument to par() e.g. par(mar = c(5, 10, 5, 1)) The four numbers specify the amount of margin room

Re: [R] Transferring results from R to MS Word

2008-10-26 Thread Tom Backer Johnsen
Liviu Andronic wrote: On Sat, Oct 25, 2008 at 9:05 PM, Tom Backer Johnsen [EMAIL PROTECTED] wrote: I am a new user of R. My problem is how to read excel data files. How can I read a file called stock in R. What statement I should use? It could help to start learning R with a GUI like Rcmdr.

Re: [R] Transferring results from R to MS Word

2008-10-26 Thread Tom Backer Johnsen
Frank E Harrell Jr wrote: Tom Backer Johnsen wrote: Frank E Harrell Jr wrote: Tom Backer Johnsen wrote: I hadn't thought of the 'different random sample' approach. That's neat. Frank Yes, I am quite proud of that. The program that does the sampling and mailing is called Distras. Is

[R] Using the legend function inside a bar chart error.bars function

2008-10-26 Thread Sarah Vandome
Hello, I am just starting out using R on my Uni course. I have been given a function to work with that adds error bars to a bar chart. I want to add a legend and have been trying to amend the code in the function error.bars (see below) so it automatically places a legend on the chart. It does

Re: [R] Using the legend function inside a bar chart error.bars function

2008-10-26 Thread Jim Lemon
Sarah Vandome wrote: Hello, I am just starting out using R on my Uni course. I have been given a function to work with that adds error bars to a bar chart. I want to add a legend and have been trying to amend the code in the function error.bars (see below) so it automatically places a legend

Re: [R] Code contribution

2008-10-26 Thread Liviu Andronic
Hello, On Sat, Oct 25, 2008 at 7:25 PM, Андрей Парамонов [EMAIL PROTECTED] wrote: I don't want to put it to CRAN yet because it mostly consists of specialized helper functions which are presumably not valuable for other people. But I think 2 of the functions are general and useful enough to

Re: [R] Barplot Labels Problem

2008-10-26 Thread Rodrigo Aluizio
Thanks for the help Jim, The legend function solved the legend border problem but the labels, even using staxlab from plotrix are still being cut by the device limits, like there is some kind of character number limits or something like that. Anyway thank you so much, I'll keep trying and

[R] Mallows' distance or Earth Mover's distance in R?

2008-10-26 Thread Rainer M Krug
Hi I am looking for an implementation (or alternative to) Mallow's distance or the Earth Mover's distance to compare distributions or unnormalized distributions (signatures). Is there an implementation in R or can somebody recommend an alternative? Thanks Rainer -- Rainer M. Krug, PhD

[R] alternative to Crystal Ball ?

2008-10-26 Thread Liviu Andronic
Dear R users, I am looking for R packages that would best approximate Oracle's Crystall Ball [1]. For those not familiar: Crystal Ball software is a leading spreadsheet-based software suite for predictive modeling, forecasting, Monte Carlo simulation and optimization. [..] Crystal Ball is used by

[R] orthographic projection of ellipsoids

2008-10-26 Thread baptiste auguie
Dear list, I've generated a list of 3D coordinates representing ellipsoids in arbitrary orientations. I'm now trying to obtain a 2D projection of the scene, that is to draw the silhouette of each object on a plane (x,y). The only way I could think of is to compute the convex hull of the

Re: [R] Transferring results from R to MS Word

2008-10-26 Thread Tom Backer Johnsen
To reply to myself, for anything that can be coerced into a table (matrices, vectors) the best solution seems to to use the write.table () function to write a .csv file, which is easily opened with a spreadsheet. The alternative is to use the HTML2clip () function (or the HTML function) in

Re: [R] Mallows' distance or Earth Mover's distance in R?

2008-10-26 Thread Matthias Kohl
Hi Rainer, we have not implemented the Mallow's distance so far. Out package distrEx includes implementations of the Hellinger, the Kolmogorov, the total variation and the Cramer von Mises distance. Combined with our package distrMod one can compute minimum distance estimators.

Re: [R] Transferring results from R to MS Word

2008-10-26 Thread Marc Schwartz
on 10/26/2008 08:58 AM Tom Backer Johnsen wrote: To reply to myself, for anything that can be coerced into a table (matrices, vectors) the best solution seems to to use the write.table () function to write a .csv file, which is easily opened with a spreadsheet. The alternative is to use the

Re: [R] Transferring results from R to MS Word

2008-10-26 Thread Gabor Grothendieck
Seems there is a bug in one of the HTML methods in that digits= either does not get passed or used in certain cases. It does seem that the HTML.data.frame method is not affected so this would be a workaround: HTML2clip(as.data.frame(mean(attitude)), digits = 10) On Sun, Oct 26, 2008 at 9:58

Re: [R] Transferring results from R to MS Word

2008-10-26 Thread Tom Backer Johnsen
Frank E Harrell Jr wrote: Tom Backer Johnsen wrote: Frank E Harrell Jr wrote: Tom Backer Johnsen wrote: Frank E Harrell Jr wrote: Tom Backer Johnsen wrote: I hadn't thought of the 'different random sample' approach. That's neat. Frank Yes, I am quite proud of that. The program that

Re: [R] Transferring results from R to MS Word

2008-10-26 Thread Tom Backer Johnsen
Gabor Grothendieck wrote: Seems there is a bug in one of the HTML methods in that digits= either does not get passed or used in certain cases. It does seem that the HTML.data.frame method is not affected so this would be a workaround: HTML2clip(as.data.frame(mean(attitude)), digits = 10) Ah.

Re: [R] Transferring results from R to MS Word

2008-10-26 Thread Gabor Grothendieck
I have sent an email to the maintainer about it. On Sun, Oct 26, 2008 at 10:51 AM, Tom Backer Johnsen [EMAIL PROTECTED] wrote: Gabor Grothendieck wrote: Seems there is a bug in one of the HTML methods in that digits= either does not get passed or used in certain cases. It does seem that the

Re: [R] Transferring results from R to MS Word

2008-10-26 Thread Tom Backer Johnsen
Gabor Grothendieck wrote: I have sent an email to the maintainer about it. Thanks! Tom __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

[R] Two sample Cramer-von Mises test

2008-10-26 Thread legendy
Hall all, Where can I find the two sample Cramer-von Mises test in R package? Thank you. Legendy -- View this message in context: http://www.nabble.com/Two-sample-Cramer-von-Mises-test-tp20174229p20174229.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Transferring results from R to MS Word

2008-10-26 Thread Ben Bolker
[apologies if I messed up the quoting] Tom Backer Johnsen backer at psych.uib.no writes: Frank E Harrell Jr wrote I hope you'll keep the community posted on that. If you ever have a need for a function in R for linux that makes e-mailing easy, I have one. Now, that is interesting.

[R] LMER quasibinomial

2008-10-26 Thread Daniel Malter
Hi, a while ago I posted a question regarding the use of alternative models, including a quasibinomial mixed-effects model (see Results 1). I rerun the exact same model yesterday using R 2.7.2 and lme4_0.999375-26 (see Results 2) and today using R 2.7.2 and lme4_0.999375-27 (see Results 3).

Re: [R] Two sample Cramer-von Mises test

2008-10-26 Thread Jorge Ivan Velez
Dear Legendy, Take a look at http://finzi.psych.upenn.edu/R/library/CvM2SL2Test/html/cvmts.pval.html HTH, Jorge On Sun, Oct 26, 2008 at 10:49 AM, legendy [EMAIL PROTECTED] wrote: Hall all, Where can I find the two sample Cramer-von Mises test in R package? Thank you. Legendy --

[R] acf() and ccf() - acf() on a data-frame: so many plots...

2008-10-26 Thread Oliver Bandel
Hello, when using acf, there is a blue stripped line in the plot. What is the meaning of it? Another question on acf(): when I use adc() on a data-frame it automatically creates a lot of seperated acf-plots. But there are combinations of plots, which seem to be ccf() and not acf(). Is this a

[R] pattern matching

2008-10-26 Thread John Lande
dear all, I have a little problem I am doing a loop, witha grep function. sometimes it happens that have the following results tmp - grep(x, y) tmp integer(0) how can I recognise this outcome? is.na is not working of course, so what else? thank you [[alternative HTML version

[R] Upgrade

2008-10-26 Thread rkevinburton
I recentlry tried to upgrade to 2.8.0. I ended up uninstalling 2.7.2 and installing 2.8.0 becuase the line in the FAQ states: That's a matter of taste. For most people the best thing to do is to uninstall R (see the previous Q), install the new version, copy any installed packages to the

Re: [R] pattern matching

2008-10-26 Thread Marc Schwartz
on 10/26/2008 10:54 AM John Lande wrote: dear all, I have a little problem I am doing a loop, witha grep function. sometimes it happens that have the following results tmp - grep(x, y) tmp integer(0) how can I recognise this outcome? is.na is not working of course, so what else?

Re: [R] pattern matching

2008-10-26 Thread Duncan Murdoch
On 26/10/2008 11:54 AM, John Lande wrote: dear all, I have a little problem I am doing a loop, witha grep function. sometimes it happens that have the following results tmp - grep(x, y) tmp integer(0) how can I recognise this outcome? is.na is not working of course, so what else?

Re: [R] Upgrade

2008-10-26 Thread Duncan Murdoch
On 26/10/2008 2:48 PM, [EMAIL PROTECTED] wrote: I recentlry tried to upgrade to 2.8.0. I ended up uninstalling 2.7.2 and installing 2.8.0 becuase the line in the FAQ states: That's a matter of taste. For most people the best thing to do is to uninstall R (see the previous Q), install the new

[R] weird behavior with the 3rd root....

2008-10-26 Thread Juan Manuel Barreneche
Well, this is what i got... -0.084121928394^(1/3) [1] -0.438163696867656 (-0.084121928394)^(1/3) [1] NaN and i don't have a clue of why this happens or how to avoid it, any suggestions? thank you, Juan __ R-help@r-project.org mailing list

[R] Process dataframes from list

2008-10-26 Thread Wade Wall
Hi all, I have roughly fifty dataframes and a dataframe with the names of the fifty dataframes. I want to perform the same set of manipulations on all fifty dataframes, but can't find a way to batch process from a list with the dataframe names using a loop. Is there a way to read the file names

Re: [R] weird behavior with the 3rd root....

2008-10-26 Thread Gábor Csárdi
'^' has higher precedence than '-', i.e. your first line is equivalent to - ( 0.08xyz. ^(1/3) ) Gabor On Sun, Oct 26, 2008 at 9:05 PM, Juan Manuel Barreneche [EMAIL PROTECTED] wrote: Well, this is what i got... -0.084121928394^(1/3) [1] -0.438163696867656

Re: [R] Process dataframes from list

2008-10-26 Thread Gábor Csárdi
Wade, from your description it is not clear to me whether you have fifty _R objects_ or fifty files containing tables (i.e. data frames). If the former, you can do something like a - data.frame(1:10) b - data.frame(10:1) c - data.frame(letters[1:20]) my.data.frames - data.frame( name=c(a, b, c)

Re: [R] weird behavior with the 3rd root....

2008-10-26 Thread Duncan Murdoch
On 26/10/2008 4:05 PM, Juan Manuel Barreneche wrote: Well, this is what i got... -0.084121928394^(1/3) [1] -0.438163696867656 (-0.084121928394)^(1/3) [1] NaN and i don't have a clue of why this happens or how to avoid it, any suggestions? R won't raise negative numbers to

Re: [R] Process dataframes from list

2008-10-26 Thread Kaom Te
I think you need to be a bit more specific on this one. What is the format of your data.frames? On disk or actually in your workspace? Example code would also help. Even psuedo code describing what you want to do. Regards, Kaom On Oct 26, 2008, at 1:10 PM, Wade Wall wrote: Hi all,

Re: [R] Process dataframes from list

2008-10-26 Thread hadley wickham
You might want to have a look at the plyr package - http://had.co.nz/plyr. The intro pdf describes a couple of problems that are similar to yours. Hadley On Sun, Oct 26, 2008 at 3:10 PM, Wade Wall [EMAIL PROTECTED] wrote: Hi all, I have roughly fifty dataframes and a dataframe with the names

Re: [R] Two sample Cramer-von Mises test

2008-10-26 Thread legendy
HTH, Thank you for your help. Legendy Jorge Ivan Velez wrote: Dear Legendy, Take a look at http://finzi.psych.upenn.edu/R/library/CvM2SL2Test/html/cvmts.pval.html HTH, Jorge On Sun, Oct 26, 2008 at 10:49 AM, legendy [EMAIL PROTECTED] wrote: Hall all, Where can I

Re: [R] Upgrade

2008-10-26 Thread Gabor Grothendieck
You don't have to uninstall R 2.7.2. I usually keep a few past versions of R in case I need to go backward. There are two batchfiles at http://batchfiles.googlecode.com called movedir.bat and copydir.bat . They are self contained so you only have to put whichever you intend to use anywhere in

[R] odd behaviour of identical

2008-10-26 Thread Wacek Kusnierczyk
given what ?identical says, i find the following odd: x = 1:10 y = 1:10 all.equal(x,y) [1] TRUE identical(x,y) [1] TRUE y[11] = 11 y = y[1:10] all.equal(x,y) [1] TRUE identical(x,y) [1] FALSE y [1] 1 2 3 4 5 6 7 8 9 10 length(y) [1] 10 looks like a bug. platform i686-pc-linux-gnu

Re: [R] odd behaviour of identical

2008-10-26 Thread markleeds
the str function shows that x is an int and y is a num so it's probably not a bug. or maybe the conversion to num is but probably not the identical. x = 1:10 y = 1:10 all.equal(x,y) identical(x,y) y[11] = 11 y = y[1:10] all.equal(x,y) identical(x,y) print(str(y)) print(str(x)) On

Re: [R] odd behaviour of identical

2008-10-26 Thread jim holtman
If you want them to be identical, then you have to explicitly assign an integer to the vector so that conversion is not done: x = 1:10 y = 1:10 all.equal(x,y) [1] TRUE identical(x,y) [1] TRUE y[11] = 11L y = y[1:10] all.equal(x,y) [1] TRUE identical(x,y) [1] TRUE On Sun, Oct 26,

Re: [R] odd behaviour of identical

2008-10-26 Thread Wacek Kusnierczyk
it's the assignment y[11] = 11 that causes y to become num: y = 1:10 is(y) # integer vector numeric y[11] = 11 is(y) # numeric vector y = (1:11)[1:10] is(y) # integer vector numeric anyway, i think this should be considered a bug. the conversion is irrational in this case. this touches

Re: [R] odd behaviour of identical

2008-10-26 Thread Wacek Kusnierczyk
smells bad design. jim holtman wrote: If you want them to be identical, then you have to explicitly assign an integer to the vector so that conversion is not done: x = 1:10 y = 1:10 all.equal(x,y) [1] TRUE identical(x,y) [1] TRUE y[11] = 11L y = y[1:10]

[R] Problem with script

2008-10-26 Thread Carlos López
Hello :-) I am trying to run the next script, it generates random areas inside a map of the american continent, and then plot it, it´s suppose that every frame gives you the evolution of the program but at some point it stops with the weirdest of the errors I´ve ever seen in R, I don´t even have

Re: [R] Problem with script

2008-10-26 Thread jim holtman
It is not a weird error. It means that one side of the logical test had NA: if(1==1) 1 [1] 1 if (NA==1) 1 Error in if (NA == 1) 1 : missing value where TRUE/FALSE needed So use traceback() to maybe see what is happening. I would also suggest that you put options(error=utils::recover) in

Re: [R] Transferring results from R to MS Word

2008-10-26 Thread Tom Backer Johnsen
Hans-Peter Suter wrote: what about: ?write.xls from my xlsReadWrite package? Sorry, I did not even think to look for something along the lines of what the name of the package suggests. I'll have a look at it! Tom __ R-help@r-project.org mailing

Re: [R] Transferring results from R to MS Word

2008-10-26 Thread Frank E Harrell Jr
Tom Backer Johnsen wrote: Frank E Harrell Jr wrote: Tom Backer Johnsen wrote: Frank E Harrell Jr wrote: Tom Backer Johnsen wrote: Frank E Harrell Jr wrote: Tom Backer Johnsen wrote: I hadn't thought of the 'different random sample' approach. That's neat. Frank Yes, I am quite proud of

Re: [R] How do I sign off this server

2008-10-26 Thread Fresen, John
I signed onto this R-help server. It's wonderful but I'm getting to many e-mails all mixed up with other important e-mails. I can't cope with it all. How do I sign off? Thanks John John L. Fresen, PhD Department of Statistics, 134N Middlebush Hall University of Missouri-Columbia,

Re: [R] How do I sign off this server

2008-10-26 Thread Jorge Ivan Velez
Dear John, Go to https://stat.ethz.ch/mailman/listinfo/r-help At the bottom, type your email and then do click on Unsubscribe or edit options. HTH, Jorge On Sun, Oct 26, 2008 at 11:42 PM, Fresen, John [EMAIL PROTECTED] wrote: I signed onto this R-help server. It's wonderful but I'm