Re: [R] eval and parent.frame [was: Error in Design package: dataset not found for options(datadist)]

2008-04-22 Thread Gad Abraham
Charles C. Berry wrote: On Tue, 22 Apr 2008, Gad Abraham wrote: Charles C. Berry wrote: On Sat, 19 Apr 2008, Gad Abraham wrote: Charles C. Berry wrote: On Fri, 18 Apr 2008, Gad Abraham wrote: Frank E Harrell Jr wrote: Gad Abraham wrote: Hi, Design isn't strictly an R base

Re: [R] R CMD check PACKAGE Error

2008-04-22 Thread Johannes Graumann
Prof Brian Ripley wrote: One thing I should add for the archives -- R 2.7.0 and later have oNew function showNonASCII() in package tools to aid detection of non-ASCII characters in .R and .Rd files. Is there any chance of having the output of this show up in the test log when

[R] g(x,y) = f(x,y) - e(x)- e(y)?

2008-04-22 Thread William Simpson
Hi everyone, The following is mysterious to me. David Brillinger (famous statistician at Berkeley) has an equation in a paper that is essentially g(x,y) = f(x,y) - e(x)- e(y) These are continuous functions. I am not sure how to do this with the discrete equivalents in R. Please tell me how to do

Re: [R] R CMD check PACKAGE Error

2008-04-22 Thread Prof Brian Ripley
On Tue, 22 Apr 2008, Johannes Graumann wrote: Prof Brian Ripley wrote: One thing I should add for the archives -- R 2.7.0 and later have oNew function showNonASCII() in package tools to aid detection of non-ASCII characters in .R and .Rd files. Is there any chance of having

Re: [R] Documentation General Comments

2008-04-22 Thread Gavin Simpson
On Mon, 2008-04-21 at 18:55 -0400, esmail bonakdarian wrote: I realize the R developers are probably overwhelmed and have little time for this, but the documentation really needs some serious reorganizaton. A good through description of basic variable types would help a lot, e.g. the

Re: [R] read variable global in R tcltk

2008-04-22 Thread Philippe Grosjean
Read ?tclvalue. For instance, you can do: tclvalue(tcl_library) # Read the content of a Tcl variable [1] /usr/local/lib/tcl8.4 .Tcl(set myvar 1) # Create a variable inside Tcl Tcl 1 tclvalue(myvar)# Read its value [1] 1 To make sure you create global variables in

[R] how to calcualte the predicted value of dependent varialbe using gsl package

2008-04-22 Thread man4ish
Dear Sir, I am trying to use Gsl package ,it is working fine. But how can i use it for predicting the dependent variable using independent variables.eg y x1 x2 x3 x4x5 x6 x7 x8 x9 5 1 2 3 469 0 0 6 22 3 4 560 99 0 1 3 4 56 7 8

Re: [R] Documentation General Comments

2008-04-22 Thread baptiste Auguié
After a few months now of climbing the R learning curve (thanks to the list, btw), I've now entered the stage where I sometimes get to hold the torch and safety rope for newcomers around me. Writing your own package makes you very aware of the issues discussed in this thread. However, I see

[R] R 2.7.0 is released

2008-04-22 Thread Peter Dalgaard
I've rolled up R-2.7.0.tar.gz a short while ago. This is a development release which contains a number of new features. Also, a number of mostly minor bugs have been fixed. See the full list of changes below. You can get it (later today) from

Re: [R] Labelling a secondary axis in R

2008-04-22 Thread Nakamura
Thanks, the problem was solved using the line mtext('Probability',4,cex=1.25,at=50,3) Rob Charles Annis, P.E. wrote: If you just want the title, look at ?mtext. Charles Annis, P.E. [EMAIL PROTECTED] phone: 561-352-9699 eFax: 614-455-3265 http://www.StatisticalEngineering.com

Re: [R] g(x,y) = f(x,y) - e(x)- e(y)?

2008-04-22 Thread Philipp Pagel
g(x,y) = f(x,y) - e(x)- e(y) These are continuous functions. I am not sure how to do this with the discrete equivalents in R. Is this what you are looking for? g - function(x, y) { f(x,y) - e(x) - e(y) } cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte

[R] bar-chart help

2008-04-22 Thread Emre Unal
Hi, I have a table like below outside R environment Varible_Name Labels Bad_Percent Good_Percent Var1_Postal_Code_Availibility 1 0,149367931 0,850632069 0 0,19709687 0,80290313 Variable_Name column contains a single entry, the variable name, this is the title of the graphic I

[R] optimization and gradient

2008-04-22 Thread Ardia David
Dear all, I am using the functions 'optim' and 'nlminb'. For both, you can provide a function which computes the gradient of the objective function (to enhance speed and precision). In my case, both the objective function and the gradient take time to be computed and share many common

[R] removing zero rows from matrix/table

2008-04-22 Thread Patrick Zimmermann
Dear R-community, I have matrices/tables of different sizes which may contain rows with only zeros. Now I would like to delete these zero lines or create new matrices composed only of the non-zero lines. Columns only containing zeros I want to preserve. Here an example: [,1] [,2] [,3] [,4] [,5]

Re: [R] removing zero rows from matrix/table

2008-04-22 Thread Gabor Csardi
See ?apply M2 - M[ apply(M!=0, 1, any), , drop=FALSE] Gabor On Tue, Apr 22, 2008 at 11:52:08AM +0200, Patrick Zimmermann wrote: Dear R-community, I have matrices/tables of different sizes which may contain rows with only zeros. Now I would like to delete these zero lines or create new

Re: [R] optimization and gradient

2008-04-22 Thread Gabor Grothendieck
Check out: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/83547.html On Tue, Apr 22, 2008 at 5:50 AM, Ardia David [EMAIL PROTECTED] wrote: Dear all, I am using the functions 'optim' and 'nlminb'. For both, you can provide a function which computes the gradient of the objective function (to

Re: [R] rbugs on linux and wine

2008-04-22 Thread Gorjanc Gregor
Gregor Gorjanc wrote: Hi Alexander! You are mixing WinBUGS and OpenBUGS. R package Rbugs works with OpenBUGS, but the later does not work with Rbugs under Linux! Are you talking about rbugs or BRugs, Gregor? Ouch. Thank you Uwe! You are right, there are two R packages: rbugs and BRugs.

Re: [R] rbugs on linux and wine

2008-04-22 Thread Uwe Ligges
Gregor Gorjanc wrote: Hi Alexander! You are mixing WinBUGS and OpenBUGS. R package Rbugs works with OpenBUGS, but the later does not work with Rbugs under Linux! Are you talking about rbugs or BRugs, Gregor? Uwe Gregor __

Re: [R] Trend test for survival data

2008-04-22 Thread Heinz Tuechler
Dear Markus! Since I did not see an answer yet, my suggestion is to use coxph with the groups variable numerically coded as the only independent variable. Heinz At 13:39 21.04.2008, Markus Kreuz wrote: Hello, is there a R package that provides a log rank trend test for survival data in =3

Re: [R] bar-chart help

2008-04-22 Thread Richard . Cotton
I have a table like below outside R environment Varible_Name Labels Bad_Percent Good_Percent Var1_Postal_Code_Availibility 1 0,149367931 0,850632069 0 0,19709687 0,80290313 Variable_Name column contains a single entry, the variable name, this is the title of

[R] Downweighting of cases in GLM

2008-04-22 Thread Eva77
Dear all, I want to model presence/absence data of tree occurrence using a number of predictor variables. Absences of some sample points are probably wrongly specified (they should be presences) due to land use which can not be incorporated as a predictor because of some sort of arbitrariness.

Re: [R] optimization and gradient

2008-04-22 Thread Prof Brian Ripley
You can cache the results for reuse in the gradient call (most easily by sharing an environment between them). I don't think nlmin exists in R (nlm does), but doing it that way wastes gradient computations where they would not be used. Your usage may be exceptional, but for most usages the

Re: [R] spreadsheet in plot

2008-04-22 Thread Jim Lemon
Stephan Ripke wrote: Hello, how can I print a table (lets say my table xtable contains 3 rows and 3 Columns, the fileds consists of text) directly in a plot? when I use mtext(xtable), he tries to write everything on the same place. Hi Stephan, I think the addtable2plot function in the plotrix

Re: [R] removing zero rows from matrix/table

2008-04-22 Thread Dimitris Rizopoulos
try this: mat - sample(0:1, 49, TRUE) dim(mat) - c(7, 7) mat[c(1,4), ] - 0 ind - rowSums(mat == 0) != ncol(mat) mat[ind, ] I hope it helps. Best, Dimitris Dimitris Rizopoulos Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven,

Re: [R] jpeg legend space issues

2008-04-22 Thread Jim Lemon
Georg Ehret wrote: Dear R community, I am printing a jpeg file (using plot) and my y-axis label becomes partly cut (at the left) by a very close margin of document. See example: http://www.igm.jhmi.edu/~gehret/progr_collect_data/beta.jpg Can you please help me fix this? I tried din and fig

[R] spline

2008-04-22 Thread kende jan
dear all, I have a problem about spline, when I send this: library(mgcv) attach(SG2) modele3 - gam(J15STATUS~SWANG1+s(AGE)+ s  (SP2),data=SG2,family=binomial) it doesen't work et it says: Erreur dans get(.Random.seed,envir=.GlobalEnv) variable.Random.seed introuvable Thanks a lot

[R] cloud plot has white(transparent?) background

2008-04-22 Thread Karin Lagesen
I am using the code example from the R graph gallery to look at a cloud plot: require(lattice) data(iris) print(cloud(Sepal.Length ~ Petal.Length * Petal.Width, data = iris, groups = Species, screen = list(z = 20, x = -70), perspective = FALSE, key =

Re: [R] Trend test for survival data

2008-04-22 Thread Terry Therneau
Hello, is there a R package that provides a log rank trend test for survival data in =3 treatment groups? Or are there any comparable trend tests for survival data in R? The log-rank test is equivalent to a Cox model with a factor variable as the predictor. To do a trend test, simply fit

[R] how to read in multiple files with unequal number of columns

2008-04-22 Thread Tania Oh
Dear all, I want to read in 1000 files which contain varying number of columns. For example: file[1] contains 8 columns (mixture of characters and numbers) file[2] contains 16 columns etc I'm reading everything into one big data frame and when I try rbind, R returns an error of Error in

Re: [R] Documentation General Comments

2008-04-22 Thread Beck, Kenneth (STP)
Well, I don't think I will live for the rest of my days in a pub, but thanks to all so far for comments. I actually am willing to help, though not sure in what capacity. -Original Message- From: Rolf Turner [mailto:[EMAIL PROTECTED] Sent: Monday, April 21, 2008 7:03 PM To: r-help Cc:

Re: [R] how to read in multiple files with unequal number of columns

2008-04-22 Thread Ingmar Visser
you may be looking for ?merge hth, Ingmar On 22 Apr 2008, at 15:05, Tania Oh wrote: Dear all, I want to read in 1000 files which contain varying number of columns. For example: file[1] contains 8 columns (mixture of characters and numbers) file[2] contains 16 columns etc I'm reading

Re: [R] Research Notes

2008-04-22 Thread Barry Rowlingson
Tom Chr Backer Johnsen wrote: I can at best say that this question is related to R. What has become more and more obvious to me after I started using R about two years ago is that I have collected a large number of data files, scripts, and workspaces (.Rdata files) in several catalogs on

Re: [R] Documentation General Comments

2008-04-22 Thread Beck, Kenneth (STP)
This looks really good, thanks. -Original Message- From: Robert Baer [mailto:[EMAIL PROTECTED] Sent: Monday, April 21, 2008 6:53 PM To: esmail bonakdarian; Beck, Kenneth (STP); r-help@r-project.org Subject: Re: [R] Documentation General Comments I realize the R developers are probably

Re: [R] Research Notes

2008-04-22 Thread Richard . Cotton
What has become more and more obvious to me after I started using R about two years ago is that I have collected a large number of data files, scripts, and workspaces (.Rdata files) in several catalogs on my computer. It is also obvious that my memory is not up to the task of keeping

Re: [R] Documentation General Comments

2008-04-22 Thread Beck, Kenneth (STP)
Good comments, I agree that better cross referencing would help immensely. I would like to contribute in some way, but not sure how to start. I can always send $$ but that seems too simple. -Original Message- From: Duncan Murdoch [mailto:[EMAIL PROTECTED] Sent: Monday, April 21, 2008

Re: [R] Research Notes

2008-04-22 Thread JRG
Tom Chr Backer Johnsen wrote: I can at best say that this question is related to R. What has become more and more obvious to me after I started using R about two years ago is that I have collected a large number of data files, scripts, and workspaces (.Rdata files) in several

Re: [R] Multidimensional contingency tables

2008-04-22 Thread hadley wickham
On Mon, Apr 21, 2008 at 9:46 PM, Robert A. LaBudde [EMAIL PROTECTED] wrote: How does one ideally handle and display multidimenstional contingency tables in R v. 2.6.2? E.g.: prob1- data.frame(victim=c(rep('white',4),rep('black',4)), +

Re: [R] Research Notes

2008-04-22 Thread hadley wickham
I wouldn't dream of using a proprietary tool with a proprietary and closed format for this kind of thing EVER. If you want something more sophisticated than my Plain Text File solution then keep a 'NOTES.tex' file then you can include equations and graphics. Plus it's then trivial to

[R] Vector format importation from R to OpenOffice

2008-04-22 Thread Philippe Grosjean
Hello Agustin, hi all, There was a recent discussion about how to import R graphs in vector format into OpenOffice. For Microsoft Word under Windows, there is no problems: the EMF format (Windows Enhanced Metafile) is completely supported. However, importing the same .emf file into OpenOffice

Re: [R] Research Notes

2008-04-22 Thread Barry Rowlingson
JRG wrote: You might consider Treepad Lite (www.treepad.com). It's a tiny, free-form tree-structured notebook/database/text editor. It stores stuff as plain text, so you can easily copy/paste to other software. It's available for Windows and Linux, and it's free --- though more

Re: [R] Research Notes

2008-04-22 Thread Thibaut Jombart
Barry Rowlingson wrote: I use a thing called 'Plain Text File'... Basically I keep a file called 'NOTES.txt' in each project directory I work in and keep it updated as I work. I keep note of where data comes from, what I do to it, what various functions do and so on. Then I can use

Re: [R] Research Notes

2008-04-22 Thread Marc Schwartz
Tom Chr Backer Johnsen wrote: I can at best say that this question is related to R. What has become more and more obvious to me after I started using R about two years ago is that I have collected a large number of data files, scripts, and workspaces (.Rdata files) in several catalogs on

Re: [R] R 2.7.0 is released

2008-04-22 Thread Jens Oehlschlägel
Many thanks to the core team for an impressive list of new improvements ... o strwidth() and strheight() gain 'font' and 'vfont' arguments and accept in-line pars such as 'family' in the same way as text() does. (Longstanding wish of PR#776) ... and for not having forgotten an 8 year old wish!

Re: [R] optFederov/AlgDesign - help avail?

2008-04-22 Thread paulandpen
I would suggest reading this attachment below. http://support.sas.com/techsup/technote/ts722d.pdf OptFedreov is the go for you, you are correct. I don't know of anybody who has come up with design principles in choice modelling that apply to logit and probit models etc. We all assume that

Re: [R] how to read in multiple files with unequal number of columns

2008-04-22 Thread Tania Oh
Thanks Ingmar, but when I used merge in : all - merge(all, tmp), I get an error: Error in rep.int(rep.int(seq_len(nx), rep.int(rep.fac, nx)), orep) : invalid 'times' value is the error because of the way I initialised 'all'? what is the correct way of using merge in this case? thanks

Re: [R] optFederov/AlgDesign - help avail?

2008-04-22 Thread paulandpen
of yeah, and your design needs to account for main effects and interactions if you intend to model them, so make sure to program that into algdesign as well - Original Message - From: zubin [EMAIL PROTECTED] To: r-help@r-project.org Sent: Monday, April 21, 2008 9:59 PM Subject: [R]

Re: [R] cloud plot has white(transparent?) background

2008-04-22 Thread David Winsemius
Karin Lagesen [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: I am using the code example from the R graph gallery to look at a cloud plot: require(lattice) data(iris) print(cloud(Sepal.Length ~ Petal.Length * Petal.Width, data = iris, groups = Species, screen = list(z

[R] Getting rid of borders on semi-transparent plotting symbols

2008-04-22 Thread Karl Ove Hufthammer
R version 2.7.0 RC (2008-04-20 r45403) When using semi-transparent filled plotting symbols, the border of the symbol has a different (darker) colour than the interior: plot(0, 0, pch=19, col=#FF22) (Saving this as a PDF and looking at it magnified may make it easier to see.) This is pretty

[R] Bar Chart help!

2008-04-22 Thread john.hogan
Hi there, Im working with a bar chart. I want to create a bar chart using the followinf file: gender relationship Male Manage Male Manager Male Manager Male Manager Male Clerical Male Manager Male Manager Male Manager Male Manager Im trying to

Re: [R] UTF-8 or Unicode on Windows PC

2008-04-22 Thread Hans-Joerg Bibiko
On 21 Apr 2008, at 12:33, Prof Brian Ripley wrote: Is it possible to download a compiled snapshot of 2.7.0 for Windows XP? Yes, http://cran.r-project.org/bin/windows/base/rtest.html And it is due for release tomorrow. I played with 2.7.0 on Windows XP. I can do things which couldn't be

[R] Modeling presence only data in R

2008-04-22 Thread milton ruser
Dear All, I have a set of environental maps and presence-only points for some species. How can I generate distributions models on R using these presence-only data? What packages and functions can I use to do so? Kind regards, Miltinho Brazil [[alternative HTML version deleted]]

Re: [R] logit GLM without intercept

2008-04-22 Thread gorgasal
Hi Robert, you can exclude the intercept by including -1 in the formula: value - as.numeric(runif(20).4) ppm - rnorm(20) glm(value~ppm-1,family=binomial) HTH Stephan Dear Statisticians, I would like to analyse my data with a GLM with binomial error distribution and logit link function.

Re: [R] Documentation General Comments

2008-04-22 Thread Greg Snow
This is a case of you can't please everyone. A while back there was some complaint that Introduction to R spent to much time on talking about the different types of variables, just the opposite complaint of yours. There are several other sources of documentation (look under the books link on the

[R] Feed list of vectors to vioplot()?

2008-04-22 Thread Johannes Graumann
Hi, I have a list of vectors and am trying to coerce them into something that vioplot will take as groups of data to be plotted independently. Can someone nudge me into the right direction? Thanks, Joh __ R-help@r-project.org mailing list

Re: [R] Documentation General Comments

2008-04-22 Thread Bert Gunter
FWIW: I consider the documentation of Core R to be one of its great strengths: it is terse (read: to the point), detailed, and accurate. I find it eminently useful and helpful. Indeed, it was why I made the decision some years ago to switch from S-Plus to R (I readily acknowledge that S-Plus may

Re: [R] Modeling presence only data in R

2008-04-22 Thread milton ruser
Hi Rubén, It also work for presence-only data? I haven´t absence data. Thanks a lot. miltinho On 4/22/08, Rubén Roa-Ureta [EMAIL PROTECTED] wrote: milton ruser wrote: Dear All, I have a set of environental maps and presence-only points for some species. How can I generate

Re: [R] Research Notes

2008-04-22 Thread mel
Tom Chr Backer Johnsen a écrit : What has become more and more obvious to me after I started using R about two years ago is that I have collected a large number of data files, scripts, and workspaces (.Rdata files) in several catalogs on my computer. It is also obvious that my memory is

Re: [R] Getting rid of borders on semi-transparent plotting symbols

2008-04-22 Thread Prof Brian Ripley
plot(0, 0, pch=21, bg=#FF22, col=#FF01) may be (close to) what you are looking for. On Tue, 22 Apr 2008, Karl Ove Hufthammer wrote: R version 2.7.0 RC (2008-04-20 r45403) When using semi-transparent filled plotting symbols, the border of the symbol has a different (darker) colour

Re: [R] Use of recordPlot

2008-04-22 Thread Greg Snow
You seem to be confusing several issues. First, being object oriented does not mean that it matches C++ syntax or that every object is guarenteed to have specific methods. What lead you to think that a recordedplot would have a metafile method? Nothing else has that method, and the only

Re: [R] Documentation General Comments

2008-04-22 Thread Dr. Jeff Miller
Bert, I don't think the documentation in of itself is the core of the problem presented in the original post about this. The problem is one of organization. I commented about it possibly being time for an exhaustive R Guide (similar to those huge books put out for commercial software) that

Re: [R] logit GLM without intercept

2008-04-22 Thread Prof Brian Ripley
On Tue, 22 Apr 2008, [EMAIL PROTECTED] wrote: Hi Robert, you can exclude the intercept by including -1 in the formula: value - as.numeric(runif(20).4) ppm - rnorm(20) glm(value~ppm-1,family=binomial) Yes, but that is the same as 0 + ppm, which I tend to think is more intuitive. In so

[R] subset and boxplots

2008-04-22 Thread Marlin Keith Cox
R users, This should be simple, but I cannot figure it out. I import test.csv, then create a subset for brook_dis. When I plot (week, R) I get a nice boxplot, but along the x axis, there are weeks a, b, c along with h and nh. Thank you ahead of time. keith rm(list=ls())

Re: [R] Getting rid of borders on semi-transparent plotting symbols

2008-04-22 Thread hadley wickham
But is this behaviour a bug or by design? Hadley On Tue, Apr 22, 2008 at 10:47 AM, Prof Brian Ripley [EMAIL PROTECTED] wrote: plot(0, 0, pch=21, bg=#FF22, col=#FF01) may be (close to) what you are looking for. On Tue, 22 Apr 2008, Karl Ove Hufthammer wrote: R version 2.7.0 RC

Re: [R] logit GLM without intercept

2008-04-22 Thread Gavin Simpson
On Tue, 2008-04-22 at 17:04 +0200, [EMAIL PROTECTED] wrote: Hi Robert, you can exclude the intercept by including -1 in the formula: value - as.numeric(runif(20).4) ppm - rnorm(20) glm(value~ppm-1,family=binomial) Note that 0+ppm is the same thing, try it: glm(value ~ 0 + ppm,

Re: [R] subset and boxplots

2008-04-22 Thread Sebastian P. Luque
On Tue, 22 Apr 2008 07:55:41 -0800, Marlin Keith Cox [EMAIL PROTECTED] wrote: R users, This should be simple, but I cannot figure it out. I import test.csv, then create a subset for brook_dis. When I plot (week, R) I get a nice boxplot, but along the x axis, there are weeks a, b, c along

Re: [R] cloud plot has white(transparent?) background

2008-04-22 Thread Deepayan Sarkar
On 4/22/08, David Winsemius [EMAIL PROTECTED] wrote: Karin Lagesen [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: I am using the code example from the R graph gallery to look at a cloud plot: require(lattice) data(iris) print(cloud(Sepal.Length ~ Petal.Length *

Re: [R] Documentation General Comments

2008-04-22 Thread Duncan Murdoch
On 4/22/2008 11:46 AM, Dr. Jeff Miller wrote: Bert, I don't think the documentation in of itself is the core of the problem presented in the original post about this. The problem is one of organization. I commented about it possibly being time for an exhaustive R Guide (similar to those

Re: [R] cloud plot has white(transparent?) background

2008-04-22 Thread Deepayan Sarkar
On 4/22/08, Karin Lagesen [EMAIL PROTECTED] wrote: I am using the code example from the R graph gallery to look at a cloud plot: require(lattice) data(iris) print(cloud(Sepal.Length ~ Petal.Length * Petal.Width, data = iris, groups = Species, screen = list(z = 20, x =

[R] bootstrap for confidence intervals of the mean

2008-04-22 Thread stephen sefick
d = c(0L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 0L, 0L, 7375L, NA, NA, 17092L, 0L, 0L, 32390L, 2326L, 22672L, 13550L, 18285L) boot.out -boot(d, mean, R=1000, sim=permutation) Error in mean.default(data, original, ...) : 'trim' must be numeric of length one I know that I am missing something

[R] intervention analysis for time series

2008-04-22 Thread Michael Wolf
Dear all, I am wondering how/if it is possible to implement the general methodology of Box and Tiao: Intervention analysis with applications to economic and environmental problems (JASA, 1975, pages 70-79) in R? This question has been posted before but without a positive response (at the

Re: [R] bootstrap for confidence intervals of the mean

2008-04-22 Thread Gavin Simpson
On Tue, 2008-04-22 at 12:59 -0400, stephen sefick wrote: d = c(0L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 0L, 0L, 7375L, NA, NA, 17092L, 0L, 0L, 32390L, 2326L, 22672L, 13550L, 18285L) boot.out -boot(d, mean, R=1000, sim=permutation) Error in mean.default(data, original, ...) : 'trim'

[R] Using the 'by' function within a 'for' loop

2008-04-22 Thread Judith Flores
Dear R experts, I am sorry for sending this email again. I would imagine yesterday and maybe today, have been very busy days with the release of R v 2.7.0. I join all the R users who are very gratful for your contant work and efforts, specially knowing that you are doing this for the sake of

Re: [R] bootstrap for confidence intervals of the mean

2008-04-22 Thread Robert A LaBudde
See the help for boot(). The function in the 2nd argument has to be of a special form. You need to define such a form, as in: fmean- function (x, i) mean(x[i]) #use data x[] and indices i and then boot.out- boot(d, fmean, R=1000, sim='permutation') At 12:59 PM 4/22/2008, stephen sefick

Re: [R] Getting rid of borders on semi-transparent plotting symbols

2008-04-22 Thread Dieter Menne
Karl Ove Hufthammer Karl.Hufthammer at math.uib.no writes: R version 2.7.0 RC (2008-04-20 r45403) When using semi-transparent filled plotting symbols, the border of the symbol has a different (darker) colour than the interior: plot(0, 0, pch=19, col=#FF22) Same R version, Window,

Re: [R] how to read in multiple files with unequal number of columns

2008-04-22 Thread John Kane
You might want to have a look at the merge_all function in the reshape package. --- Tania Oh [EMAIL PROTECTED] wrote: Dear all, I want to read in 1000 files which contain varying number of columns. For example: file[1] contains 8 columns (mixture of characters and numbers) file[2]

[R] optimization setup

2008-04-22 Thread threshold
Hi, here comes my problem, say I have the following functions (example case) # function1 - function (x, theta) {a - theta[1] ( 1 - exp(-theta[2]) ) * theta[3] ) b - x * theta[1] / theta[3]^2 return( list( a = a, b = b )) }

Re: [R] Using the 'by' function within a 'for' loop

2008-04-22 Thread hadley wickham
Hi Judith, Could you provide a copy of your data as well? (Either as a csv file, or by copying and pasting the output of dput(my.data.frame) or by generating a data.frame of random numbers with the same structure as your data). That will help people to see what your code does and suggest

Re: [R] Choice of notch size in R

2008-04-22 Thread Alex Reynolds
Many thanks to you and Peter Dalgaard for your advice. Instead of notches on a classic box plot, I have elected to draw a more minimalized box plot along the lines suggested by Tufte, and overlap a custom significance region on this. As a statistical question, if I log-transform my data, can I

Re: [R] Choice of notch size in R

2008-04-22 Thread hadley wickham
On Tue, Apr 22, 2008 at 2:00 PM, Alex Reynolds [EMAIL PROTECTED] wrote: Many thanks to you and Peter Dalgaard for your advice. Instead of notches on a classic box plot, I have elected to draw a more minimalized box plot along the lines suggested by Tufte, and overlap a custom significance

Re: [R] Getting rid of borders on semi-transparent plotting symbols

2008-04-22 Thread Prof Brian Ripley
On Tue, 22 Apr 2008, Dieter Menne wrote: Karl Ove Hufthammer Karl.Hufthammer at math.uib.no writes: R version 2.7.0 RC (2008-04-20 r45403) When using semi-transparent filled plotting symbols, the border of the symbol has a different (darker) colour than the interior: plot(0, 0, pch=19,

Re: [R] Using the 'by' function within a 'for' loop

2008-04-22 Thread jim holtman
After talking about it, I forgot to put the drop=TRUE in the 'split' call: x.index - split(seq(nrow(dat)), dat[,c(tx,day)], drop=TRUE) results - lapply(x.index, function(.indx){ mn - mean(dat$k[.indx]) .. data.frame() }) On Tue, Apr 22, 2008 at 1:30 PM, Judith Flores [EMAIL

Re: [R] Using the 'by' function within a 'for' loop

2008-04-22 Thread jim holtman
One of the things that is probably happening is that the 'by' is producing all possible combinations and in some cases 'x' is size zero. Put a check in the function within the 'by' to check for this condition and just return a NULL. Another approach that I use is to split(seq(nrow(df),

[R] Ubuntu vs. Windows

2008-04-22 Thread Doran, Harold
Dear List: I am very much a unix neophyte, but recently had a Ubuntu box installed in my office. I commonly use Windows XP with 3 GB RAM on my machine and the Ubuntu machine is exactly the same as my windows box (e.g., processor and RAM) as far as I can tell. Now, I recently had to run a very

[R] lmer model building--include random effects?

2008-04-22 Thread Ista Zahn
Hello, This is a follow up question to my previous one http://tolstoy.newcastle.edu.au/R/e4/help/08/02/3600.html I am attempting to model relationship satisfaction (MAT) scores (measurements at 5 time points), using participant (spouseID) and couple id (ID) as grouping variables, and time

Re: [R] Ubuntu vs. Windows

2008-04-22 Thread Abhijit Dasgupta
My naive understanding of this (I switched to Ubuntu a year ago from WinXP for similar reasons) is that Ubuntu as an OS uses less memory than WinXP, thus leaving more memory for computation, swap space, etc. In other words, Ubuntu is lighter than XP on system resources. Abhijit Doran, Harold

[R] R-Forge vs. RForge

2008-04-22 Thread Derek Ogle
I have two packages that I use locally and have been curious about moving them to R Forge to take advantage of SVN, builds, etc. In looking into this I stumbled across two different sites. The apparent official R Forge site at http://r-forge.r-project.org/ and a seemingly unofficial site at

Re: [R] optimization setup

2008-04-22 Thread Ray Brownrigg
On Wed, 23 Apr 2008, threshold wrote: Hi, here comes my problem, say I have the following functions (example case) # function1 - function (x, theta) {a - theta[1] ( 1 - exp(-theta[2]) ) * theta[3] ) b - x * theta[1] / theta[3]^2

[R] levels in dataframes

2008-04-22 Thread Georg Ehret
Dear R community, I wish to ask a short question concerning factor-data in dataframes: When I subset the data and get rid of all data for one level, I still retain the level name (obtained by levels(dataframe$variablename) ). Is there a convenient way to get rid of the levels for which all

Re: [R] Ubuntu vs. Windows

2008-04-22 Thread Peter Dalgaard
Doran, Harold wrote: Dear List: I am very much a unix neophyte, but recently had a Ubuntu box installed in my office. I commonly use Windows XP with 3 GB RAM on my machine and the Ubuntu machine is exactly the same as my windows box (e.g., processor and RAM) as far as I can tell. Now, I

Re: [R] levels in dataframes

2008-04-22 Thread Peter Alspach
Georg One way is to call factor() on the subsetted object. georg - factor(LETTERS[1:4]) summary(georg) A B C D 1 1 1 1 georg - georg[georg!='A'] summary(georg) # the level is still there A B C D 0 1 1 1 georg - factor(georg) summary(georg) # now it is gone B C D 1 1 1 HTH

Re: [R] estimate of overdispersion with glm.nb

2008-04-22 Thread Ben Bolker
Markus Loecher mao.loecher at gmail.com writes: Dear R users, I am trying to fully understand the difference between estimating overdispersion with glm.nb() from MASS compared to glm(..., family = quasipoisson). It seems that (i) the coefficient estimates are different and also (ii) the

Re: [R] Ubuntu vs. Windows

2008-04-22 Thread Prof Brian Ripley
On Tue, 22 Apr 2008, Peter Dalgaard wrote: Doran, Harold wrote: Dear List: I am very much a unix neophyte, but recently had a Ubuntu box installed in my office. I commonly use Windows XP with 3 GB RAM on my machine and the Ubuntu machine is exactly the same as my windows box (e.g.,

[R] Comparing kendall's tau values?

2008-04-22 Thread Ashton, Gail
I have 3 variables relating to the successful introductions of species to 95 different areas: introduction frequency; number of successes pre 1906; number of successes post 1906 The data are not normal, nor homo-skedatic, so I am using non-parametric statistics. I have calculated Kendall's tau

[R] nth step transition matrices

2008-04-22 Thread Brad Lukoskie
Hello, I have a question in regards to markov chains and transition probabilities. I am trying to figure out a way to calculate the kth-step transition matrix of a given matrix. Say for example I have a single step 2x2 matrix: 1 2 P= 1 .95 .05 2 .01. 99 If I were to

Re: [R] nth step transition matrices

2008-04-22 Thread Rolf Turner
(a) Is this a homework question? (b) Your value of P^2 is very rough --- only 2 decimal places. (c) The answer to the question ``Is there a way ...?'' is ``Of course!'' There is always a way in R. (d) In this case I would write a function, say ``matpow(M,n)'' to calculate the n-th

[R] Incrementing Dates

2008-04-22 Thread Worik R
How can I increment the value of a Date class? I want to add a day, month or year to a date. cheers Worik [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] difftime result in years?

2008-04-22 Thread Worik R
I would like to know how many years (including partial years) are between two dates. So difftime(20/11/1962, 20/5/1964, units=years) would be about 1.5 But units of years are not available. cheers Worik [[alternative HTML version deleted]]

[R] k-means: should columns in dataset be in same scale?

2008-04-22 Thread Johan Jackson
Hi all, Simple question re k-means. If I have a data set with columns that are on different scales (say col 1 has var=100 and col2 var=2), will this make a difference to the k-means algorithm? It seems as though it does. If so, should we first standardize the columns of the dataset so that each

Re: [R] Incrementing Dates

2008-04-22 Thread Dirk Eddelbuettel
On Wed, Apr 23, 2008 at 12:17:55PM +1200, Worik R wrote: How can I increment the value of a Date class? I want to add a day, month or year to a date. As the shoe company from Portland would say, just do it. The key is knowing that the seq() function has a variant operating on the Date class:

Re: [R] Incrementing Dates

2008-04-22 Thread Gabor Grothendieck
Try: Sys.Date() + 1 seq(Sys.Date(), length = 2, by = month)[2] seq(Sys.Date(), length = 2, by = year)[2] R News 4/1 has an article on dates. On Tue, Apr 22, 2008 at 8:17 PM, Worik R [EMAIL PROTECTED] wrote: How can I increment the value of a Date class? I want to add a day, month or year to

  1   2   >